This commit is contained in:
Ross
2020-12-12 14:27:03 +00:00
parent 06fd26bc3c
commit 699c53405a
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -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),