From 699c53405a89748a435bd11076957c3960d70fc7 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 12 Dec 2020 14:27:03 +0000 Subject: [PATCH] . --- anatomy/templates/anatomy/exam_scores.html | 5 +++++ anatomy/views.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/anatomy/templates/anatomy/exam_scores.html b/anatomy/templates/anatomy/exam_scores.html index 611c9970..64132553 100644 --- a/anatomy/templates/anatomy/exam_scores.html +++ b/anatomy/templates/anatomy/exam_scores.html @@ -3,6 +3,11 @@ {% block content %}

{{ exam.name }}

+ + {% for question in unmarked.items %} + {{ question.pk}} + {% endfor %} + {% for user, value in user_answers_marks.items %}

Candidate: {{ user_names|get_item:user }}

diff --git a/anatomy/views.py b/anatomy/views.py index 899fe8a2..c56ae6a8 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -577,6 +577,8 @@ def exam_scores_cid(request, pk): user_answers = defaultdict(list) user_names = {} + unmarked = set() + # Loop through all candidates for cid in cids: # Convoluted (probably...) @@ -592,6 +594,8 @@ def exam_scores_cid(request, pk): ans = s.answer answer_score = s.get_answer_score() + if answer_score == "unmarked": + unmarked.add(q) user_answers[cid].append(ans) user_answers_marks[cid].append(answer_score) user_answers_and_marks[cid].append((ans, answer_score)) @@ -626,6 +630,7 @@ def exam_scores_cid(request, pk): "anatomy/exam_scores.html", { "exam": exam, + "unmarked": unmarked, "questions": questions, "user_answers": dict(user_answers), "user_answers_marks": dict(user_answers_marks),