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
27 lines
749 B
Python
27 lines
749 B
Python
"""
|
|
Utility methods related to proctoring configurations.
|
|
"""
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
def requires_escalation_email(proctoring_provider):
|
|
"""
|
|
Returns the value of 'requires_escalation_email' in the given proctoring backend.
|
|
The default value for 'requires_escalation_email' is False.
|
|
"""
|
|
return settings.PROCTORING_BACKENDS.get(proctoring_provider, {}).get(
|
|
"requires_escalation_email", False
|
|
)
|
|
|
|
|
|
def show_review_rules(proctoring_provider):
|
|
"""
|
|
Returns the value of 'show_review_rules' in the given proctoring backend.
|
|
The default value for 'show_review_rules' is True.
|
|
"""
|
|
return settings.PROCTORING_BACKENDS.get(proctoring_provider, {}).get(
|
|
"show_review_rules", True
|
|
)
|