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

Commit 340ad7e

Browse files
committed
restore short answers to the right place
1 parent ff84447 commit 340ad7e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

runestone/shortanswer/js/shortanswer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ShortAnswer.prototype.init = function (opts) {
4141
this.checkServer("shortanswer");
4242
this.caption = "shortanswer";
4343
this.addCaption("runestone");
44-
44+
4545
};
4646

4747
ShortAnswer.prototype.renderHTML = function() {
@@ -186,9 +186,9 @@ ShortAnswer.prototype.restoreAnswers = function (data) {
186186
if (!data.answer) {
187187
data.answer = "";
188188
}
189+
this.answer = data.answer;
190+
this.jTextArea.value = this.answer;
189191

190-
let solution = $("#" + this.divid + "_solution");
191-
solution.text(data.answer);
192192
this.feedbackDiv.innerHTML = "Your current saved answer is shown above.";
193193
$(this.feedbackDiv).removeClass("alert-danger");
194194
$(this.feedbackDiv).addClass("alert alert-success");

0 commit comments

Comments
 (0)