.
This commit is contained in:
@@ -1,66 +1,23 @@
|
||||
{% extends 'physics/exams.html' %}
|
||||
{% extends 'generic/exam_scores_base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="physics">
|
||||
<h2>{{ exam.name }}</h2>
|
||||
|
||||
</div>
|
||||
<div id="stats-block">
|
||||
<h2>Stats</h2>
|
||||
Candidates: {{cids|length}}<br />
|
||||
Max score: {{max_score}}<br />
|
||||
Mean: {{mean}}, Median {{median}}, Mode {{mode}}
|
||||
|
||||
<div id="stats-plot">
|
||||
<h3>Distribution of results</h3>{{plot|safe}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<table class="table table-dark table-striped table-hover table-sm">
|
||||
{% block table_answers %}
|
||||
{% for question in questions %}
|
||||
<tr>
|
||||
<th>Candidate ID</th>
|
||||
<th>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>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Answers as a table</h3>
|
||||
<table class="table table-dark table-striped table-hover table-sm">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Candidate</th>
|
||||
{% for cid in cids %}
|
||||
<th><a href="{% url 'physics:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
|
||||
{% endfor %}
|
||||
</thead>
|
||||
</tr>
|
||||
{% for question in questions %}
|
||||
<tr>
|
||||
<td>Question {{forloop.counter}}</td>
|
||||
{% for zipped_answers in by_question|get_item:question %}
|
||||
<td>
|
||||
<ol class="physics-ans" style="list-style-type: lower-alpha;">
|
||||
{% for ans, score in zipped_answers %}
|
||||
<li class="user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
<td>Question {{forloop.counter}}
|
||||
</td>
|
||||
{% for cid in cids %}
|
||||
<td>
|
||||
<ol class="physics-ans" style="list-style-type: lower-alpha;">
|
||||
{% with by_question|get_item:question|get_item:cid as ans_score %}
|
||||
{% for ans, score in ans_score %}
|
||||
<li class="user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</li>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</ol>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>Score:</td>
|
||||
{% for score in user_scores_list %}
|
||||
<td>{{score}}</td>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
</table>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,73 +0,0 @@
|
||||
{% extends 'physics/exams.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div id="stats-plot">{{plot|safe}}</div>
|
||||
<div class="physics">
|
||||
<h2>{{ exam.name }}</h2>
|
||||
|
||||
</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>
|
||||
{% comment %} <th>Normalised Score</th> {% endcomment %}
|
||||
</tr>
|
||||
{% comment %} {% for user, value in user_answers_marks.items %} {% endcomment %}
|
||||
{% for cid in cids %}
|
||||
<tr>
|
||||
<td><a href="{% url 'cid_scores_admin' cid %}">{{cid}}</a></td>
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
{% comment %} <td>{{user_scores_normalised|get_item:user}}</td> {% endcomment %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Answers as a table</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 %}
|
||||
<th><a href="{% url 'physics:exam_scores_cid_user' exam.pk cid None %}">{{cid}}</a></th>
|
||||
{% comment %} <th><a href="">{{cid}}</a></th> {% endcomment %}
|
||||
{% endfor %}
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
{% for question in questions %}
|
||||
<tr>
|
||||
<td>Question {{forloop.counter}}
|
||||
</td>
|
||||
{% for cid in cids %}
|
||||
<td>
|
||||
<ol class="physics-ans" style="list-style-type: lower-alpha;">
|
||||
{% with by_question|get_item:question|get_item:cid as ans_score %}
|
||||
{% for ans, score in ans_score %}
|
||||
<li class="user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</li>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
</ol>
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>Score:</td>
|
||||
{% for cid in cids %}
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user