Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 () {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why name this function this way? Why not name the function usesProctoringMFEView and use the logic in a reverse way?

// 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