Refactor stats and answers display for improved layout and readability
This commit is contained in:
@@ -39,17 +39,17 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="stats-plot">{{plot|safe}}</div>
|
<div id="stats-plot">{{plot|safe}}</div>
|
||||||
<div id="stats-block" title="low scores (<20% max) are excluded from statistics">
|
<div id="stats-block" title="low scores (<20% max) are excluded from statistics" class="mb-2 small">
|
||||||
<h3>Stats</h3>
|
<h5 class="mb-1">Stats</h5>
|
||||||
Candidates: {{cids|length}}<br />
|
<div>Candidates: <span class="fw-semibold">{{cids|length}}</span></div>
|
||||||
Questions: <span id="question-number">{{question_number}}</span><br />
|
<div>Questions: <span id="question-number">{{question_number}}</span></div>
|
||||||
<span title="Max score">Available marks: {{max_score}}</span><br />
|
<div title="Max score">Available marks: {{max_score}}</div>
|
||||||
Mean: {{mean}}, Median {{median}}, Mode {{mode}}<br />
|
<div>Mean: {{mean}}, Median {{median}}, Mode {{mode}}</div>
|
||||||
Top score: {{exam.stats_max}}
|
<div>Top score: {{exam.stats_max}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="mb-3">
|
||||||
<table class="table table-dark table-striped table-hover table-sm cid-score-table sortable">
|
<div class="table-responsive">
|
||||||
|
<table class="table table-dark table-striped table-hover table-sm cid-score-table sortable small">
|
||||||
<tr>
|
<tr>
|
||||||
<th title="click to sort by candidate / user id">Candidate ID</th>
|
<th title="click to sort by candidate / user id">Candidate ID</th>
|
||||||
<th title="click to sort by score">Score</th>
|
<th title="click to sort by score">Score</th>
|
||||||
@@ -80,9 +80,17 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-1">
|
||||||
|
<h5 class="mb-0">Answers as a table</h5>
|
||||||
<div>
|
<div>
|
||||||
<h3>Answers as a table</h3>
|
<button class="btn btn-sm btn-outline-secondary" data-bs-toggle="collapse" data-bs-target="#answers-table" aria-expanded="true">Toggle answers</button>
|
||||||
<table class="table table-dark table-striped table-hover table-sm col-sm">
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="collapse show" id="answers-table">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-dark table-striped table-hover table-sm col-sm small">
|
||||||
<thead class="thead-dark">
|
<thead class="thead-dark">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Candidate</th>
|
<th>Candidate</th>
|
||||||
@@ -128,6 +136,8 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% block breakdown %}{% endblock breakdown %}
|
{% block breakdown %}{% endblock breakdown %}
|
||||||
|
|
||||||
@@ -192,6 +202,12 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: darkblue;
|
color: darkblue;
|
||||||
}
|
}
|
||||||
|
/* Reduce vertical spacing for dense score tables */
|
||||||
|
.cid-score-table td, .cid-score-table th, table.table-sm td, table.table-sm th {
|
||||||
|
padding: .25rem .4rem;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
#stats-block { font-size: .9rem; }
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user