Skip to content

Commit

Permalink
fix: gate lti tools frorm onboarding function (#34413)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ilee2u authored Mar 25, 2024
1 parent f944e67 commit 40744ec
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 9 additions & 4 deletions lms/djangoapps/instructor/views/instructor_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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
Expand Down

0 comments on commit 40744ec

Please sign in to comment.