Skip to content

Commit 063a63f

Browse files
committed
Merge pull request #44 from bnmnetp/master
check for the empty string to detect a non answer === was causing other ...
2 parents eda9071 + 8d67455 commit 063a63f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v3/js/pytutor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3449,7 +3449,7 @@ function traceQCheckMe(inputId, divId, answer) {
34493449
correctAns = correctAns[attrs[j]]
34503450
}
34513451
feedbackElement = $("#" + divId + "_feedbacktext")
3452-
if (ans === correctAns) { // do an exact match so that "" doesn't spuriously get matched with 0
3452+
if (ans.length > 0 && ans == correctAns) {
34533453
feedbackElement.html('Correct')
34543454
} else {
34553455
feedbackElement.html(vis.curTrace[i].question.feedback)

0 commit comments

Comments
 (0)