.
This commit is contained in:
@@ -8,11 +8,9 @@
|
||||
<ul>
|
||||
{% for question, ans in answers_and_marks %}
|
||||
<li class="user-answer-li">Question {{forloop.counter}} - {{ question.stem }}</li>
|
||||
<ol type="a">
|
||||
{% for q, a, score, correct_answer in ans %}
|
||||
<li>{{q}}: Correct answer: {{correct_answer}} <br />{{a}} <span class="answer-{{score}}">(Score: {{score}})</span></li>
|
||||
{% for a, score, correct_answer in ans %}
|
||||
<span>Correct answer: {{correct_answer}} <br />{{a}} <span class="answer-{{score}}">(Score: {{score}})</span></span>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<br /> Total mark: {{ total_score }} / {{max_score}}
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@ def exam_scores_cid_user(request, pk, sk):
|
||||
answers_marks.append(answer_score)
|
||||
|
||||
merged_ans = (ans, answer_score, correct_answer)
|
||||
answers_and_marks.append((q, *merged_ans))
|
||||
answers_and_marks.append((q, merged_ans))
|
||||
|
||||
total_score = sum(answers_marks)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user