Removed waffle flag for proctoring backend advanced setting (#24606)

* remove waffle flag for proctoring providers

removed waffle flag

removed tests

updates for requested changes

corrected mistake

Add edX Django Rest Framework Extensions CSRF App URLS to Studio

MST-334 Make sure the CSRF hooks are in INSTALLED_APPS on Studio (#24607)

ENT-2894: Use new welcome template when redirected from enterprise proxy login view (#24587)

* using new welcome template when redirected from enterprise proxy login view

* enabling safe redirects to enterprise learner portal from login in devstack

* ading admin portal to login redirect whitelist

* running make upgrade to version bump edx-enterprise

fix(i18n): update translations

Updating Python Requirements

[REV-1257] Add upsell tracking for upgrading all programs button on program dashboard (#24589)

Added upsell tracking to the course upgrade all button on the program dashboard so we have a better understanding of when users are clicking our upsell links.

POST proctored exam settings (#24597)

allow blank escalation email (#24613)

[BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536)

[BD-10] remove edx-pattern-library from JS bundles (#24165)

Co-authored-by: Sankar Raj <sankar.raj@crystaldelta.com>

Make the ExperimentWaffleFlag respect course masquerading when checking if it's active for a specific enrollment

[REV-1205] Add doc location comment so future devs can easily find it  (#24615)

AA-204: passing correct section information to frontend to complete outline portion of tab

AA-204: adding tests

AA-204: fixed up documentation and tests

[BD-10] Remove uses bootstrap method  (#24535)

Remove pattern library of certificate styles.

update search description on new search string (#24619)

* update search description on new search string

* disable xss-lint rule for jquery.html

make comment more general, to allow for future changes (#24618)

[BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591)

[BD-10] [DEPR-92] Remove directories that includes pattern-library. (#24602)

Add SSO Records endpoint for support tools

Bucket users regardless of enrollment in courseware MFE experiment

Updating Python Requirements

Change the default value of allow_proctoring_opt_out (#24626)

MST-333

ENT-3143: display message banner guiding user to their enterprise LP if enabled (#24625)

* display message banner guiding user to their enterprise LP if enabled

* adding new sass class name to use same styling as recovery email alert

Add "Source from library" XBlock

This lets the user import a block from a blockstore-based content library into a (modulestore based) course, by copying the block into the course.

Revert "[BD-10] [DEPR-92] Remove pattern library of certificate styles." (#24633)

Revert "[BD-10] [DEPR-92] Remove directories that includes pattern-library. (#24602)"

This reverts commit e4f28debb7.

Revert "[BD-10] [DEPR-92] Remove pattern library of pavelib folder (#24591)" (#24635)

This reverts commit 6980291d96.

allow plus or minus one (#24637)

geoip2: update maxmind geolite country database

fix keyerror with request.session (#24642)

* fix keyerror with request.session

* improve the conditional

AA-127: Created MFE Outline Tab Waffle Flag

Note: The team settled on raising a 404 when the waffle flag is disabled.
Upon receiving the 404, the frontend will redirect to the LMS.

Fixes session caching for enterprise portal links by only caching for auth'd learners

BUG: fixes for saml provider config/data lookup

Fix xss in edit member template

Fix xss while rendering file-upload

Fix xss in date

Fix xss in base site template

* revert

* removed from test_views
This commit is contained in:
alangsto
2020-08-13 11:37:17 -04:00
committed by GitHub
parent e74149e04d
commit 1f5b1e6c4d
4 changed files with 1 additions and 147 deletions

View File

@@ -31,11 +31,6 @@ def waffle_flags():
"""
return WaffleFlagNamespace(name=WAFFLE_NAMESPACE, log_prefix=u'Studio: ')
# Flags
ENABLE_PROCTORING_PROVIDER_OVERRIDES = CourseWaffleFlag(
waffle_namespace=waffle_flags(),
flag_name=u'enable_proctoring_provider_overrides',
)
# TODO: After removing this flag, add a migration to remove waffle flag in a follow-up deployment.
ENABLE_CHECKLISTS_QUALITY = CourseWaffleFlag(

View File

@@ -9,9 +9,7 @@ from rest_framework import status
from rest_framework.test import APITestCase
from opaque_keys.edx.keys import CourseKey
from contentstore.config.waffle import ENABLE_PROCTORING_PROVIDER_OVERRIDES
from lms.djangoapps.courseware.tests.factories import GlobalStaffFactory, InstructorFactory
from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_flag
from student.tests.factories import UserFactory
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
@@ -153,7 +151,6 @@ class ProctoringExamSettingsPostTests(ProctoringExamSettingsTestMixin, ModuleSto
'proctortrack': {}
},
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_update_exam_settings_200_escalation_email(self):
""" update exam settings for provider that requires an escalation email (proctortrack) """
self.client.login(username=self.global_staff.username, password=self.password)
@@ -188,7 +185,6 @@ class ProctoringExamSettingsPostTests(ProctoringExamSettingsTestMixin, ModuleSto
'test_proctoring_provider': {}
},
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_update_exam_settings_200_no_escalation_email(self):
""" escalation email may be blank if not required by the provider """
self.client.login(username=self.global_staff.username, password=self.password)
@@ -249,7 +245,6 @@ class ProctoringExamSettingsPostTests(ProctoringExamSettingsTestMixin, ModuleSto
'test_proctoring_provider': {}
},
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_update_exam_settings_invalid_value(self):
self.client.login(username=self.global_staff.username, password=self.password)
data = self.get_request_data(

View File

@@ -20,7 +20,6 @@ from milestones.tests.utils import MilestonesTestCaseMixin
from mock import Mock, patch
from pytz import UTC
from contentstore.config.waffle import ENABLE_PROCTORING_PROVIDER_OVERRIDES
from contentstore.utils import reverse_course_url, reverse_usage_url
from course_modes.models import CourseMode
from models.settings.course_grading import GRADING_POLICY_CHANGED_EVENT_TYPE, CourseGradingModel, hash_grading_policy
@@ -1290,14 +1289,6 @@ class CourseMetadataEditingTest(CourseTestCase):
})
self.assertEqual(response.status_code, 200)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_proctoring_provider_present_when_waffle_flag_enabled(self):
"""
Tests that proctoring provider field is not filtered out when the waffle flag is enabled.
"""
test_model = CourseMetadata.fetch(self.fullcourse)
self.assertIn('proctoring_provider', test_model)
@ddt.data(True, False)
@override_settings(
PROCTORING_BACKENDS={
@@ -1306,10 +1297,9 @@ class CourseMetadataEditingTest(CourseTestCase):
},
PARTNER_SUPPORT_EMAIL='support@foobar.com'
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_does_not_allow_proctoring_provider_changes_after_course_start(self, staff_user):
"""
Course staff cannot modify proctoring provder after the course start date.
Course staff cannot modify proctoring provider after the course start date.
Only admin users may update the provider if the course has started.
"""
field_name = "proctoring_provider"
@@ -1340,118 +1330,6 @@ class CourseMetadataEditingTest(CourseTestCase):
)
self.assertIsNone(test_model)
@ddt.data(True, False)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, False)
def test_validate_update_allows_changes_to_settings_when_proctoring_provider_disabled(self, staff_user):
"""
Course staff can modify Advanced Settings when the proctoring_provider settings is not available (i.e. when
the ENABLE_PROCTORING_PROVIDER_OVERRIDES is not enabled for the course). This ensures that our restrictions
on changing the proctoring_provider do not inhibit users from changing Advanced Settings when the
proctoring_provider setting is not available.
"""
# It doesn't matter what the field is - just check that we can change any field.
field_name = "enable_proctored_exams"
course = CourseFactory.create(start=datetime.datetime.now(UTC) - datetime.timedelta(days=1))
user = UserFactory.create(is_staff=staff_user)
did_validate, errors, test_model = CourseMetadata.validate_and_update_from_json(
course,
{
field_name: {"value": True},
},
user=user
)
self.assertTrue(did_validate)
self.assertEqual(len(errors), 0)
self.assertIn(field_name, test_model)
@override_settings(
PROCTORING_BACKENDS={
'DEFAULT': 'test_proctoring_provider',
'test_proctoring_provider': {}
}
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_does_not_filter_out_proctoring_provider_when_waffle_flag_enabled(self):
"""
Tests that proctoring provider field is returned by validate_and_update_from_json method when
waffle flag is enabled.
"""
field_name = "proctoring_provider"
_, _, test_model = CourseMetadata.validate_and_update_from_json(
self.course,
{
field_name: {"value": 'test_proctoring_provider'},
},
user=self.user
)
self.assertIn(field_name, test_model)
@override_settings(
PROCTORING_BACKENDS={
'DEFAULT': 'test_proctoring_provider',
'test_proctoring_provider': {}
}
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_update_from_json_does_not_filter_out_proctoring_provider_when_waffle_flag_enabled(self):
"""
Tests that proctoring provider field is returned by update_from_json method when
waffle flag is enabled.
"""
field_name = "proctoring_provider"
test_model = CourseMetadata.update_from_json(
self.course,
{
field_name: {"value": 'test_proctoring_provider'},
},
user=self.user
)
self.assertIn(field_name, test_model)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, False)
def test_proctoring_provider_not_present_when_waffle_flag_not_enabled(self):
"""
Tests that proctoring provider field is filtered out when the waffle flag is not enabled.
"""
test_model = CourseMetadata.fetch(self.fullcourse)
self.assertNotIn('proctoring_provider', test_model)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, False)
def test_validate_update_does_filter_out_proctoring_provider_when_waffle_flag_not_enabled(self):
"""
Tests that proctoring provider field is not returned by validate_and_update_from_json method when
waffle flag is not enabled.
"""
field_name = "proctoring_provider"
_, _, test_model = CourseMetadata.validate_and_update_from_json(
self.course,
{
field_name: {"value": 'test_proctoring_provider'},
},
user=self.user
)
self.assertNotIn(field_name, test_model)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, False)
def test_update_from_json_does_filter_out_proctoring_provider_when_waffle_flag_not_enabled(self):
"""
Tests that proctoring provider field is not returned by update_from_json method when
waffle flag is not enabled.
"""
field_name = "proctoring_provider"
test_model = CourseMetadata.update_from_json(
self.course,
{
field_name: {"value": 'test_proctoring_provider'},
},
user=self.user
)
self.assertNotIn(field_name, test_model)
@ddt.data(True, False)
@override_settings(
PROCTORING_BACKENDS={
@@ -1461,7 +1339,6 @@ class CourseMetadataEditingTest(CourseTestCase):
},
FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True},
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_requires_escalation_email_for_proctortrack(self, include_blank_email):
json_data = {
"proctoring_provider": {"value": 'proctortrack'},
@@ -1489,7 +1366,6 @@ class CourseMetadataEditingTest(CourseTestCase):
'proctortrack': {}
}
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_does_not_require_escalation_email_by_default(self):
did_validate, errors, test_model = CourseMetadata.validate_and_update_from_json(
self.course,
@@ -1509,7 +1385,6 @@ class CourseMetadataEditingTest(CourseTestCase):
},
FEATURES={'ENABLE_EXAM_SETTINGS_HTML_VIEW': True},
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_cannot_unset_escalation_email_when_proctortrack_is_provider(self):
course = CourseFactory.create()
CourseMetadata.update_from_dict({"proctoring_provider": 'proctortrack'}, course, self.user)
@@ -1534,7 +1409,6 @@ class CourseMetadataEditingTest(CourseTestCase):
'proctortrack': {}
}
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_set_proctortrack_provider_with_valid_escalation_email(self):
did_validate, errors, test_model = CourseMetadata.validate_and_update_from_json(
self.course,
@@ -1555,7 +1429,6 @@ class CourseMetadataEditingTest(CourseTestCase):
'proctortrack': {}
}
)
@override_waffle_flag(ENABLE_PROCTORING_PROVIDER_OVERRIDES, True)
def test_validate_update_escalation_email_not_requirement_disabled(self):
"""
Tests the escalation email is not required if 'ENABLED_EXAM_SETTINGS_HTML_VIEW'

View File

@@ -13,7 +13,6 @@ import pytz
from six import text_type
from xblock.fields import Scope
from cms.djangoapps.contentstore.config.waffle import ENABLE_PROCTORING_PROVIDER_OVERRIDES
from openedx.features.course_experience import COURSE_ENABLE_UNENROLLED_ACCESS_FLAG
from student.roles import GlobalStaff
from xblock_django.models import XBlockStudioConfigurationFlag
@@ -129,11 +128,6 @@ class CourseMetadata(object):
if not XBlockStudioConfigurationFlag.is_enabled():
exclude_list.append('allow_unsupported_xblocks')
# If the ENABLE_PROCTORING_PROVIDER_OVERRIDES waffle flag is not enabled,
# do not show "Proctoring Configuration" in Studio Advanced Settings.
if not ENABLE_PROCTORING_PROVIDER_OVERRIDES.is_enabled(course_key):
exclude_list.append('proctoring_provider')
# Do not show "Course Visibility For Unenrolled Learners" in Studio Advanced Settings
# if the enable_anonymous_access flag is not enabled
if not COURSE_ENABLE_UNENROLLED_ACCESS_FLAG.is_enabled(course_key=course_key):
@@ -342,9 +336,6 @@ class CourseMetadata(object):
"""
Return whether the requested proctoring provider is different than the current proctoring provider, indicating
that the user has requested a change to the proctoring_provider Advanced Setting.
The requested_provider will be None if the proctoring_provider setting is not available (e.g. if the
ENABLE_PROCTORING_PROVIDER_OVERRIDES waffle flag is not enabled for the course). In this case, we consider
that there is no change in the requested proctoring provider.
"""
if requested_provider is None:
return False