This commit is contained in:
Ross
2021-03-03 21:02:39 +00:00
parent 619082061f
commit 7f5af94df2
2 changed files with 20 additions and 0 deletions
+7
View File
@@ -889,21 +889,27 @@ def exam_scores_cid_user(request, pk, sk):
#answers_and_marks = []
answers_marks = []
#answers = []
answer_text = []
for q in questions:
# Get user answer
user_answer = q.cid_user_answers.filter(cid=cid).first()
if not user_answer or user_answer is None:
# skip if no answer
#answers_marks.append("")
#answers.append("")
answer_score = 4
#ans = "Not answered"
answer_text.append("Not answered")
else:
answer_score = user_answer.get_answer_score()
answer_text.append((answer_observations, answer_interpretation, answer_principle_diagnosis, answer_differential_diagnosis, answer_management))
if not exam.publish_results:
answer_score = 0
#answers.append(ans)
@@ -931,6 +937,7 @@ def exam_scores_cid_user(request, pk, sk):
"answers_marks": answers_marks,
"total_score": total_score,
"max_score": max_score,
"answer_text": answer_text
#"answers_and_marks": answers_and_marks,
},
)