This commit is contained in:
Ross
2021-12-31 13:22:48 +00:00
parent 3a4d9cbb5a
commit 2797fe2581
5 changed files with 114 additions and 13 deletions
+30
View File
@@ -0,0 +1,30 @@
{% extends 'base.html' %}
{% block content %}
<div class="">
<h2>CID: {{ cid }}</h2>
<p>The following exams will be available to take when active.
{% for t, exams in available_exams %}
<h4>{{t}}</h4>
<ul>
{% for e in exams %}
<li><a href="{{e.get_take_url}}?cid={{cid}}&passcode={{passcode}}" target="_blank">{{e.name}} {% if e.active %}[Active]{% endif %}</a></li>
{% endfor %}
</ul>
{% endfor %}
<h3>Exam results</h3>
The following exam results been found. Click to view answers (and scores when the results are published):
{% for exam_type, exams in all_exams %}
{% if exams %}
<h4>{{exam_type|title}}</h4>
<ul>
{% for exam in exams %}
<li><a href="{% url exam_type|add:':exam_scores_cid_user' pk=exam.pk cid=cid passcode=passcode %}">{{exam.name}}</a> {% if exam.active %}[Active]{% endif %} {% if exam.publish_results %}[Results Published]{% endif %}</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
{% endblock %}
+4 -4
View File
@@ -5,11 +5,11 @@
<h2>CID: {{ cid }}</h2>
<h3>Assigned exams</h3>
<p>The following exams will be available to take when active.
{% for t, exams in available_exams %}
<h4>{{t}}</h4>
{% for exam_type, exams in available_exams %}
<h4>{{exam_type}}</h4>
<ul>
{% for e in exams %}
<li><a href="{{e.get_take_url}}?cid={{cid}}&passcode={{passcode}}" target="_blank">{{e.name}} {% if e.active %}[Active]{% endif %}</a></li>
{% for eexam in exams %}
<li><a href="{{exam.get_take_url}}?cid={{cid}}&passcode={{passcode}}" target="_blank">{{exam.name}} {% if exam.active %}[Active]{% endif %}</a></li>
{% endfor %}
</ul>
{% endfor %}