Add Shorts Exams support in ExamCollection forms and detail view

This commit is contained in:
Ross
2025-09-01 22:07:27 +01:00
parent 2fca5a098d
commit a7e0438290
2 changed files with 13 additions and 1 deletions
@@ -58,6 +58,17 @@
</div>
{% endif %}
{% if object.shorts_exams.all %}
<h2>Shorts Exams:</h2>
{% with exams=object.shorts_exams.all app_name="shorts" %}
{% include "exam_list.html#exam-list" %}
{% endwith %}
<a href="{% url 'shorts:exam_list_collection' object.pk %}">View exam list</a>
<div class="add-marker">
<button class="btn-sm add-marker-button" hx-get="{% url 'generic:exam_collection_add_marker' object.pk 'shorts' %}" hx-target=".add-marker" hx-swap="innerHTML">Add marker</button>
</div>
{% endif %}
{% if object.physics_exams.all %}
<h2>Physics Exams:</h2>
{% with exams=object.physics_exams.all app_name="physics" %}