fix: gate lti tools frorm onboarding function (#34413)
* fix: gate lti tools frorm onboarding function - Block calls to does_backend_support_onboarding if the proctoring provider uses LTI * fix: LTI onboarding false by default
This commit is contained in:
@@ -1145,9 +1145,15 @@ def create_xblock_info( # lint-amnesty, pylint: disable=too-many-statements
|
||||
rules_url = settings.PROCTORING_SETTINGS.get("LINK_URLS", {}).get(
|
||||
"online_proctoring_rules", ""
|
||||
)
|
||||
supports_onboarding = does_backend_support_onboarding(
|
||||
course.proctoring_provider
|
||||
)
|
||||
|
||||
# Only call does_backend_support_onboarding if not using an LTI proctoring provider
|
||||
if course.proctoring_provider != 'lti_external':
|
||||
supports_onboarding = does_backend_support_onboarding(
|
||||
course.proctoring_provider
|
||||
)
|
||||
# NOTE: LTI proctoring doesn't support onboarding. If that changes, this value should change to True.
|
||||
else:
|
||||
supports_onboarding = False
|
||||
|
||||
proctoring_exam_configuration_link = None
|
||||
if xblock.is_proctored_exam:
|
||||
|
||||
@@ -302,10 +302,15 @@ def _section_special_exams(course, access):
|
||||
proctoring_provider = course.proctoring_provider
|
||||
escalation_email = None
|
||||
mfe_view_url = None
|
||||
if proctoring_provider == 'proctortrack':
|
||||
escalation_email = course.proctoring_escalation_email
|
||||
elif proctoring_provider == 'lti_external':
|
||||
if proctoring_provider == 'lti_external':
|
||||
mfe_view_url = f'{settings.EXAMS_DASHBOARD_MICROFRONTEND_URL}/course/{course_key}/exams/embed'
|
||||
# NOTE: LTI proctoring doesn't support onboarding. If that changes, this value should change to True.
|
||||
show_onboarding = False
|
||||
else:
|
||||
# Only call does_backend_support_onboarding if not using an LTI proctoring provider
|
||||
show_onboarding = does_backend_support_onboarding(course.proctoring_provider)
|
||||
if proctoring_provider == 'proctortrack':
|
||||
escalation_email = course.proctoring_escalation_email
|
||||
from edx_proctoring.api import is_backend_dashboard_available
|
||||
|
||||
section_data = {
|
||||
@@ -315,7 +320,7 @@ def _section_special_exams(course, access):
|
||||
'course_id': course_key,
|
||||
'escalation_email': escalation_email,
|
||||
'show_dashboard': is_backend_dashboard_available(course_key),
|
||||
'show_onboarding': does_backend_support_onboarding(course.proctoring_provider),
|
||||
'show_onboarding': show_onboarding,
|
||||
'mfe_view_url': mfe_view_url,
|
||||
}
|
||||
return section_data
|
||||
|
||||
Reference in New Issue
Block a user