Skip to content

Commit

Permalink
Stop counting correct answers twice
Browse files Browse the repository at this point in the history
  • Loading branch information
zjosua committed Apr 2, 2022
1 parent 5c11e72 commit acf98d1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions card/back.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,8 @@
if (colorizeatable) {
if (solutions[i] && answers[i] === "1") {
arows[(type != 0) ? i : i + 1].setAttribute("class", "correct");
canswers = canswers + 1;
} else if (!solutions[i] && answers[i] === "0") {
if (colorizefalsefalse) { arows[(type != 0) ? i : i + 1].setAttribute("class", "correct"); }
canswers = canswers + 1;
} else {
arows[(type != 0) ? i : i + 1].setAttribute("class", "wrong");
}
Expand Down
4 changes: 2 additions & 2 deletions src/multiple_choice/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@

# default configurations
# TODO: update version number before release
default_conf_local = {'version': "2.4.2"}
default_conf_syncd = {'version': "2.4.2"}
default_conf_local = {'version': "2.4.3"}
default_conf_syncd = {'version': "2.4.3"}

def getSyncedConfig():
# Synced preferences
Expand Down
2 changes: 0 additions & 2 deletions src/multiple_choice/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,8 @@
if (colorizeatable) {
if (solutions[i] && answers[i] === "1") {
arows[(type != 0) ? i : i + 1].setAttribute("class", "correct");
canswers = canswers + 1;
} else if (!solutions[i] && answers[i] === "0") {
if (colorizefalsefalse) { arows[(type != 0) ? i : i + 1].setAttribute("class", "correct"); }
canswers = canswers + 1;
} else {
arows[(type != 0) ? i : i + 1].setAttribute("class", "wrong");
}
Expand Down

0 comments on commit acf98d1

Please sign in to comment.