fix: also filter for show_dashboard for instructor (#34949)
* fix: also filter for show_dashboard for instructor * temp: attempting to craft tests * chore: lint * test: fixed xblock tests
This commit is contained in:
@@ -302,16 +302,20 @@ def _section_special_exams(course, access):
|
||||
proctoring_provider = course.proctoring_provider
|
||||
escalation_email = None
|
||||
mfe_view_url = None
|
||||
show_dashboard = None
|
||||
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
|
||||
# Dashboard should always appear with LTI proctoring
|
||||
show_dashboard = True
|
||||
else:
|
||||
# Only call does_backend_support_onboarding if not using an LTI proctoring provider
|
||||
# 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
|
||||
from edx_proctoring.api import is_backend_dashboard_available
|
||||
show_dashboard = is_backend_dashboard_available(course_key)
|
||||
|
||||
section_data = {
|
||||
'section_key': 'special_exams',
|
||||
@@ -319,7 +323,7 @@ def _section_special_exams(course, access):
|
||||
'access': access,
|
||||
'course_id': course_key,
|
||||
'escalation_email': escalation_email,
|
||||
'show_dashboard': is_backend_dashboard_available(course_key),
|
||||
'show_dashboard': show_dashboard,
|
||||
'show_onboarding': show_onboarding,
|
||||
'mfe_view_url': mfe_view_url,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user