This commit is contained in:
Ross
2021-09-12 10:57:28 +01:00
parent 2a536f20d6
commit 2d04568e9f
2 changed files with 25 additions and 2 deletions
+14
View File
@@ -406,6 +406,20 @@ class ExamViews(View, LoginRequiredMixin):
questions = exam.exam_questions.all()
# Long cases require some special info
try:
if exam.double_mark:
question_unmarked_map = []
for q in questions:
question_unmarked_map.append((q, int(q.get_unmarked_answer_count(exam_pk=exam.pk)), int(q.get_unmarked_answer_count(exam_pk=exam.pk, marker=request.user)) ))
return render(
request, "{}/mark_overview.html".format(self.app_name), {"exam": exam, "question_unmarked_map": question_unmarked_map})
)
except AttributeError:
pass
question_unmarked_map = []
for q in questions:
question_unmarked_map.append((q, int(q.get_unmarked_answer_count(exam_pk=exam.pk))))