Commit Graph

19161 Commits

Author SHA1 Message Date
Aarif
7d2cc016ec fix: added type annotations to fix mypy failure in CI (#28933) 2021-10-05 17:04:11 +05:00
Awais Qureshi
55c69c5e5b chore: disable pylint warning. 2021-10-05 14:08:03 +05:00
Kshitij Sobti
9e787a09bc chore: remove dependency on rest_condition (#28663)
rest-condition has not been updated for a while, and with DRF 3.9 it is no longer needed since the ability to combine Permission classes using boolean operators is now provided by DRF directly.
2021-10-04 15:38:17 -04:00
ha-D
d3bc4601ae feat: Add course-wide custom scripts
Imlements OEP-15 by adding two fields to the course settings:
- Course-wide Custom JS
- Course-wide Custom CSS
The resources defined in these fields will be rendered in all course pages.

Rebase b6cb629849..0578e1c4c6 onto b6cb629849:
- Add course-wide resources to API for MFE use
- Revert "Add course-wide resources to API for MFE use" reverts commit 53648dcf0afe3cd171c9dc2eb5e56b871b2bcfb2

Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
2021-10-04 11:24:45 -07:00
Albert (AJ) St. Aubin
24548dd093 fix: Hide Request Cert button on courses with no Cert config 2021-10-04 07:01:26 -04:00
Agrendalath
4b8421dfd8 fix: handle invalid source library version on course import
Importing a course with an invalid source library version (e.g. created on
another instance) should not make the import fail.
2021-09-30 10:19:56 -07:00
Simon Chen
38944b836b fix: Create a better admin UI for PendingNameChange model (#28888)
The current admin UI for the PendingNameChange model has no useful info and is not performant on edit form. This change make the view and edit of the model easier in django admin

Co-authored-by: Simon Chen <schen@edx-c02fw0guml85.lan>
2021-09-30 11:34:59 -04:00
David Ormsbee
deaf80f346 revert: "[BD-13] Let ModuleSystem use UserService" (#28857)
This caused a regression where anonymous_id values were not as expected.
Reverting for now, with investigation to follow.
2021-09-27 15:42:35 -04:00
Awais Qureshi
e3c83bd86f Merge pull request #28827 from edx/django32/BOM-2846-issue
fix: Added durable argument to transaction.atomic.
2021-09-27 18:33:45 +05:00
Phillip Shiu
1d78705c86 fix: enterprise user check fails for courses without verified track (#28839) 2021-09-24 15:35:02 -04:00
David Ormsbee
3827f4c90d Merge pull request #28440 from open-craft/jill/BD-13-user-service
[BD-13] Let ModuleSystem use UserService
2021-09-24 09:26:43 -04:00
Awais Qureshi
ca8f964399 Update db.py 2021-09-23 20:01:08 +05:00
Awais Qureshi
70e594e63f fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 18:00:42 +05:00
Usama Sadiq
78799f25ee fix: Fixed new pylint warnings (#28726) 2021-09-23 17:54:27 +05:00
Usama Sadiq
023f4144ab fix: fix new pylint warnings (#28725) 2021-09-23 17:54:15 +05:00
Usama Sadiq
484cd536e2 fix: Fixed new pylint warnings (#28724) 2021-09-23 17:54:04 +05:00
Awais Qureshi
129a27314f fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 17:15:08 +05:00
Awais Qureshi
5772b89f54 fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 15:38:58 +05:00
Awais Qureshi
cb0a56fb0d fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 15:24:43 +05:00
Awais Qureshi
bae25765a6 fix: Added durable argument to transaction.atomic. It is implemented in django32. 2021-09-23 15:21:43 +05:00
Jillian Vogel
927016a8df 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.
2021-09-23 12:04:03 +09:30
Jillian Vogel
753839276f 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
2021-09-23 11:46:43 +09:30
Jillian Vogel
c41e7fb93a 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.
2021-09-23 11:41:43 +09:30
edX Transifex Bot
8fe01da8bc geoip2: update maxmind geolite country database 2021-09-23 02:29:25 +05:00
Felipe Montoya
dbb4658819 Merge pull request #28640 from eduNEXT/MJG/2nd_batch_openedx_events
[BD-32] feat: add 2nd batch of Open edX Events
2021-09-22 14:12:06 -05:00
Matjaz Gregoric
5487ff5906 Fix RTL issue with capa problems (#28562)
* fix: resolve styling cap RTL styling issue

Margins were incorrect in the RTL version of the stylesheet.

* fix: move style overrides from lms-course to capa

These styles were only applied to the LTR version of the stylesheet, but
we want them in the RTL version as well.
2021-09-21 10:44:35 -04:00
Phillip Shiu
6d7dcef8d6 fix: correct typo, content is locked, not lost (#28802) 2021-09-21 09:49:55 -04:00
Sarina Canelake
c699923d03 Merge pull request #28628 from edx/sarina/i18n-tuneup
fix: abstract edX-specific strings
2021-09-21 08:57:58 -04:00
julianajlk
42d79c5ef5 fix: get correct root URL for Track Selection page (#28772)
REV-2387
2021-09-20 09:56:42 -04:00
sarina
0c74d347f7 fix: abstract edX-specific strings 2021-09-19 14:01:20 -04:00
Jawayria
60f8bb0053 Merge pull request #28706 from edx/jawayria/bom-2784
fix: Updated the error message in test_bulk_change_enrollment
2021-09-16 17:02:02 +05:00
edX Transifex Bot
60a5045e29 geoip2: update maxmind geolite country database 2021-09-16 02:19:24 +05:00
Phillip Shiu
b6e79c6dc8 fix: review comments on names and link variables 2021-09-15 15:20:23 -04:00
Maria Grimaldi
1c447e6176 feat: add 2nd batch of Open edX Events
* Add COURSE_ENROLLMENT_CHANGED: sent after the enrollment update
* Add COURSE_UNENROLLMENT_COMPLETED: sent after the user's unenrollment
* Add CERTIFICATE_CREATED after the user's certificate generation has
been completed
* Add CERTIFICATE_CHANGED: after the certification update has been
completed
* Add CERTIFICATE_REVOKED: after the certificate revocation has been
completed
* Add COHORT_MEMBERSHIP_CHANGED: when a cohort membership update ends
2021-09-15 14:50:28 -04:00
Phillip Shiu
8e0f7920bf style: fix pycodestyle issues 2021-09-15 13:09:27 -04:00
Phillip Shiu
09809f322e fix: add unit test
Pulled from @julianajlk's WIP, thank you!
2021-09-15 12:14:39 -04:00
Phillip Shiu
9d259d7a99 refactor: remove folder track_selection_types 2021-09-15 12:08:21 -04:00
Phillip Shiu
5cf419b9f6 refactor: add _redirect_to_course_or_dashboard 2021-09-15 12:08:20 -04:00
Phillip Shiu
2997e23f83 refactor: s/full_fbe/fbe, s/partial_fbe/unfbe + unfbe logic 2021-09-15 12:08:20 -04:00
Phillip Shiu
830878729d style: chop long lines 2021-09-15 12:08:20 -04:00
Phillip Shiu
1bafc0ff27 fix: remove check for verified - already performed earlier 2021-09-15 12:08:20 -04:00
Phillip Shiu
a8e841f523 fix: add track selection redirection for partial_fbe.html 2021-09-15 12:08:20 -04:00
Phillip Shiu
359f3cf3f6 fix: add partial_fbe.html 2021-09-15 12:08:20 -04:00
Phillip Shiu
2e5b922692 fix: abstract track selection bullets into new mako template 2021-09-15 12:08:08 -04:00
julianajlk
519872a993 feat: add SVGs for icons in Track Selection, refactor URLs and tests (#28701)
REV-2133
2021-09-15 09:37:31 -04:00
Shafqat Farhan
39ee98420a fix: VAN-474 - Deleted cookie for activation popup 2021-09-15 13:56:53 +05:00
Farhaan Bukhsh
48ad7effb1 feat: grant course/library creation rights by organization (#26616)
Current State (before this commit):

  Studio, as of today doesn't have a way to restrict a user to
  create a course in a particular organization. What Studio
  provides right now is a CourseCreator permission which gives
  an Admin the power to grant a user the permission to create
  a course.

  For example: If the Admin has given a user Spiderman the
  permission to create courses, Spiderman can now create courses
  in any organization i.e Marvel as well as DC.
  There is no way to restrict Spiderman from creating courses
  under DC.

Purpose of this commit:

  The changes done here gives Admin the ability to restrict a
  user on an Organization level from creating courses via the
  Course Creators section of the Studio Django administration
  panel.

  For example: Now, the Admin can give the user Spiderman the
  privilege of creating courses only under Marvel organization.
  The moment Spiderman tries to create a course under some
  other organization(i.e DC), Studio will show an error message.

  This change is available to all Studio instances that
  enable the FEATURES['ENABLE_CREATOR_GROUP'] flag.
  Regardless of the flag, it will not affect any instances that choose
  not to use it.

BB-3622
2021-09-10 12:43:26 -04:00
Michael Terry
d5bacad86f Merge pull request #28698 from edx/mikix/hide-after-due-mfe
feat: notify MFE when a sequence is hidden-after-due
2021-09-10 09:12:57 -04:00
Jawayria
563f0a8462 fixed quality 2021-09-10 16:58:13 +05:00
Jawayria
06be2cfccd fix: Updated the error message in test_bulk_change_enrollment 2021-09-10 15:43:28 +05:00