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

Commit edee1af

Browse files
committed
Merge branch 'peer_support' of github.com:RunestoneInteractive/RunestoneComponents into peer_support
2 parents d4ce1d7 + 1d8100e commit edee1af

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

runestone/mchoice/js/mchoice.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ export default class MultipleChoice extends RunestoneBase {
223223
this.processMCMFSubmission(true);
224224
if (eBookConfig.peer) {
225225
this.submitButton.disabled = true;
226+
this.disableInteraction();
226227
}
227228
}.bind(this),
228229
false
@@ -522,6 +523,7 @@ export default class MultipleChoice extends RunestoneBase {
522523
scoreMCMFSubmission() {
523524
if (this.givenArray[0] == this.correctIndexList[0]) {
524525
this.correct = true;
526+
this.answer = this.givenArray[0]
525527
this.percent = 1.0;
526528
} else if (this.givenArray[0] != null) {
527529
// if given is null then the question wasn"t answered and should be counted as skipped
@@ -657,6 +659,13 @@ export default class MultipleChoice extends RunestoneBase {
657659
this.optionArray[i].input.disabled = true;
658660
}
659661
}
662+
663+
enableInteraction() {
664+
for (var i = 0; i < this.optionArray.length; i++) {
665+
this.optionArray[i].input.disabled = false;
666+
}
667+
}
668+
660669
}
661670

662671
/*=================================

0 commit comments

Comments
 (0)