refactor: enhance candidate scores table layout and improve status display
This commit is contained in:
@@ -78,52 +78,52 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped table-hover table-sm cid-score-table sortable small" id="candidate-scores-list-table">
|
||||
<tr>
|
||||
<th title="click to sort by candidate / user id">Candidate ID</th>
|
||||
<th title="click to sort by score">Score</th>
|
||||
{% if exam.app_name == "longs" or exam.app_name == "rapids" %}
|
||||
<th>Normalised Score</th>
|
||||
{% endif %}
|
||||
<th>Status</th>
|
||||
{% if can_edit %}
|
||||
<th title="Include in stats calculations">Stats</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for cid in cids %}
|
||||
<tr class="candidate-row" data-answer-count={{user_answer_count|get_item:cid}} data-cid-name="{{ cids_user_id_map|get_item:cid|lower }}" data-cid-val="{{ cid|lower }}">
|
||||
{% if cid|slice:":1" == "u" %}
|
||||
<td class="cid" >{{cids_user_id_map|get_item:cid}}</td>
|
||||
{% else %}
|
||||
<td class="cid" data-cid="{{cid|slice:'2:'}}"><a href="{% url 'cid_scores_admin' cid|slice:'2:' %}">{{cid}}</a>
|
||||
<span title="Click to show candidate details"
|
||||
hx-get="{% url 'generic:cid_details' cid|slice:'2:' %}"
|
||||
hx-target="this"
|
||||
>
|
||||
<i class="bi bi-binoculars search-cid" ></i>
|
||||
</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
|
||||
<table class="table table-dark table-striped table-hover table-sm cid-score-table sortable small" id="candidate-scores-list-table">
|
||||
<tr>
|
||||
<th title="click to sort by candidate / user id">Candidate ID</th>
|
||||
<th title="click to sort by score">Score</th>
|
||||
{% if exam.app_name == "longs" or exam.app_name == "rapids" %}
|
||||
<td>{{user_scores_normalised|get_item:cid}}</td>
|
||||
<th>Normalised Score</th>
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if pass_status|get_item:cid == 'Pass' %}
|
||||
<span class="badge bg-success">Pass</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">Fail</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<th>Status</th>
|
||||
{% if can_edit %}
|
||||
<td>
|
||||
{% include "generic/partials/_candidate_stats_checkbox.html" with cid=cid is_excluded=excluded_map|get_item:cid exam=exam %}
|
||||
</td>
|
||||
<th class="sorttable_nosort" title="Include in stats calculations">Stats</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% for cid in cids %}
|
||||
<tr class="candidate-row" data-answer-count={{user_answer_count|get_item:cid}} data-cid-name="{{ cids_user_id_map|get_item:cid|lower }}" data-cid-val="{{ cid|lower }}">
|
||||
{% if cid|slice:":1" == "u" %}
|
||||
<td class="cid" >{{cids_user_id_map|get_item:cid}}</td>
|
||||
{% else %}
|
||||
<td class="cid" data-cid="{{cid|slice:'2:'}}"><a href="{% url 'cid_scores_admin' cid|slice:'2:' %}">{{cid}}</a>
|
||||
<span title="Click to show candidate details"
|
||||
hx-get="{% url 'generic:cid_details' cid|slice:'2:' %}"
|
||||
hx-target="this"
|
||||
>
|
||||
<i class="bi bi-binoculars search-cid" ></i>
|
||||
</span>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>{{user_scores|get_item:cid}}</td>
|
||||
|
||||
{% if exam.app_name == "longs" or exam.app_name == "rapids" %}
|
||||
<td>{{user_scores_normalised|get_item:cid}}</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{% if pass_status|get_item:cid == 'Pass' %}
|
||||
<span class="badge bg-success">Pass</span>
|
||||
{% else %}
|
||||
<span class="badge bg-danger">Fail</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if can_edit %}
|
||||
<td>
|
||||
{% include "generic/partials/_candidate_stats_checkbox.html" with cid=cid is_excluded=excluded_map|get_item:cid exam=exam %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
@@ -148,10 +148,10 @@
|
||||
|
||||
{% block breakdown %}{% endblock breakdown %}
|
||||
|
||||
<details
|
||||
hx-get="{% url exam.app_name|add:':exam_report_email_status' exam_id=exam.pk %}"
|
||||
hx-trigger="revealed"
|
||||
hx-target="#user-details">
|
||||
<details
|
||||
hx-get="{% url exam.app_name|add:':exam_report_email_status' exam_id=exam.pk %}"
|
||||
hx-trigger="revealed"
|
||||
hx-target="#user-details">
|
||||
<summary>Email results</summary>
|
||||
User results emailed: {{exam.exam_results_emailed|default:"Never"}}<br/>
|
||||
<button id="email-results-button"
|
||||
@@ -183,7 +183,7 @@
|
||||
<script>
|
||||
function filterCandidates(query) {
|
||||
const q = query.toLowerCase().trim();
|
||||
|
||||
|
||||
// Filter candidate list rows
|
||||
document.querySelectorAll('.candidate-row').forEach(row => {
|
||||
const name = row.getAttribute('data-cid-name') || '';
|
||||
|
||||
Reference in New Issue
Block a user