Add exam review functionality with navigation for questions

This commit is contained in:
Ross
2025-11-08 21:56:08 +00:00
parent 1a45f11fc2
commit 5613bf6b9f
4 changed files with 105 additions and 0 deletions
@@ -0,0 +1,8 @@
{% extends 'generic/examcollection_base.html' %}
{% block content %}
<div class="container my-4">
<div class="alert alert-info">Review complete for exam: {{ exam.name }}</div>
<p><a class="btn btn-secondary" href="{% url app_name|add:':exam_overview' exam.pk %}">Back to exam overview</a></p>
</div>
{% endblock %}
@@ -0,0 +1,32 @@
{% extends 'generic/examcollection_base.html' %}
{% block content %}
<div class="container my-4">
<h2>Reviewing: {{ exam.name }} (Question {{ q_index|add:1 }} of {{ total }})</h2>
<div class="card mb-3">
<div class="card-body">
<h5 class="card-title">Question</h5>
<p class="lead">{{ question }}</p>
<p>
<a class="btn btn-sm btn-outline-secondary" href="{% url app_name|add:':question_detail' question.pk %}" target="_blank">View full question details</a>
</p>
<div class="d-flex justify-content-between mt-3">
{% if prev_index is not None %}
<a class="btn btn-outline-primary" href="{% url app_name|add:':exam_review_question' exam.pk prev_index %}">&larr; Previous</a>
{% else %}
<span></span>
{% endif %}
{% if next_index is not None %}
<a class="btn btn-primary" href="{% url app_name|add:':exam_review_question' exam.pk next_index %}">Next &rarr;</a>
{% else %}
<a class="btn btn-success" href="{% url app_name|add:':exam_overview' exam.pk %}">Complete review</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}