From 31674369f72f7214db08c49c1bf7a875da09497e Mon Sep 17 00:00:00 2001 From: Tom Reijnders Date: Thu, 4 May 2023 22:42:57 +0200 Subject: [PATCH] Fixed #1215 - Quiz feedback (of an option) is not shown in Single Answer mode --- .../parent_templates/Nottingham/models_html5/quiz.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/xerte/parent_templates/Nottingham/models_html5/quiz.html b/modules/xerte/parent_templates/Nottingham/models_html5/quiz.html index 0e4e0419e..f6eff48c5 100644 --- a/modules/xerte/parent_templates/Nottingham/models_html5/quiz.html +++ b/modules/xerte/parent_templates/Nottingham/models_html5/quiz.html @@ -333,6 +333,7 @@ }); l_answer.push(selectedOption.name); l_feedback.push(selectedOption.feedback); + l_selectedOptions.push(selectedOption); } // if all selected are correct - check that none of the unselected options should have been if (correct != false && currentQuestion.getAttribute("type") == "Multiple Answer") { @@ -344,12 +345,13 @@ } } } - l_selectedOptions.push(selectedOption); + return { correct: correct, options: l_options, answer: l_answer, - feedback: l_feedback + feedback: l_feedback, + selectedOption: l_selectedOptions }; }