From 9ed8fd90b3dfccebfefa471f892a025b9f67df0d Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 8 Sep 2025 11:01:17 +0100 Subject: [PATCH] Enhance feedback display in exam scores template and update question data retrieval for improved user experience --- shorts/models.py | 2 +- shorts/templates/shorts/exam_scores_user.html | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/shorts/models.py b/shorts/models.py index e539e6de..4153ffb9 100644 --- a/shorts/models.py +++ b/shorts/models.py @@ -232,7 +232,7 @@ class Question(QuestionBase): def get_question_json( self, based: bool = True, - feedback: bool = False, + feedback: bool = True, answers: bool = True, history: bool = True, annotations: bool = False, diff --git a/shorts/templates/shorts/exam_scores_user.html b/shorts/templates/shorts/exam_scores_user.html index eb5fd585..79c376f3 100644 --- a/shorts/templates/shorts/exam_scores_user.html +++ b/shorts/templates/shorts/exam_scores_user.html @@ -1,22 +1,21 @@ {% extends 'base.html' %} {% block content %} -
-
HIDE/SHOW
-
- Question 1 -
-
-
-
+
+
+ Question 1 + +
+
+
+
+
- Sample Answers: - - + Sample Answers: +
-
-
+
@@ -88,9 +87,10 @@ $(".question-display-block .history").empty().append(`History:
${data.history}
`); } if (data.feedback) { - $(".question-display-block .question-feedback").empty().append(`Feedback:
${data.feedback}
`); + console.log("Feedback", data.feedback) + $(".question-feedback").empty().append(`Feedback:
${data.feedback}
`); } else { - $(".question-display-block .question-feedback").empty(); + $(".question-feedback").empty(); } console.log(data) if (data.answers && data.answers.length > 0) {