From 647feb93f54c872c231dcc14ae2f823831a169fb Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 6 Apr 2022 16:53:57 +0100 Subject: [PATCH] . --- generic/views.py | 4 ++-- rapids/templates/rapids/exam_scores_user.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/views.py b/generic/views.py index ecf0803d..d1669ed5 100644 --- a/generic/views.py +++ b/generic/views.py @@ -1201,7 +1201,7 @@ class GenericViewBase: def question_review(self, request, pk): """ - Return a json representation of the question when the exam is active + Return a json representation of the question when the exam is published """ if request.is_ajax(): exam = get_object_or_404(self.exam_object, pk=pk) @@ -1214,7 +1214,7 @@ class GenericViewBase: question = exam.exam_questions.all()[int(request.POST["question_number"])] - question_json = question.get_question_json(based=False) + question_json = question.get_question_json(based=False, feedback=True) return JsonResponse(question_json) return JsonResponse({"status": "error"}) diff --git a/rapids/templates/rapids/exam_scores_user.html b/rapids/templates/rapids/exam_scores_user.html index 586df820..9f2a6654 100644 --- a/rapids/templates/rapids/exam_scores_user.html +++ b/rapids/templates/rapids/exam_scores_user.html @@ -10,7 +10,7 @@
- Answers: + Answers:
@@ -67,7 +67,7 @@ $(".question-display-block .answers").empty().append(data.answers.toString()); n = parseInt(question_number) + 1 $(".question-display-block .question-number").empty().append(n); - $(".question-display-block .feedback").empty().append(data.feedback); + $(".question-display-block .feedback").empty().append($(`Feedback: ${data.feedback}
`)); // show some message according to the response. // For eg. A message box showing that the status has been changed $(".inner-display-block").show();