.
This commit is contained in:
@@ -444,6 +444,9 @@ class CidUserAnswer(models.Model):
|
|||||||
if q.normal != self.normal:
|
if q.normal != self.normal:
|
||||||
# If they don't match the answer is wrong (score is 0)
|
# If they don't match the answer is wrong (score is 0)
|
||||||
return 0
|
return 0
|
||||||
|
# If both are normal full marks
|
||||||
|
elif q.normal and self.normal:
|
||||||
|
return 2
|
||||||
|
|
||||||
# Then compare answer strings (as per anatomy questions)
|
# Then compare answer strings (as per anatomy questions)
|
||||||
ans = self.answer_compare
|
ans = self.answer_compare
|
||||||
|
|||||||
+6
-3
@@ -923,14 +923,17 @@ def exam_scores_cid(request, pk):
|
|||||||
for q in questions:
|
for q in questions:
|
||||||
# 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 not s:
|
|
||||||
|
if q.normal and s.normal == q.normal:
|
||||||
|
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
|
||||||
|
else:
|
||||||
ans = s.answer
|
ans = s.answer
|
||||||
answer_score = s.get_answer_score()
|
answer_score = s.get_answer_score()
|
||||||
if answer_score == "unmarked":
|
if answer_score == "unmarked":
|
||||||
index = exam.get_question_index(q)
|
index = exam.get_question_index(q)
|
||||||
|
|||||||
Reference in New Issue
Block a user