From 5ef0cfaeb4afbc4438944af220b2e9c49ac12f34 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 16 Oct 2021 12:01:25 +0100 Subject: [PATCH] . --- rapids/templates/rapids/mark.html | 13 +++++++++++++ rapids/views.py | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/rapids/templates/rapids/mark.html b/rapids/templates/rapids/mark.html index 247a4a30..b05c373f 100644 --- a/rapids/templates/rapids/mark.html +++ b/rapids/templates/rapids/mark.html @@ -85,6 +85,9 @@ Mark, 0 Marks {% endif %} + {% if review %} + + {% endif %} {% if question_details.current > 1 %} {% endif %} @@ -99,4 +102,14 @@ + {% if review %} + + + {% endif %} {% endblock %} diff --git a/rapids/views.py b/rapids/views.py index 567b617e..30b5dc4c 100755 --- a/rapids/views.py +++ b/rapids/views.py @@ -690,16 +690,16 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False): if review: for ans in unmarked_user_answers: - print(ans, half_mark_answers) + # duplicated from user answer model.... marked_ans = question.answers.filter(answer_compare__iexact=ans).first() mark = "unmarked" if marked_ans is not None: if marked_ans.status == Answer.MarkOptions.CORRECT: - mark = 2 + mark = "correct" elif marked_ans.status == Answer.MarkOptions.HALF_MARK: - mark = 1 + mark = "half-mark" elif marked_ans.status == Answer.MarkOptions.INCORRECT: - mark = 0 + mark = "incorrect" review_user_answers.append((ans, mark))