Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 3ef9540

Browse files
committed
make list of mchoice avail
1 parent 0be1114 commit 3ef9540

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

runestone/mchoice/js/mchoice.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import RunestoneBase from "../../common/js/runestonebase.js";
1515
//import "./../styles/runestone-custom-sphinx-bootstrap.css";
1616
import "../css/mchoice.css";
1717

18-
export var mcList = {}; // Multiple Choice dictionary
18+
window.mcList = {}; // Multiple Choice dictionary
1919

2020
// MC constructor
2121
export default class MultipleChoice extends RunestoneBase {
@@ -221,6 +221,9 @@ export default class MultipleChoice extends RunestoneBase {
221221
function (ev) {
222222
ev.preventDefault();
223223
this.processMCMFSubmission(true);
224+
if (eBookConfig.peer) {
225+
this.submitButton.disabled = true;
226+
}
224227
}.bind(this),
225228
false
226229
);
@@ -660,7 +663,7 @@ $(document).bind("runestone:login-complete", function () {
660663
};
661664
if ($(this).closest("[data-component=timedAssessment]").length == 0) {
662665
// If this element exists within a timed component, don't render it here
663-
mcList[this.id] = new MultipleChoice(opts);
666+
window.mcList[this.id] = new MultipleChoice(opts);
664667
}
665668
});
666669
});

0 commit comments

Comments
 (0)