Update exam links in user marking list to use dynamic URL generation based on exam type

This commit is contained in:
Ross
2026-01-04 13:01:42 +00:00
parent e600b8eb91
commit d7682ab31d
@@ -5,7 +5,11 @@
{% with exam=item.exam %}
<li class="list-group-item d-flex justify-content-between align-items-center">
<div>
<a href="{{ exam.get_absolute_url }}" class="fw-semibold">{{ exam.name }}</a>
{% if exam_type == 'anatomy' %}
<a href="{% url exam_type|add:':mark2_overview' pk=exam.pk %}" class="fw-semibold">{{ exam.name }}</a>
{% else %}
<a href="{% url exam_type|add:':mark_overview' pk=exam.pk %}" class="fw-semibold">{{ exam.name }}</a>
{% endif %}
<div class="small text-muted">Authors: {% for a in exam.author.all %}{{ a.get_full_name|default:a.username }}{% if not forloop.last %}, {% endif %}{% endfor %}</div>
</div>
<div class="text-end">