.
This commit is contained in:
@@ -1,79 +1,34 @@
|
||||
{% extends 'rapids/exams.html' %}
|
||||
{% extends 'generic/exam_scores_base.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>
|
||||
{% block table_answers %}
|
||||
{% 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 %}
|
||||
{% with by_question|get_item:question|get_item:cid as ans_score %}
|
||||
<td class="user-answer-score-{{ans_score.1}}" title="answer score: {{ans_score.1}} [{{ans_score.2}}]">{{ans_score.0}}</td>
|
||||
{% endwith %}
|
||||
{% 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 'rapids:exam_scores_cid_user' exam.pk cid 'None' %}">{{cid}}</a></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% 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 ans, score in by_question|get_item:question %}
|
||||
<td class="rapid-ans user-answer-score-{{score}}" title="answer score: {{score}}">{{ans}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>Score:</td>
|
||||
{% for score in user_scores_list %}
|
||||
<td>{{score}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock table_answers %}
|
||||
|
||||
{% block breakdown %}
|
||||
<details>
|
||||
<summary>Call breakdown</summary>
|
||||
<ul>
|
||||
{% for user, breakdown in user_answers_callstates.items %}
|
||||
<li>
|
||||
{{cids_user_id_map|get_item:user}} - {{breakdown}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
{% endblock breakdown %}
|
||||
@@ -1,130 +0,0 @@
|
||||
{% 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 cid in cids %}
|
||||
<tr>
|
||||
{% if cid|slice:":1" == "u" %}
|
||||
<td>{{cids_user_id_map|get_item:cid}}</td>
|
||||
{% else %}
|
||||
<td><a href="{% url 'cid_scores_admin' cid|slice:'2:' %}">{{cid}}</a></td>
|
||||
{% endif %}
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
<td>{{user_scores_normalised|get_item:cid}}</td>
|
||||
</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 %}
|
||||
{% comment %} <th><a href="{% url 'rapids:exam_scores_cid_user' exam.pk cid %}">{{cid}}</a></th> {% endcomment %}
|
||||
<th><a href="">{{cids_user_id_map|get_item: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 %}
|
||||
{% with by_question|get_item:question|get_item:cid as ans_score %}
|
||||
<td class="user-answer-score-{{ans_score.1}}" title="answer score: {{ans_score.1}} [{{ans_score.2}}]">{{ans_score.0}}</td>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td>Score:</td>
|
||||
{% for cid in cids %}
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Call breakdown
|
||||
<ul>
|
||||
{% for user, breakdown in user_answers_callstates.items %}
|
||||
<li>
|
||||
{{cids_user_id_map|get_item:user}} - {{breakdown}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<details>
|
||||
<summary>Email results</summary>
|
||||
User results emailed: {{exam.exam_results_emailed|default:"Never"}}<br/>
|
||||
<button id="email-results-button" title="Email results to users and their supervisors">Email user results</button>
|
||||
<button id="email-results-check-button" title="Check the status of emailed results">Check email status</button>
|
||||
</details>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(() => {
|
||||
$("#email-results-button").click((evt) => {
|
||||
if (confirm("This will email results, please make sure scores have been refreshed before continuing")) {
|
||||
|
||||
let additional_email = prompt("Please enter an additional email to send to (user and supervisor will automatically be used if available) if required");
|
||||
|
||||
let url = "{% url 'rapids:exam_report_email' exam_id=exam.pk %}";
|
||||
|
||||
if ( additional_email != null ) {
|
||||
url = url + "?additional_email="+encodeURI(additional_email)
|
||||
}
|
||||
|
||||
window.location = url;
|
||||
|
||||
}
|
||||
evt.preventDefault();
|
||||
|
||||
})
|
||||
$("#email-results-check-button").click((evt) => {
|
||||
window.location = "{% url 'rapids:exam_report_email_status' exam_id=exam.pk %}";
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user