From a78063f298c7ec3f51744bcfd691e1a5799a078b Mon Sep 17 00:00:00 2001 From: Tuomas Laine Date: Wed, 7 Jun 2023 06:48:10 +0000 Subject: [PATCH] Fix active elements output not showing Commit ad95bc93b2640713da4dfa20adc7784bf0398918 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 --- exercise/static/exercise/chapter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercise/static/exercise/chapter.js b/exercise/static/exercise/chapter.js index 659102fc6..fbe843cf8 100644 --- a/exercise/static/exercise/chapter.js +++ b/exercise/static/exercise/chapter.js @@ -602,8 +602,10 @@ // that is always included:
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()