This commit is contained in:
Ross
2021-10-16 16:35:47 +01:00
parent b77da13690
commit 359f7b73b3
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -667,6 +667,7 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False):
half_mark_answers = []
incorrect_answers = []
review_user_answers = []
unmarked_answers_bool = False
# this could be improved
if question.normal:
incorrect_answers = question.get_user_answers()
@@ -700,6 +701,8 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False):
mark = "half-correct"
elif marked_ans.status == Answer.MarkOptions.INCORRECT:
mark = "incorrect"
else:
unmarked_answers_bool = True
review_user_answers.append((ans, mark))
@@ -713,6 +716,7 @@ def mark(request, exam_pk, sk, unmarked_exam_answers_only=True, review=False):
"question": question,
"question_number": n,
"question_details": question_details,
"unmarked_answers_bool": unmarked_answers_bool,
"user_answers": unmarked_user_answers,
"review_user_answers": review_user_answers,
"correct_answers": correct_answers,