Merge pull request #28815 from edx/bseverino/remove-proctoring-mfe-flags

[MST-938] Remove special exam MFE flags
This commit is contained in:
Bianca Severino
2021-09-22 09:59:58 -04:00
committed by GitHub
5 changed files with 0 additions and 115 deletions

View File

@@ -116,8 +116,6 @@ class CourseInfoSerializer(serializers.Serializer): # pylint: disable=abstract-
verify_identity_url = AbsoluteURLField()
verification_status = serializers.CharField()
linkedin_add_to_profile_url = serializers.URLField()
is_mfe_special_exams_enabled = serializers.BooleanField()
is_mfe_proctored_exams_enabled = serializers.BooleanField()
user_needs_integrity_signature = serializers.BooleanField()
def __init__(self, *args, **kwargs):

View File

@@ -101,8 +101,6 @@
"verify_identity_url": null,
"verification_status": "none",
"linkedin_add_to_profile_url": null,
"is_mfe_special_exams_enabled": false,
"is_mfe_proctored_exams_enabled": false,
"user_needs_integrity_signature": false
},
"matchingRules": {
@@ -238,12 +236,6 @@
"$.body.verification_status": {
"match": "type"
},
"$.body.is_mfe_special_exams_enabled": {
"match": "type"
},
"$.body.is_mfe_proctored_exams_enabled": {
"match": "type"
},
"$.body.user_needs_integrity_signature": {
"match": "type"
}

View File

@@ -26,8 +26,6 @@ from lms.djangoapps.courseware.tests.helpers import MasqueradeMixin
from lms.djangoapps.courseware.toggles import (
COURSEWARE_MICROFRONTEND_PROGRESS_MILESTONES,
COURSEWARE_MICROFRONTEND_PROGRESS_MILESTONES_STREAK_CELEBRATION,
COURSEWARE_MICROFRONTEND_SPECIAL_EXAMS,
COURSEWARE_MICROFRONTEND_PROCTORED_EXAMS,
)
from lms.djangoapps.courseware.toggles import COURSEWARE_MFE_MILESTONES_STREAK_DISCOUNT
from lms.djangoapps.verify_student.services import IDVerificationService
@@ -322,23 +320,6 @@ class CourseApiTestViews(BaseCoursewareTests, MasqueradeMixin):
assert celebrations['streak_discount_enabled'] is False
mock_segment_track.assert_not_called()
@ddt.data(
(False, False),
(False, True),
(True, False),
(True, True),
)
@ddt.unpack
def test_special_exams_enabled_for_course(self, is_globally_enabled, is_waffle_enabled):
""" Ensure that special exams flag present in courseware meta data with expected value """
with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_SPECIAL_EXAMS': is_globally_enabled}):
with override_waffle_flag(COURSEWARE_MICROFRONTEND_SPECIAL_EXAMS, active=is_waffle_enabled):
response = self.client.get(self.url)
assert response.status_code == 200
courseware_data = response.json()
assert 'is_mfe_special_exams_enabled' in courseware_data
assert courseware_data['is_mfe_special_exams_enabled'] == (is_globally_enabled and is_waffle_enabled)
@ddt.data(
(None, False, False, False),
('verified', False, False, True),
@@ -369,23 +350,6 @@ class CourseApiTestViews(BaseCoursewareTests, MasqueradeMixin):
assert 'user_needs_integrity_signature' in courseware_data
assert courseware_data['user_needs_integrity_signature'] == needs_integrity_signature
@ddt.data(
(False, False),
(False, True),
(True, False),
(True, True),
)
@ddt.unpack
def test_proctored_exams_enabled_for_course(self, is_globally_enabled, is_waffle_enabled):
""" Ensure that proctored exams flag present in courseware meta data with expected value """
with mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_SPECIAL_EXAMS': is_globally_enabled}):
with override_waffle_flag(COURSEWARE_MICROFRONTEND_PROCTORED_EXAMS, active=is_waffle_enabled):
response = self.client.get(self.url)
assert response.status_code == 200
courseware_data = response.json()
assert 'is_mfe_proctored_exams_enabled' in courseware_data
assert courseware_data['is_mfe_proctored_exams_enabled'] == (is_globally_enabled and is_waffle_enabled)
@ddt.ddt
class SequenceApiTestViews(MasqueradeMixin, BaseCoursewareTests):

View File

@@ -4,7 +4,6 @@ Course API Views
from completion.exceptions import UnavailableCompletionData
from completion.utilities import get_key_to_last_completed_block
from django.conf import settings
from django.urls import reverse
from django.utils.translation import ugettext as _
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
@@ -38,8 +37,6 @@ from lms.djangoapps.courseware.toggles import (
courseware_legacy_is_visible,
courseware_mfe_is_visible,
course_exit_page_is_active,
mfe_special_exams_is_active,
mfe_proctored_exams_is_active,
)
from lms.djangoapps.courseware.views.views import get_cert_data
from lms.djangoapps.grades.api import CourseGradeFactory
@@ -121,14 +118,6 @@ class CoursewareMeta:
is_course_staff=self.original_user_is_staff
)
@property
def is_mfe_special_exams_enabled(self):
return settings.FEATURES.get('ENABLE_SPECIAL_EXAMS', False) and mfe_special_exams_is_active(self.course_key)
@property
def is_mfe_proctored_exams_enabled(self):
return settings.FEATURES.get('ENABLE_SPECIAL_EXAMS', False) and mfe_proctored_exams_is_active(self.course_key)
@property
def enrollment(self):
"""