.
This commit is contained in:
@@ -35,10 +35,29 @@
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% if can_edit %}
|
||||
<div class="card mb-3 bg-dark text-light border-secondary shadow-sm col-md-6 col-lg-4">
|
||||
<div class="card-body py-2 px-3">
|
||||
<form hx-post="{% url exam.app_name|add:':update_pass_mark' exam.pk %}" class="row g-2 align-items-center">
|
||||
{% csrf_token %}
|
||||
<div class="col-auto">
|
||||
<label for="pass_mark_input" class="col-form-label col-form-label-sm">Pass Mark:</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input type="number" step="any" id="pass_mark_input" name="pass_mark" class="form-control form-control-sm bg-dark text-light border-secondary" placeholder="Default: {{ default_pass_mark }}" value="{{ exam.pass_mark|default_if_none:'' }}">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary">Set</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Stats Container Lazy-Loader -->
|
||||
<div id="stats-container"
|
||||
hx-get="{% url exam.app_name|add:':exam_scores_all' exam.pk %}?stats_only=true"
|
||||
hx-trigger="load"
|
||||
hx-trigger="load, refreshStats from:body"
|
||||
hx-swap="outerHTML">
|
||||
<div class="card mb-3 bg-dark text-light border-secondary shadow-sm">
|
||||
<div class="card-body text-center py-4">
|
||||
@@ -66,6 +85,10 @@
|
||||
{% 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 }}">
|
||||
@@ -86,6 +109,18 @@
|
||||
{% 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>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<input type="checkbox"
|
||||
hx-post="{% url exam.app_name|add:':toggle_candidate_stats_exclusion' exam.pk %}?candidate={{ cid }}"
|
||||
hx-swap="outerHTML"
|
||||
title="Check to include in statistics calculations"
|
||||
{% if not is_excluded %}checked{% endif %}>
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<div class="card bg-dark text-light border-secondary h-100 shadow-sm">
|
||||
<div class="card-body">
|
||||
<div class="text-uppercase text-muted small fw-semibold mb-1">Pass Rate (≥ 50%)</div>
|
||||
<div class="text-uppercase text-muted small fw-semibold mb-1">Pass Rate (≥ {{ pass_mark_threshold }})</div>
|
||||
<div class="fs-3 fw-bold text-info">{{ pass_rate }}%</div>
|
||||
<div class="small text-muted mt-1">{{ passed_candidates_count }} of {{ cids|length }} candidates</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user