This commit is contained in:
Ross
2021-02-01 12:41:46 +00:00
parent 1493408a69
commit 5854601eb8
+3 -3
View File
@@ -924,14 +924,14 @@ def exam_scores_cid(request, pk):
# Get user answer # Get user answer
s = q.cid_user_answers.filter(cid=cid).first() s = q.cid_user_answers.filter(cid=cid).first()
if s.normal: if not s:
ans = "Normal"
elif not s:
# skip if no answer # skip if no answer
user_answers_marks[cid].append(0) user_answers_marks[cid].append(0)
user_answers[cid].append("") user_answers[cid].append("")
by_question[q].append(("", 0)) by_question[q].append(("", 0))
continue continue
elif s.normal:
ans = "Normal"
else: else:
ans = s.answer ans = s.answer
answer_score = s.get_answer_score() answer_score = s.get_answer_score()