Commit Graph

381 Commits

Author SHA1 Message Date
Usama Sadiq
3e6b3e41f8 refactor: remove unused imports (#27084) 2021-03-24 17:55:04 +05:00
Awais Qureshi
4a11c86533 Pyupgrade in common/djangoapps/coursemodes. 2021-03-18 12:23:52 +05:00
Awais Qureshi
18c1d871df Pyupgrade in common/djangoapps/coursemodes. 2021-03-18 12:00:26 +05:00
Awais Qureshi
356f169a47 Pyupgrade in common/djangoapps/coursemodes. 2021-03-18 11:19:46 +05:00
Christie Rice
90f5e42dbd MICROBA-1055 Require a valid enrollment mode, even on the allowlist (#27012) 2021-03-16 09:37:27 -04:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Jawayria
ebc6044c10 BOM-2028: Removed unused imports from common/djangoapps/{course_modes, edxmako, entitlements} 2021-02-23 19:30:09 +05:00
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00
Aarif
7dfd6edd23 replaced unittest assertions pytest assertions (#26524) 2021-02-18 18:08:23 +05:00
usamasadiq
515458b9dc Applied pylint-amnesty 2021-02-02 17:59:20 +05:00
Simon Chen
00ad36839d MST-542 Roll out Accounts MFE IDV workflow (#25613)
* MST-542 remove the IDV redirect to Account MFE waffle flag to permanently redirect learners to new IDV workflow. This completes the rollout process on edx-platform
2020-12-01 09:08:12 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Michael Terry
b2ba363f1e Merge pull request #25503 from edx/mikix/parent-access
AA-408: Treat group_access as inheritable in gating transformer
2020-11-06 11:40:58 -05:00
Simon Chen
a900cec9e7 MST-338 Update other outstanding links to old IDV into new IDV flow (#25526) 2020-11-05 20:43:24 -05:00
Michael Terry
f2d4e0ccec AA-408: Treat group_access as inheritable in gating transformer
ContentTypeGateTransformer was not considering parent values of
'group_access' when providing its own default value for it.

Also fix a few minor bugs around the place.
2020-11-05 15:27:46 -05:00
Matt Tuchfarber
488f30496e Add Executive Education course mode 2020-10-27 09:38:20 -04:00
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04:00
Matt Tuchfarber
c4cf0b9bb7 Refactor program type enrollment checks
Checking if a user was enrolled in a program type was using the `name`
field which is subject to be translated. This change allows for us to check by
the type's slug which will be constant. This also includes the addition
of api.py files for the course_modes, catalog, and programs apps.
2020-08-26 14:29:39 -04:00
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04:00
Aarif
9e34cb3df9 Removed deprecated future imports (#24295) 2020-06-28 23:40:03 +05:00
Luis Moreno
5fe377cc77 Attempt to fix db sync problem for python3.8 2020-06-24 11:58:23 -04:00
Aarif
27480cdd2f Removed deprecated future imports 2020-06-23 18:51:43 +05:00
Michael Roytman
681c3ebed0 Merge pull request #23873 from edx/mroytman/MST-181-program-enrollment-sync-support-tool
MST-181: Add the ability to unlink and relink Program Enrollments via Support Tool to Address SSO Issues
2020-05-07 09:25:54 -04:00
Michael Roytman
38c255dbd2 Enhance the Link Program Enrollments Support Tool to handle the case of linking a learner to a ProgramEnrollment that is already linked to a different edX account.
In this case,
* unenroll the currently linked learner from the courses associated with related ProgramCourseEnrollments
* for each course the is enrolled in as part of a ProgramCourseEnrollment, if the coures has an audit track, then move the enrollment into the audit track. Otherwise, keep the learner's enrollment in the existing track.
* link the new user to the ProgramEnrollment
* enroll the new user in the Master's track in the courses associated with related ProgramCourseEnrollments
2020-05-06 10:15:42 -04:00
Feanil Patel
a0f81a17ee Revert "Revert "We don't run into this case anymore so remove it."" 2020-05-05 11:49:18 -04:00
Feanil Patel
ba2c712e4e Revert "We don't run into this case anymore so remove it." 2020-05-04 14:28:54 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Feanil Patel
ff6c0dfa6b We don't run into this case anymore so remove it.
This was added in here as a shim to catch places that were still using
the old version of these models that had an attribute called course_id
instead of the `course` foreign key.  After monitoring production for
two weeks, we can be pretty confident that we've caught most places that
do this.  Removing this code since it should no longer be needed.
2020-04-23 16:27:12 -04:00
hasnain.naveed
dcace9cb4d ENT-2735 | Added more logging for e-commerce calculate endpoint. 2020-04-17 09:20:01 +05:00
hasnain.naveed
0d85a4ef14 Feedback. 2020-04-13 13:51:59 +05:00
hasnain.naveed
4cff92b0ad ENT-2735 | Added the payment message on track selection for learners in subsidy offer. 2020-04-10 16:07:49 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Diana Huang
99863aebff Remove course_id field from CourseMode.
Handle this change appropriately in CourseModeFactory.
2020-04-06 11:21:28 -04:00
Dillon Dumesnil
b9e6fdfdef Adding comment about div that can't be removed.
Also fixing Meta class being defined twice in one model
2020-03-18 11:45:19 -07:00
Robert Raposa
a4716c75cb fix tests 2020-02-27 08:58:45 -05:00
Robert Raposa
84686e81c3 BOM-1324: remove oauth2.enforce_jwt_scopes toggle
The oauth2.enforce_jwt_scopes waffle switch was added temporarily for
the rollout of jwt scopes. This removes the toggle and replacing code
with the equivalent of `oauth2.enforce_jwt_scopes` as True.
2020-02-27 08:58:45 -05:00
Dave St.Germain
592b34b998 Merge pull request #21158 from eduNEXT/lmm/add_currency_choose_template
Setting template to show currency defined in the course mode DB record
2020-02-19 11:46:49 -05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Diego Millan
2dd128bce0 Setting template to show currency defined in the course mode DB record 2020-02-17 11:45:50 -04:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Manjinder Singh
cea795b02e Added new auth class (#23018)
* Added new auth class

- Created new class called OAuth2AuthenticationAllowInactiveUser, which replaces old class with same name
- Renames previous  OAuth2AuthenticationAllowInactiveUser to  OAuth2AuthenticationAllowInactiveUserDeprecated
- Replaced all imports of  OAuth2AuthenticationAllowInactiveUser to call deprecated class instead
- testing new class in discussion(added flag based on django setting)
2020-02-06 10:37:27 -05:00
Calen Pennington
be5ca3dedd Add a test that shows that CourseModes aren't deleted when CourseOverview versions are updated 2020-01-16 12:07:27 -05:00
Calen Pennington
675b8c0d71 CourseOverviews may be deleted, but we don't want to delete related objects 2020-01-15 15:23:51 -05:00
Zulqarnain
cf58da6ee0 Update assertRedirects usage 2020-01-08 14:35:40 +05:00
David Ormsbee
2cb2265ffe Add request caching to reduce ORM queries
This adds request caching to the following places:
* course expiration wrapper (displayed in Units)
* offer banner generation (displayed in Units)
* get_enrollment
* user_by_anonymous_id
* youtube_disabled_for_course

On a sample course with edx-val enabled, this reduced the queries
for a large sequence from 450 to 155.
2019-12-30 16:19:25 -05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00