Add primary answer display to exam review question fragment and ensure safe rendering of question text

This commit is contained in:
Ross
2025-11-10 12:37:13 +00:00
parent e7c15a75a0
commit 744f2c7600
3 changed files with 82 additions and 19 deletions
@@ -17,7 +17,7 @@
<div class="card border-{{ qs.colour }} h-100">
<div class="card-body">
<div class="d-flex justify-content-between">
<h5 class="card-title">Question {{ qs.q_index|add:1 }}: {{ qs.question }}</h5>
<h5 class="card-title">Question {{ qs.q_index|add:1 }}: {{ qs.question |safe }}</h5>
<span class="badge bg-{{ qs.colour }} align-self-start">{% if qs.correct_pct is not None %}{{ qs.correct_pct }}% correct{% elif qs.answered_pct is not None %}{{ qs.answered_pct }}% answered{% else %}No data{% endif %}</span>
</div>