From 61c3f6eaff9e831a189f9a4aa67e2b5a77d38e07 Mon Sep 17 00:00:00 2001 From: Marcos Date: Wed, 18 Sep 2024 16:41:29 -0300 Subject: [PATCH 1/2] fix: Adds a check to initialize legacy proctoring dashboard --- .../js/instructor_dashboard/instructor_dashboard.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lms/static/js/instructor_dashboard/instructor_dashboard.js b/lms/static/js/instructor_dashboard/instructor_dashboard.js index 02972a93b6c4..49fd01dbdd66 100644 --- a/lms/static/js/instructor_dashboard/instructor_dashboard.js +++ b/lms/static/js/instructor_dashboard/instructor_dashboard.js @@ -50,6 +50,12 @@ such that the value can be defined later than this assignment (file load order). $activeSection = null; + var usesProctoringLegacyView = function () { + // If the element #proctoring-mfe-view is present, then uses the new MFE + // and the legagy views should not be initialized. + return !document.getElementById('proctoring-mfe-view'); + } + SafeWaiter = (function() { function safeWaiter() { this.after_handlers = []; @@ -200,7 +206,7 @@ such that the value can be defined later than this assignment (file load order). } ]; // eslint-disable-next-line no-void - if (edx.instructor_dashboard.proctoring !== void 0) { + if (usesProctoringLegacyView() && edx.instructor_dashboard.proctoring !== void 0) { sectionsToInitialize = sectionsToInitialize.concat([ { constructor: edx.instructor_dashboard.proctoring.ProctoredExamAllowanceView, From 166d94decfec4dae954800b7c37570bbfbee1d0e Mon Sep 17 00:00:00 2001 From: Marcos Date: Thu, 19 Sep 2024 11:04:48 -0300 Subject: [PATCH 2/2] chore: Fixed a typo on a comment --- lms/static/js/instructor_dashboard/instructor_dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/js/instructor_dashboard/instructor_dashboard.js b/lms/static/js/instructor_dashboard/instructor_dashboard.js index 49fd01dbdd66..f87e9db8e814 100644 --- a/lms/static/js/instructor_dashboard/instructor_dashboard.js +++ b/lms/static/js/instructor_dashboard/instructor_dashboard.js @@ -52,7 +52,7 @@ such that the value can be defined later than this assignment (file load order). var usesProctoringLegacyView = function () { // If the element #proctoring-mfe-view is present, then uses the new MFE - // and the legagy views should not be initialized. + // and the legacy views should not be initialized. return !document.getElementById('proctoring-mfe-view'); }