This commit is contained in:
Ross
2021-08-31 20:47:30 +01:00
parent 71527b5d2d
commit c6e01a0cb7
3 changed files with 61 additions and 55 deletions
+27 -25
View File
@@ -5,10 +5,12 @@
<h2>{{ exam.name }}</h2> <h2>{{ exam.name }}</h2>
{% if unmarked %} {% if unmarked %}
The following questions need marking <div class="alert alert-info" role="alert">
{% for exam_index in unmarked %} The following questions need marking
<a href="{% url 'anatomy:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a> {% for exam_index in unmarked %}
{% endfor %} <a href="{% url 'anatomy:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
{% endfor %}
</div>
{% endif %} {% endif %}
@@ -16,7 +18,7 @@
<div id="stats-block"> <div id="stats-block">
<h3>Stats</h3> <h3>Stats</h3>
Candidates: {{cids|length}}<br /> Candidates: {{cids|length}}<br />
Max score: {{max_score}}<br/> Max score: {{max_score}}<br />
Mean: {{mean}}, Median {{median}}, Mode {{mode}} Mean: {{mean}}, Median {{median}}, Mode {{mode}}
<div id="stats-plot">{{plot|safe}}</div> <div id="stats-plot">{{plot|safe}}</div>
@@ -39,28 +41,28 @@
<h3>Results as a table</h3> <h3>Results as a table</h3>
<table class="table table-dark table-striped table-hover table-sm"> <table class="table table-dark table-striped table-hover table-sm">
<thead class="thead-dark"> <thead class="thead-dark">
<tr> <tr>
<th>Candidate</th> <th>Candidate</th>
{% for cid in cids %} {% for cid in cids %}
<th>{{cid}}</th> <th>{{cid}}</th>
{% endfor %} {% endfor %}
</tr> </tr>
</thead> </thead>
{% for question in questions %} {% for question in questions %}
<tr> <tr>
<td>Question {{forloop.counter}}</td> <td>Question {{forloop.counter}}</td>
{% for ans, score in by_question|get_item:question %} {% for ans, score in by_question|get_item:question %}
<td class="user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</td> <td class="user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</td>
{% endfor %}
</tr>
{% endfor %} {% endfor %}
</tr> <tr>
{% endfor %} <td>Score:</td>
<tr> {% for score in user_scores_list %}
<td>Score:</td> <td>{{score}}</td>
{% for score in user_scores_list %} {% endfor %}
<td>{{score}}</td> <tr>
{% endfor %}
<tr>
</table> </table>
</div> </div>
+6 -4
View File
@@ -5,10 +5,12 @@
<h2>{{ exam.name }}</h2> <h2>{{ exam.name }}</h2>
{% if unmarked %} {% if unmarked %}
The following questions need marking <div class="alert alert-info" role="alert">
{% for exam_index in unmarked %} The following questions need marking
<a href="{% url 'longs:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a> {% for exam_index in unmarked %}
{% endfor %} <a href="{% url 'longs:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
{% endfor %}
</div>
{% endif %} {% endif %}
+26 -24
View File
@@ -6,10 +6,12 @@
<h2>{{ exam.name }}</h2> <h2>{{ exam.name }}</h2>
{% if unmarked %} {% if unmarked %}
The following questions need marking <div class="alert alert-info" role="alert">
{% for exam_index in unmarked %} The following questions need marking
<a href="{% url 'rapids:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a> {% for exam_index in unmarked %}
{% endfor %} <a href="{% url 'rapids:mark' exam.pk exam_index %}">{{ exam_index|add:1 }}</a>
{% endfor %}
</div>
{% endif %} {% endif %}
@@ -17,7 +19,7 @@
<div id="stats-block"> <div id="stats-block">
<h3>Stats</h3> <h3>Stats</h3>
Candidates: {{cids|length}}<br /> Candidates: {{cids|length}}<br />
Max score: {{max_score}}<br/> Max score: {{max_score}}<br />
Mean: {{mean}}, Median {{median}}, Mode {{mode}} Mean: {{mean}}, Median {{median}}, Mode {{mode}}
</div> </div>
@@ -39,28 +41,28 @@
<h3>Answers as a table</h3> <h3>Answers as a table</h3>
<table class="table table-dark table-striped table-hover table-sm col-sm"> <table class="table table-dark table-striped table-hover table-sm col-sm">
<thead class="thead-dark"> <thead class="thead-dark">
<tr> <tr>
<th>Candidate</th> <th>Candidate</th>
{% for cid in cids %} {% for cid in cids %}
<th>{{cid}}</th> <th>{{cid}}</th>
{% endfor %} {% endfor %}
</tr> </tr>
</thead> </thead>
{% for question in questions %} {% for question in questions %}
<tr> <tr>
<td><a href="{% url 'rapids:mark' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a></td> <td><a href="{% url 'rapids:mark' pk=exam.pk sk=forloop.counter0 %}">Question {{forloop.counter}}</a></td>
{% for ans, score in by_question|get_item:question %} {% for ans, score in by_question|get_item:question %}
<td class="rapid-ans user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</td> <td class="rapid-ans user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</td>
{% endfor %}
</tr>
{% endfor %} {% endfor %}
</tr> <tr>
{% endfor %} <td>Score:</td>
<tr> {% for score in user_scores_list %}
<td>Score:</td> <td>{{score}}</td>
{% for score in user_scores_list %} {% endfor %}
<td>{{score}}</td> <tr>
{% endfor %}
<tr>
</table> </table>
</div> </div>