From a6e08452b3602fcd2a73d58d479932aa5e13a3c3 Mon Sep 17 00:00:00 2001 From: Christian Lawson-Perfect Date: Thu, 19 Sep 2024 10:39:21 +0100 Subject: [PATCH] fix order of definition of showScoreFeedback.revealed --- themes/default/files/scripts/display-util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/default/files/scripts/display-util.js b/themes/default/files/scripts/display-util.js index 32e7f2764..3a26a6815 100644 --- a/themes/default/files/scripts/display-util.js +++ b/themes/default/files/scripts/display-util.js @@ -202,14 +202,14 @@ Numbas.queueScript('display-util', ['math'], function() { return obj.visited!==undefined && obj.visited(); }); - var revealed = Knockout.computed(function() { - return (obj.revealed() && showActualMark()) || (Numbas.is_instructor && settings.reveal_answers_for_instructor!==false); - }); - var showActualMark = resolve_feedback_setting(obj, settings.showActualMark); var showTotalMark = resolve_feedback_setting(obj, settings.showTotalMark); var showAnswerState = resolve_feedback_setting(obj, settings.showAnswerState); + var revealed = Knockout.computed(function() { + return (obj.revealed() && showActualMark()) || (Numbas.is_instructor && settings.reveal_answers_for_instructor!==false); + }); + var showFeedbackIcon = settings.showFeedbackIcon === undefined ? showAnswerState() : settings.showFeedbackIcon; var anyAnswered = Knockout.computed(function() {