refactor!: remove redundant ENABLE_COURSEWARE_MICROFRONTEND toggle (#26792)

The Django setting
FEATURES['ENABLE_COURSEWARE_MICROFRONTEND']
has been an additional gate to activating
usage of the Learning MFE for an Open edX
instance.

The toggle is redundant with the
`courseware.courseware_mfe`
Waffle flag. By removing it, we simplify our config
and simplify our path towards making the Learning MFE
the default courseware experience.

TNL-7796
This commit is contained in:
Kyle McCormick
2021-03-02 11:36:43 -05:00
committed by GitHub
parent dd96a2aa72
commit e792242b5f
7 changed files with 13 additions and 74 deletions

View File

@@ -89,20 +89,14 @@ class CoursewareMeta:
This method is the "opposite" of _redirect_to_learning_mfe in
lms/djangoapps/courseware/views/index.py. But not exactly...
1. It needs to respect the global
ENABLE_COURSEWARE_MICROFRONTEND feature flag and redirect users
out of the MFE experience if it's turned off.
2. It needs to redirect for old Mongo courses.
3. It does NOT need to worry about exams - the MFE will handle
1. It needs to redirect for old Mongo courses.
2. It does NOT need to worry about exams - the MFE will handle
those on its own. As of this writing, it will redirect back to
the LMS experience, but that may change soon.
4. Finally, it needs to redirect users who are bucketed out of
3. Finally, it needs to redirect users who are bucketed out of
the MFE experience, but who aren't staff. Staff are allowed to
stay.
"""
# REDIRECT: feature disabled globally
if not settings.FEATURES.get('ENABLE_COURSEWARE_MICROFRONTEND'):
return False
# REDIRECT: Old Mongo courses, until removed from platform
if self.course_key.deprecated:
return False