Skip to content

Commit

Permalink
Fix active elements output not showing
Browse files Browse the repository at this point in the history
Commit ad95bc9 changed poll.js
so that the final target URL is configured via an HTML data
attribute. However, the new data attribute was not added for active
elements, thus active elements could not load feedback to
the output element after the submission had been graded.

Fixes #1188
  • Loading branch information
lainets authored and markkuriekkinen committed Jun 7, 2023
1 parent 941e8b6 commit a78063f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exercise/static/exercise/chapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,10 @@
// that is always included: <div class="quiz-submit-error alert alert-danger hide">
const alerts = content.find('.alert-danger:not(.hide)');
if (!alerts.length) {
var poll_url = content.find(".exercise-wait").attr("data-poll-url");
const poll_url = content.find(".exercise-wait").attr("data-poll-url");
output.attr('data-poll-url', poll_url);
const ready_url = content.find(".exercise-wait").attr("data-ready-url");
output.attr('data-ready-url', ready_url);

exercise.updateSubmission(content);
} else if (alerts.contents().text()
Expand Down

0 comments on commit a78063f

Please sign in to comment.