Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion runestone/assess/js/fitb.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ FITB.prototype.checkFITBStorage = function () {
// Starts chain of functions which ends with feedBack() displaying feedback to user
this.evaluateAnswers();
this.renderFITBFeedback();
var answerInfo = "answer:" + this.given_arr + ":" + (this.isCorrect ? "correct" : "no");
var answerInfo = "answer:" + this.given_arr + ":" + (this.correct ? "correct" : "no");
this.logBookEvent({"event": "fillb", "act": answerInfo, "div_id": this.divid});
this.enableCompareButton.disabled = false;
};
Expand Down
3 changes: 2 additions & 1 deletion runestone/parsons/js/parsons.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@
if (codestring) {
// Consecutive lines to be dragged as a single block of code have strings "\\n" to
// represent newlines => replace them with actual new line characters "\n"
this.code = codestring.replace(/#distractor\s*$/, "").replace(trimRegexp, "$1").replace(/\\n/g, "\n");
//codestring = codestring.replace(/\\n\s+/g,"\\n"); // remove leading spaced if more than one line in a code block - added in below to not change the codestring
this.code = codestring.replace(/#distractor\s*$/, "").replace(trimRegexp, "$1").replace(/\\n\s+/g,"\\n").replace(/\\n+/g,"\n");
this.indent = codestring.length - codestring.replace(/^\s+/, "").length;
}
};
Expand Down