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

Commit 24d4374

Browse files
committed
Fix: clear multi-answer and Fix: Vote 2 complete mess
1 parent 38c1a01 commit 24d4374

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

static/js/peer.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ function connect(event) {
5555
if (typeof currAnswer === "undefined") {
5656
messarea.innerHTML = `<h3>You have not answered the question</h3><p>You will not be able to participate in any discussion unless you answer the question.</p>`;
5757
} else {
58-
messarea.innerHTML = `<h3>Please Give an explanation for your answer</h3><p>Then discuss your answer with your group members</p>`;
58+
if (voteNum < 2) {
59+
messarea.innerHTML = `<h3>Please Give an explanation for your answer</h3><p>Then discuss your answer with your group members</p>`;
60+
} else {
61+
messarea.innerHTML = `<h3>Voting for this question is complete</h3>`;
62+
}
5963
}
6064
if (!eBookConfig.isInstructor) {
6165
window.mcList[
@@ -93,7 +97,8 @@ function connect(event) {
9397
}
9498
messarea = document.getElementById("imessage");
9599
messarea.innerHTML = `<h3>Time to make your 2nd vote</h3>`;
96-
$("[type=radio]").prop("checked", false);
100+
$(".runestone [type=radio]").prop("checked", false);
101+
$(".runestone [type=checkbox]").prop("checked", false);
97102
break;
98103
case "enableNext":
99104
// This moves the student to the next question in the assignment
@@ -382,7 +387,8 @@ async function showPeerEnableVote2() {
382387
let nextStep = document.getElementById("nextStep");
383388
nextStep.innerHTML =
384389
"Please Answer the question again. Even if you do not wish to change your answer. After answering click the button to go on to the next question.";
385-
$("[type=radio]").prop("checked", false);
390+
$(".runestone [type=radio]").prop("checked", false);
391+
$(".runestone [type=checkbox]").prop("checked", false);
386392
}
387393

388394
$(function () {

0 commit comments

Comments
 (0)