This commit is contained in:
Ross
2021-12-18 19:56:10 +00:00
parent 2ebb02fe2c
commit d1d615fab2
@@ -0,0 +1,80 @@
{% extends 'rapids/exams.html' %}
{% block content %}
<div id="stats-plot">{{plot|safe}}</div>
<div class="rapids">
<h2>{{ exam.name }}</h2>
User answer scores are cached, if you update or change an answer you will need to <a href="{% url 'rapids:exam_scores_refresh' exam.pk %}">refresh the scores</a>.
{% if unmarked %}
<div class="alert alert-warning" role="alert">
The following questions need marking
{% for exam_index in unmarked %}
<a href="{% url 'rapids:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
{% endfor %}
</div>
{% endif %}
</div>
<div id="stats-block">
<h3>Stats</h3>
Candidates: {{cids|length}}<br />
Max score: {{max_score}}<br />
Mean: {{mean}}, Median {{median}}, Mode {{mode}}
</div>
<div>
<table class="table table-dark table-striped table-hover table-sm cid-score-table">
<tr>
<th>Candidate ID</th>
<th>Score</th>
<th>Normalised Score</th>
</tr>
{% for user, value in user_answers_marks.items %}
<tr>
<td><a href="{% url 'cid_scores_admin' user %}">{{user}}</a></td>
<td>{{user_scores|get_item:user}}</td>
<td>{{user_scores_normalised|get_item:user}}</td>
</tr>
{% endfor %}
</table>
</div>
<div>
<h3>Answers as a table TEST</h3>
<table class="table table-dark table-striped table-hover table-sm col-sm">
<thead class="thead-dark">
<tr>
<th>Candidate</th>
{% for cid in cids %}
{% comment %} <th><a href="{% url 'rapids:exam_scores_cid_user' exam.pk cid %}">{{cid}}</a></th> {% endcomment %}
<th><a href="">{{cid}}</a></th>
{% endfor %}
</tr>
</thead>
{% for question in questions %}
<tr>
<td><a href="{% url 'rapids:mark' exam_pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a>
{% if question.normal %}
[N]
{% else %}
[A]
{% endif %}
</td>
{% for cid in cids %}
<td class="rapid-ans user-answer-score-{{score_by_question|get_item:question|get_item:cid}}" title="answer score: {{score_by_question|get_item:question|get_item:cid}}">{{ans_by_question|get_item:question|get_item:cid}}</td>
{% endfor %}
</tr>
{% endfor %}
<tr>
<td>Score:</td>
{% for cid in cids %}
<td>{{user_scores|get_item:cid}}</td>
{% endfor %}
</tr>
</table>
</div>
{% endblock %}