.
This commit is contained in:
+5
-5
@@ -91,19 +91,19 @@ def cid_scores(request, pk):
|
|||||||
raise Http404("cid not found")
|
raise Http404("cid not found")
|
||||||
|
|
||||||
physics_exam_ids = physics_answers.values_list("exam").distinct()
|
physics_exam_ids = physics_answers.values_list("exam").distinct()
|
||||||
physics_exams = PhysicsExam.objects.filter(id__in=physics_exam_ids)
|
physics_exams = PhysicsExam.objects.filter(id__in=physics_exam_ids, publish_results=True)
|
||||||
|
|
||||||
anatomy_exam_ids = anatomy_answers.values_list("exam").distinct()
|
anatomy_exam_ids = anatomy_answers.values_list("exam").distinct()
|
||||||
anatomy_exams = AnatomyExam.objects.filter(id__in=anatomy_exam_ids)
|
anatomy_exams = AnatomyExam.objects.filter(id__in=anatomy_exam_ids, publish_results=True)
|
||||||
|
|
||||||
rapids_exam_ids = rapids_answers.values_list("exam").distinct()
|
rapids_exam_ids = rapids_answers.values_list("exam").distinct()
|
||||||
rapids_exams = RapidsExam.objects.filter(id__in=rapids_exam_ids)
|
rapids_exams = RapidsExam.objects.filter(id__in=rapids_exam_ids, publish_results=True)
|
||||||
|
|
||||||
longs_exam_ids = longs_answers.values_list("exam").distinct()
|
longs_exam_ids = longs_answers.values_list("exam").distinct()
|
||||||
longs_exams = LongsExam.objects.filter(id__in=longs_exam_ids)
|
longs_exams = LongsExam.objects.filter(id__in=longs_exam_ids, publish_results=True)
|
||||||
|
|
||||||
sbas_exam_ids = sbas_answers.values_list("exam").distinct()
|
sbas_exam_ids = sbas_answers.values_list("exam").distinct()
|
||||||
sbas_exams = LongsExam.objects.filter(id__in=sbas_exam_ids)
|
sbas_exams = SbasExam.objects.filter(id__in=sbas_exam_ids, publish_results=True)
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
|
|||||||
@@ -4,35 +4,46 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<h2>CID: {{ cid }}</h2>
|
<h2>CID: {{ cid }}</h2>
|
||||||
The following exams have been found (click to view answers and scores):
|
The following exams have been found (click to view answers and scores):
|
||||||
|
{% if physics_exams %}
|
||||||
<h3>Physics</h3>
|
<h3>Physics</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for exam in physics_exams %}
|
{% for exam in physics_exams %}
|
||||||
<li><a href="{% url 'physics:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
<li><a href="{% url 'physics:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% if anatomy_exams %}
|
||||||
<h3>Anatomy</h3>
|
<h3>Anatomy</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for exam in anatomy_exams %}
|
{% for exam in anatomy_exams %}
|
||||||
<li><a href="{% url 'anatomy:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
<li><a href="{% url 'anatomy:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% if rapids_exams %}
|
||||||
<h3>Rapids</h3>
|
<h3>Rapids</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for exam in rapids_exams %}
|
{% for exam in rapids_exams %}
|
||||||
<li><a href="{% url 'rapids:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
<li><a href="{% url 'rapids:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% if longs_exams %}
|
||||||
<h3>Longs</h3>
|
<h3>Longs</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for exam in longs_exams %}
|
{% for exam in longs_exams %}
|
||||||
<li><a href="{% url 'longs:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
<li><a href="{% url 'longs:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% if sbas_exams %}
|
||||||
<h3>SBAs</h3>
|
<h3>SBAs</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for exam in sbas_exams %}
|
{% for exam in sbas_exams %}
|
||||||
<li><a href="{% url 'sbas:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
<li><a href="{% url 'sbas:exam_scores_cid_user' pk=exam.pk sk=cid %}">{{exam.name}}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</
|
||||||
|
{% endif %}
|
||||||
|
l>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user