feat!: Remove proctortrack references; add requires_escalation_email and show_review_rules options (#37576)
BREAKING CHANGE: All references to the hardcoded 'proctortrack' string have been removed from the codebase, as well as the `studio.show_review_rules` waffle flag. These were used to determine whether an escalation email is required and whether review rules should be shown. These decisions are now made based on the value of 'requires_escalation_email' (default False) and 'show_review_rules' (default True) config items in the PROCTORING_BACKENDS entry. Additionally: * The proctoring info api will now return the list of providers which require an escalation email so that frontend-app-learning does not need to use a hardcoded check agaist the provider name 'proctortrack'. * Removed translation commands, mock variables and user facing strings that contained 'proctortrack'. * Updated all test cases that were using proctortrack to use fake providers names. Part of: https://github.com/openedx/edx-platform/issues/36329
This commit is contained in:
@@ -283,7 +283,10 @@ class ProctoringProvider(String):
|
||||
return default
|
||||
|
||||
|
||||
def get_available_providers(): # lint-amnesty, pylint: disable=missing-function-docstring
|
||||
def get_available_providers() -> list[str]:
|
||||
"""
|
||||
Return list of available proctoring providers.
|
||||
"""
|
||||
proctoring_backend_settings = getattr(
|
||||
settings,
|
||||
'PROCTORING_BACKENDS',
|
||||
@@ -296,6 +299,24 @@ def get_available_providers(): # lint-amnesty, pylint: disable=missing-function
|
||||
return available_providers
|
||||
|
||||
|
||||
def get_requires_escalation_email_providers() -> list[str]:
|
||||
"""
|
||||
Return list of available proctoring providers that require an escalation email.
|
||||
"""
|
||||
requires_escalation_email_providers = [
|
||||
provider
|
||||
for provider in settings.PROCTORING_BACKENDS
|
||||
if provider != "DEFAULT"
|
||||
and settings.PROCTORING_BACKENDS[provider].get(
|
||||
"requires_escalation_email", False
|
||||
)
|
||||
]
|
||||
# Add lti_external unconditionally since it always requires an escalation email
|
||||
requires_escalation_email_providers.append('lti_external')
|
||||
requires_escalation_email_providers.sort()
|
||||
return requires_escalation_email_providers
|
||||
|
||||
|
||||
class TeamsConfigField(Dict):
|
||||
"""
|
||||
XBlock field for teams configuration, including definitions for teamsets.
|
||||
@@ -878,9 +899,9 @@ class CourseFields: # lint-amnesty, pylint: disable=missing-class-docstring
|
||||
)
|
||||
|
||||
proctoring_escalation_email = EmailString(
|
||||
display_name=_("Proctortrack Exam Escalation Contact"),
|
||||
display_name=_("Proctoring Exam Escalation Contact"),
|
||||
help=_(
|
||||
"Required if 'proctortrack' is selected as your proctoring provider. "
|
||||
"Required if 'requires_escalation_email' is set in the proctoring backend."
|
||||
"Enter an email address to be contacted by the support team whenever there are escalations "
|
||||
"(e.g. appeals, delayed reviews, etc.)."
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user