Skip to content

Commit

Permalink
Merge pull request #35499 from openedx/rijuma/removing-old-special-ex…
Browse files Browse the repository at this point in the history
…ams-views

Added a check to initialize legacy proctoring dashboard only if it's being used
  • Loading branch information
rijuma committed Sep 19, 2024
2 parents 0196def + 166d94d commit ca11c14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lms/static/js/instructor_dashboard/instructor_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 legacy views should not be initialized.
return !document.getElementById('proctoring-mfe-view');
}

SafeWaiter = (function() {
function safeWaiter() {
this.after_handlers = [];
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ca11c14

Please sign in to comment.