start score table

This commit is contained in:
Ross
2020-12-18 17:48:08 +00:00
parent e4ac3bef19
commit 947959d4da
2 changed files with 82 additions and 49 deletions
+30 -8
View File
@@ -7,19 +7,20 @@
{% if unmarked %}
The following questions need marking
{% for exam_index in unmarked %}
<a href="{% url 'anatomy:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
<a href="{% url 'anatomy:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
{% endfor %}
{% endif %}
{% for user, value in user_answers_marks.items %}
<h3>Candidate: <a href="{% url 'cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
{{ans}} ({{score}}),
{% endfor %}
<br /> Total mark: {{ user_scores|get_item:user }}
<h3>Candidate: <a href="{% url 'cid_scores' user %}">{{ user_names|get_item:user }}</a></h3>
<!-- Answers: {{ user_answers_and_marks|get_item:user }}-->
Answers: {% for ans, score in user_answers_and_marks|get_item:user %}
{{ans}} ({{score}}),
{% endfor %}
<br /> Total mark: {{ user_scores|get_item:user }}
{% endfor %}
</div>
<div id="stats-block">
<h2>Stats</h2>
@@ -41,4 +42,25 @@
{% endfor %}
</table>
</div>
{% endblock %}
<div>
<h3>Answers as a table</h3>
<table>
<tr>
<th>Candidate</th>
{% for cid in cids %}
<th>{{cid}}</th>
{% endfor %}
</tr>
{% for question in questions %}
<tr>
<td>Question {{forloop.counter}}</td>
{% for ans in by_question|get_item:question %}
<td>{{ans}}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
</div>
{% endblock %}