Commit Graph

60341 Commits

Author SHA1 Message Date
Jillian Vogel
8d62d337f5 refactor: use MakoService.render_template to remove deprecation warnings
from block code.
2021-11-09 14:03:54 +10:30
Jillian Vogel
457f959356 refactor: deprecates ModuleSystem.render_template
in favor of the added MakoSystem render_template method.

Related changes:
* Adds the MakoService to the StudioEditModuleRuntime,
  PreviewModuleSystem, LmsModuleSystem, and XBlockRuntime
* MakoService constructor takes a `namespace_prefix` string, so that the
  CMS PreviewModuleSystem can render to LMS templates, without needing
  the special render_from_lms helper method.
* ModuleSystem.render_template becomes a read-only property, so the
  constructor calls and test module systems are updated accordingly.
* Adds tests for the MakoService and module system shims.
2021-11-09 14:03:50 +10:30
Braden MacDonald
480e8997ec fix: A test (test_save_one_and_confirm) was flaky 2021-11-08 10:46:33 -08:00
Simon Chen
bcf093c1f6 feat: disable idv on dashboard course listing (#29276)
There are messages on each course card on learner dashboard that displays action panels to prompt learners to do IDV. With honor code signature feature on, those panel message should be disabled

Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-11-08 13:36:40 -05:00
Long Lin
7f797b35ed chore: bump edx-enterprise version to 3.33.9 2021-11-08 11:49:57 -05:00
Tim McCormack
8a764cca10 refactor: Safer, more readable user-mismatch detection code in safe-sessions (#29226)
- Add early exit for readability. Less indentation here may make the control flow easier to read.
- Wrap debug info generation in error-suppressing try-except block.

Co-authored-by: Robert Raposa <rraposa@edx.org>
2021-11-08 16:13:39 +00:00
Justin Hynes
fdeb7714aa Merge pull request #29219 from edx/jhynes/microba-1569_filter_bulk_emails_last_login
feat: filter bulk course email recipients based on last_login date
2021-11-08 09:46:57 -05:00
Bianca Severino
c362507b5d Merge pull request #29267 from edx/bseverino/integrity-signature-flag
[MST-1150] Add integrity signature flag to courseware api
2021-11-08 09:30:18 -05:00
David Ormsbee
15eca3ba59 Merge pull request #29190 from open-craft/jill/BD-13-user-service-fix
[FAL-2457] Let ModuleSystem use UserService
2021-11-08 09:18:10 -05:00
Justin Hynes
e50085401e feat: filter bulk course email recipients based on last_login date
[MICROBA-1569]
- filter bulk course email recipients based on the last_login date of a learner's user account
- introduces a new setting named `BULK_COURSE_EMAIL_LAST_LOGIN_ELIGIBILITY_PERIOD` that sets the login threshold to be included (in months) to a bulk course email message(if set)
2021-11-08 09:14:50 -05:00
Uzair Rasheed
4b0d450d73 Merge pull request #29265 from edx/refactor_hibp_call
refactor: hibp call to celery task
2021-11-08 17:55:53 +05:00
Farhaan Bukhsh
cfe75e95b9 feat: Add discussion_enabled for Unit (#28864)
For each unit discussion_enabled flag is added
so that each unit can be made discussable when needed.

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2021-11-08 16:17:07 +05:00
Awais Jibran
1668d74abb feat: gate proctoring card in course apps (#29263)
* feat: gate proctoring card in course apps

* refactor: quality fix

* refactor: quality fix
2021-11-08 16:12:30 +05:00
Bianca Severino
9f2dc8606b fix: add integrity signature flag to courseware api 2021-11-05 15:35:04 -04:00
kenclary
a7181d263e Merge pull request #29269 from edx/kclary/coursegraph
fix: correct path for dump_course_to_neo4j task, so it goes to correct celery queue.
2021-11-05 15:03:49 -04:00
Ken Clary
81f7d10452 fix: correct path for dump_course_to_neo4j task, so it goes to correct celery queue.
TNL-8386
2021-11-05 14:37:33 -04:00
Dillon Dumesnil
ea0a9cf9d3 Merge pull request #29200 from edx/ddumesnil/progress-page-credit-aa-1020
feat: AA-1020: Add Credit Information to Progress tab
2021-11-05 11:07:11 -07:00
uzairr
0f3b3d2763 refactor: hibp call to celery task
Uses is_staff flag to figure out whether the user is internal or not.

Fixes: VAN-664
2021-11-05 18:19:49 +05:00
Waheed Ahmed
100752419e chore: update register identify call traits (#29264)
Updated identify call traits and only include the email_subscribe attribute
if the feature is enabled.
2021-11-05 15:43:15 +05:00
Tim McCormack
fdd27a1f71 feat: Log session ID from various sources after safe-session mismatch (#29185)
Add logging in case a safe-session user mismatch is related to wrong
session being retrieved from cache. This additional logging should
reveal any such mismatch (without revealing the actual session ID in
logs).

Send to metrics as custom attributes as well.

Also:

- Compute "session_id_changed" based on all three session IDs (and
  send as custom attribute)
- Put all _verify_user logs into one (multiline) log line
- Accordingly, change logging assertion to only require a substring,
  at-least-once match rather than a full-and-only match.

ref: ARCHBOM-1939
2021-11-04 19:34:44 +00:00
John Nagro
ccb8c6ce27 fix: release edx-enterprise 3.33.6 (#29222)
ENT-5115
2021-11-04 15:21:07 -04:00
Chris Deery
e96dff1e40 feat: [AA-1087] add flag for enabled proctored exams (#29201)
* feat: [AA-1087] add flag for enabled proctored exams

Add flag to enable frontend to optimize outline tab widget rendering without
having to wait for the proctoring API call to return.
2021-11-04 14:14:50 -04:00
Bianca Severino
ccb4324cd1 Merge pull request #29220 from edx/bseverino/proctoring-4.6.0
chore: upgrade to edx-proctoring to 4.6.0
2021-11-04 13:55:52 -04:00
Bianca Severino
fecf79ad9d chore: upgrade to edx-proctoring to 4.6.0 2021-11-04 11:56:05 -04:00
John Nagro
9fbb1ae645 feat: edx-enterprise 3.33.5 release (#29217)
[3.33.5]
---------
fix: CSOD API session tokens are now saved to the customer's configuration instead of individual transmission audits

[3.33.4]
---------
feat: integrated channels only requests content metadata for courses that need updating

[3.33.3]
---------
feat: Change Bulk Enrollment Assignment Logic for Pending learners

[3.33.2]
---------
fix: no longer notify learners of already existing enrollments

ENT-5115
2021-11-04 09:51:08 -04:00
edX Transifex Bot
20535e12eb geoip2: update maxmind geolite country database 2021-11-04 02:08:52 +05:00
Feanil Patel
18383a5b1a Merge pull request #29214 from edx/feanil/remove_dead_action
build!: Remove unused github action and sql file.
2021-11-03 16:35:24 -04:00
SaadYousaf
e33b23517c test: fixing tests 2021-11-04 00:24:29 +05:00
SaadYousaf
abdc46793f fix: add cache to forum role lookup 2021-11-04 00:24:29 +05:00
Feanil Patel
4dd0b88e98 build!: Remove unused github action and sql file.
This automation has been making these PRs to update this file but no one
has been merging them and it doesn't look like the sql file is being
used by devstack.

BREAKING CHANGE: This removes the edxapp.sql file and a regularly
running github action.  If you are relying on that file, this commit
will break you.  My search didn't turn up anything that would be using
this file but I might have missed something.
2021-11-03 15:03:57 -04:00
connorhaugh
b8d49e77cc Revert "feat: Add a data migration to copy all course index data into MySQL"
This reverts commit 43bc683d80.
2021-11-03 13:53:21 -04:00
Felipe Trzaskowski
21a12a13e5 feat: add a file upload endpoint to the discussions REST API. (#29067) 2021-11-03 21:41:28 +05:00
Andrew Shultz
d0f8d9ea35 Merge pull request #29210 from edx/ashultz0/rm-analytics-dep
rm analytics client dependency
2021-11-03 11:21:42 -04:00
Braden MacDonald
43bc683d80 feat: Add a data migration to copy all course index data into MySQL 2021-11-03 10:26:03 -04:00
Andy Shultz
2051a60db0 fix: remove unnecessary analytics client dependency
analytics API use is in separate repositories, mostly analytics
dashboard
2021-11-03 10:06:30 -04:00
Zachary Hancock
abf1f21668 fix: bulk verification creation failure for large input (#29197)
Fixes an issue where bulk create was only batching writes. With a sufficiently large input the users queryset would fail to evaluate due to the size of the filter list sent to the db.
2021-11-02 17:45:43 -04:00
Dillon Dumesnil
dafb70cc7c feat: AA-1020: Add Credit Information to Progress tab 2021-11-02 16:25:16 -04:00
Jansen Kantor
b6c92513c2 style: add blank line (#29199) 2021-11-02 16:05:17 -04:00
M. Zulqarnain
1003f262ad feat: Django codemods on LMS (1) (#28851) 2021-11-02 17:00:46 +05:00
Jillian Vogel
a14f7e5953 fix: do not modify the django user object when creating a XBlockDjangoUserService
This user object is shared between invocations, and so the
anonymous_user_id gets altered for different types of blocks.
2021-11-02 20:42:21 +10:30
Jillian Vogel
f8c96c1df7 chore: pylint 2021-11-02 20:04:33 +10:30
Jillian Vogel
d1741f88ca test: Adds a test to verify the bug introduced by the previous change
This bug occurs when get_module_system_for_user is called more than once
per request, for blocks with different values for the
requires_per_student_anonymous_id property.
2021-11-02 19:34:14 +10:30
Jillian Vogel
b1b3c646ad refactor: fixes tests
* UserStubService now takes user, user_is_staff, and anonymous_user_id
* get_test_system() creates a UserStubService with an anonymous_user_id of 'student'
* Removes references to deprecated ModuleSystem attributes from test code
* Fixes and simplifies the ConditionalBlock tests, using get_module provided by TestModuleSystem instead of trying to mock out all the pieces.

(cherry picked from commit 927016a8df)
2021-11-02 18:25:52 +10:30
Jillian Vogel
bafc0cd91f refactor: removes calls to deprecated ModuleSystem attributes
Removes references to these deprecated attributes from the platform code:
* runtime.anonymous_student_id
* runtime.seed
* runtime.user_id
* runtime.user_is_staff

Related changes:

* Ensure that all platform XBlocks which use these attributes "need" the user service.
* ProblemBlock: Removes check for existence of runtime.seed attribute in preparation for removal of this attribute from ModuleSystem.
* edxnotes: Catches NoSuchServiceError just in case some XBlocks using notes don't have the user service.
* UserTagsService refactor: pass user and course_id on creation

(cherry picked from commit 753839276f)
2021-11-02 18:24:14 +10:30
Jillian Vogel
cf1064616c refactor: deprecate ModuleSystem user attributes in favor of user service
The following ModuleSystem attributes are deprecated by this change, and should be pulled directly from the user service instead:

* anonymous_student_id
* seed
* user_id
* user_is_staff

Related changes:

* Removes the `user` and `anonymous_student_id` parameters from the ModuleService constructor.
* Stores anonymous_user_id in XBlockDjangoUserService's opt_attr
* Pulls out constants used by DjangoXBlockUserService opt_attr so they can be used in the platform code.
* LmsModuleSystem uses the user service created in wrapper function for runtime.publish to avoid requiring the user
  service to be "needed" by all XBlocks.
* LmsModuleSystem no longer checks for instances of XModuleDescriptor when deciding what kind of anonymous_user_id to
  provide:  all XModules are XBlocks, so this check is unnecessary.
* XBlockRuntime returns a user service when requested
* Adds tests for deprecated ModuleSystem attributes and changes to XBlockDjangoUserService.

(cherry picked from commit c41e7fb93a)
2021-11-02 18:24:06 +10:30
Maxim Beder
eabd6e8019 feat: add anonymous settings to discussions api (#28981)
If course allows anonymous posts, and user is an author of a post, add
`anonymous` to posts' editable fields.
If course allows anonymous to peers posts, and user is an author of a
post, add `anonymous_to_peers` to posts' editable fields.

Course endpoint response to get request will now include course's
`allow_anonymous` and `allow_anonymous_to_peers` settings.

Added `anonymous` and `anonymous_to_peers` fields to the content
serializer, from which ThreadSerializer and CommentSerializer inherit.
Both fields have a default value of False, because there are cases where
course configuration doesn't allow them to be initialized (if a course
doesn't allow anonymous posts, the fields won't be included in the list
of initializable/editable fields).
2021-11-02 11:25:40 +05:00
Binod Pant
60da5db4b6 feat: degreed2 integrated channels (#29183)
* feat: degreed2 integrated channels

ENT-2789

* feat:  New integrated channel via edx-enterprise

* fix: pull in edx-enterprise 3.33.1

fixes db_overrides check failure by renaming field `key` to `client_id`
2021-11-01 21:18:59 -04:00
jawad khan
9c1fc4cbba feat: LEARNER-8493 Remove upgrade banner from mobile upgrade banner (#29160)
* feat: remove upgrade banner from mobile upgrade banner

After investigating the best way to keep a user logged in, and solve rendering issues, we decided to show the unit page in a full webview within the app. However, in order to comply with app store guidelines, we need to remove the upgrade banner from this page.

LEARNER-8493
2021-11-02 04:47:48 +05:00
David Ormsbee
3754bd219a fix: force reset of modulestore data for test cases
In #8bdf59b, the SplitModuleStore was given a Django ORM backed store
for active version data (i.e. "which version is currently published?").
This started to cause sporadic test failures depending on the test
ordering, such as this module:

  openedx/features/course_experience/tests/views/test_course_home.py

The root cause was that the database table holding these active versions
was not being properly cleared after tests, probably because of the odd
ordering we do MongoDB vs. Django ORM data initialization in the
ModuleStoreTestCase and SharedModuleStoreTestCase classes. This is an
overly broad hammer fix for this, because:

1. The obvious thing to add it into the ModuleStoreIsolationMixin didn't
   seem to work.
2. While overly broad, it's a small bit of code and should be safe.
3. It's more urgent to fix this flakiness in the build (affecting maybe
   1/4 test runs?) ASAP, rather than tracking this down.
2021-11-01 17:41:08 -04:00
Michael Roytman
b953ef044e Merge pull request #29155 from edx/mroytman/MST-1130-management-command-cleanup
feat: Add Management Command to Re-Emit SoftwareSecurePhotoVerification post_save Signal
2021-11-01 15:01:49 -04:00