This commit is contained in:
Ross
2024-12-16 12:14:26 +00:00
parent 69664b7b50
commit 720debc2a5
2 changed files with 58 additions and 46 deletions
@@ -13,6 +13,9 @@
This collection contains the following exams
{% if object.anatomy_exams.all %}
<h2>Anatomy Exams:</h2>
<ul>
{% for exam in object.anatomy_exams.all %}
@@ -20,7 +23,9 @@ This collection contains the following exams
{% endfor %}
</ul>
<a href="{% url 'anatomy:exam_list_collection' object.pk %}">View exam list</a>
{% endif %}
{% if object.longs_exams.all %}
<h2>Longs Exams:</h2>
<ul>
{% for exam in object.longs_exams.all %}
@@ -28,7 +33,9 @@ This collection contains the following exams
{% endfor %}
</ul>
<a href="{% url 'longs:exam_list_collection' object.pk %}">View exam list</a>
{% endif %}
{% if object.rapids_exams.all %}
<h2>Rapids Exams:</h2>
<ul>
{% for exam in object.rapids_exams.all %}
@@ -36,7 +43,9 @@ This collection contains the following exams
{% endfor %}
</ul>
<a href="{% url 'rapids:exam_list_collection' object.pk %}">View exam list</a>
{% endif %}
{% if object.physics_exams.all %}
<h2>Physics Exams:</h2>
<ul>
{% for exam in object.physics_exams.all %}
@@ -44,7 +53,9 @@ This collection contains the following exams
{% endfor %}
</ul>
<a href="{% url 'physics:exam_list_collection' object.pk %}">View exam list</a>
{% endif %}
{% if object.sbas_exams.all %}
<h2>SBAs Exams:</h2>
<ul>
{% for exam in object.sbas_exams.all %}
@@ -52,6 +63,7 @@ This collection contains the following exams
{% endfor %}
</ul>
<a href="{% url 'sbas:exam_list_collection' object.pk %}">View exam list</a>
{% endif %}
+4 -4
View File
@@ -2265,9 +2265,9 @@ class ExamViews(View, LoginRequiredMixin):
case _:
max_score = len(questions)
cid_user_exam = exam.cid_user_exam.filter(user_user=user).first()
print(user)
print(f"{cid_user_exam=}")
#cid_user_exam = exam.cid_user_exam.filter(user_user=user).first()
#print(user)
#print(f"{cid_user_exam=}")
template_context = {
"exam": exam,
@@ -2281,7 +2281,7 @@ class ExamViews(View, LoginRequiredMixin):
"answers_and_marks": answers_and_marks,
"view_all_results": view_all_results,
"supervisor": supervisor,
"cid_user_exam": cid_user_exam,
#"cid_user_exam": cid_user_exam,
}
if self.normalise_score is not None: