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

Commit f7e8d6c

Browse files
committed
Bug fix: Interpret mulitple choice answers as html not plain text.
1 parent 779e466 commit f7e8d6c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

runestone/assess/js/mchoice.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ MultipleChoice.prototype.findAnswers = function () {
108108
if ($(ChildAnswerList[j]).is("[data-correct]")) { // If data-correct attribute exists, answer is correct
109109
is_correct = true;
110110
}
111-
var answer_text = $(ChildAnswerList[j]).text();
111+
var answer_text = $(ChildAnswerList[j]).html();
112112
var answer_object = {id: answer_id, correct: is_correct, content: answer_text};
113113
this.answerList.push(answer_object);
114114
}
@@ -205,7 +205,7 @@ MultipleChoice.prototype.renderMCFormOpts = function () {
205205
label.appendChild(input);
206206
label.appendChild(labelspan);
207207
//$(label).attr("for", optid);
208-
$(labelspan).text(this.answerList[k].content);
208+
$(labelspan).html(this.answerList[k].content);
209209

210210
// create the object to store in optionArray
211211
var optObj = {

0 commit comments

Comments
 (0)