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