From 1d667e8b0f14e9e1cde13f1cc7c4c0dc07bbf9a4 Mon Sep 17 00:00:00 2001 From: Bianca Severino Date: Wed, 3 Feb 2021 11:13:06 -0500 Subject: [PATCH] Add onboarding status view to instructor dashboard --- .../instructor/views/instructor_dashboard.py | 2 ++ .../js/instructor_dashboard/instructor_dashboard.js | 3 +++ .../sass/course/instructor/_instructor_2.scss | 13 +++++++++---- .../instructor_dashboard_2/special_exams.html | 12 +++++++++--- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/testing.txt | 2 +- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index d24c9bc954..9286e719e8 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -20,6 +20,7 @@ from django.utils.translation import ugettext_noop from django.views.decorators.cache import cache_control from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_POST +from edx_proctoring.api import does_backend_support_onboarding from edx_when.api import is_enabled_for_course from mock import patch from opaque_keys import InvalidKeyError @@ -277,6 +278,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), 'enable_exam_resume_proctoring_improvements': EXAM_RESUME_PROCTORING_IMPROVEMENTS.is_enabled(course.id), } return section_data diff --git a/lms/static/js/instructor_dashboard/instructor_dashboard.js b/lms/static/js/instructor_dashboard/instructor_dashboard.js index 12bca47788..6314a08bd3 100644 --- a/lms/static/js/instructor_dashboard/instructor_dashboard.js +++ b/lms/static/js/instructor_dashboard/instructor_dashboard.js @@ -203,6 +203,9 @@ such that the value can be defined later than this assignment (file load order). { constructor: edx.instructor_dashboard.proctoring.ProctoredExamAllowanceView, $element: idashContent.find('.' + CSS_IDASH_SECTION + '#special_exams') + }, { + constructor: edx.instructor_dashboard.proctoring.ProctoredExamOnboardingView, + $element: idashContent.find('.' + CSS_IDASH_SECTION + '#special_exams') }, { constructor: edx.instructor_dashboard.proctoring.ProctoredExamAttemptView, $element: idashContent.find('.' + CSS_IDASH_SECTION + '#special_exams') diff --git a/lms/static/sass/course/instructor/_instructor_2.scss b/lms/static/sass/course/instructor/_instructor_2.scss index 793bdff06c..fa02ef3688 100644 --- a/lms/static/sass/course/instructor/_instructor_2.scss +++ b/lms/static/sass/course/instructor/_instructor_2.scss @@ -2587,9 +2587,11 @@ input[name="subject"] { } .special-allowance-container, +.student-onboarding-status-container, .student-proctored-exam-container { .allowance-table, - .exam-attempts-table { + .exam-attempts-table, + .onboarding-status-table { width: 100%; tr:nth-child(even) { @@ -2598,7 +2600,8 @@ input[name="subject"] { } .allowance-headings, - .exam-attempt-headings { + .exam-attempt-headings, + .onboarding-status-headings { height: 40px; border-bottom: 1px solid #bebebe; @@ -2718,7 +2721,8 @@ input[name="subject"] { } .exam-attempts-content, - .exam-allowances-content { + .exam-allowances-content, + .onboarding-status-content { padding-left: 0; padding-right: 0; } @@ -2727,7 +2731,8 @@ input[name="subject"] { margin-top: -30px; margin-bottom: 20px; - .search-attempts { + .search-attempts, + .search-onboarding { border: 1px solid #ccc; display: inline-block; border-radius: 5px; diff --git a/lms/templates/instructor/instructor_dashboard_2/special_exams.html b/lms/templates/instructor/instructor_dashboard_2/special_exams.html index 5004a3a105..063d66c5d2 100644 --- a/lms/templates/instructor/instructor_dashboard_2/special_exams.html +++ b/lms/templates/instructor/instructor_dashboard_2/special_exams.html @@ -10,16 +10,22 @@ import pytz % endif
-

${_('Allowance Section')}

+

${_('Allowance Section')}

+ % if section_data['show_onboarding'] and section_data['enable_exam_resume_proctoring_improvements']:
-

${_('Student Special Exam Attempts')}

+

${_('Student Onboarding Status')}

+
+
+ % endif +
+

${_('Student Special Exam Attempts')}

% if section_data['show_dashboard']:
-

${_('Review Dashboard')}

+

${_('Review Dashboard')}

% endif diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index ccf4d47311..18bf9a6578 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -106,7 +106,7 @@ edx-milestones==0.3.0 # via -r requirements/edx/base.in edx-opaque-keys[django]==2.2.0 # via -r requirements/edx/paver.txt, edx-bulk-grades, edx-ccx-keys, edx-completion, edx-drf-extensions, edx-enterprise, edx-milestones, edx-organizations, edx-proctoring, edx-user-state-client, edx-when, lti-consumer-xblock, xmodule edx-organizations==6.9.0 # via -r requirements/edx/base.in edx-proctoring-proctortrack==1.0.5 # via -r requirements/edx/base.in -edx-proctoring==3.2.1 # via -r requirements/edx/base.in, edx-proctoring-proctortrack +edx-proctoring==3.3.0 # via -r requirements/edx/base.in, edx-proctoring-proctortrack edx-rbac==1.4.1 # via edx-enterprise edx-rest-api-client==5.3.0 # via -r requirements/edx/base.in, edx-enterprise, edx-proctoring edx-search==3.0.0 # via -r requirements/edx/base.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index be5c204e3b..414364b53d 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -118,7 +118,7 @@ edx-milestones==0.3.0 # via -r requirements/edx/testing.txt edx-opaque-keys[django]==2.2.0 # via -r requirements/edx/testing.txt, edx-bulk-grades, edx-ccx-keys, edx-completion, edx-drf-extensions, edx-enterprise, edx-milestones, edx-organizations, edx-proctoring, edx-user-state-client, edx-when, lti-consumer-xblock, xmodule edx-organizations==6.9.0 # via -r requirements/edx/testing.txt edx-proctoring-proctortrack==1.0.5 # via -r requirements/edx/testing.txt -edx-proctoring==3.2.1 # via -r requirements/edx/testing.txt, edx-proctoring-proctortrack +edx-proctoring==3.3.0 # via -r requirements/edx/testing.txt, edx-proctoring-proctortrack edx-rbac==1.4.1 # via -r requirements/edx/testing.txt, edx-enterprise edx-rest-api-client==5.3.0 # via -r requirements/edx/testing.txt, edx-enterprise, edx-proctoring edx-search==3.0.0 # via -r requirements/edx/testing.txt diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index eb57ea71cb..8c75ba804c 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -115,7 +115,7 @@ edx-milestones==0.3.0 # via -r requirements/edx/base.txt edx-opaque-keys[django]==2.2.0 # via -r requirements/edx/base.txt, edx-bulk-grades, edx-ccx-keys, edx-completion, edx-drf-extensions, edx-enterprise, edx-milestones, edx-organizations, edx-proctoring, edx-user-state-client, edx-when, lti-consumer-xblock, xmodule edx-organizations==6.9.0 # via -r requirements/edx/base.txt edx-proctoring-proctortrack==1.0.5 # via -r requirements/edx/base.txt -edx-proctoring==3.2.1 # via -r requirements/edx/base.txt, edx-proctoring-proctortrack +edx-proctoring==3.3.0 # via -r requirements/edx/base.txt, edx-proctoring-proctortrack edx-rbac==1.4.1 # via -r requirements/edx/base.txt, edx-enterprise edx-rest-api-client==5.3.0 # via -r requirements/edx/base.txt, edx-enterprise, edx-proctoring edx-search==3.0.0 # via -r requirements/edx/base.txt