Alert when exams have no candidates

This commit is contained in:
Ross
2023-01-09 13:02:49 +00:00
parent a8f710f4aa
commit fbaa4b0027
@@ -21,17 +21,23 @@
{% if exam.exam_mode %} {% if exam.exam_mode %}
{% if not exam.cid_user_groups.count and not exam.user_user_groups.count %}
<div class="alert alert-danger" role="alert">
This exam does not have any user / cid groups added.
</div>
{% else %}
{% if not candidate_count.0 and not candidate_count.1 %} {% if not candidate_count.0 and not candidate_count.1 %}
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
This exam does not have any candidates. This exam does not have any candidates.
</div> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds. This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.
Exam mode: {{ exam.exam_mode }}<br /> Exam mode: {{ exam.exam_mode }}<br />
Candidates - cid: {{candidate_count.0}}, users: {{candidate_count.1}}<br /> Cid candidates: <a href="{{exam.get_cid_edit_url}}">{{candidate_count.0}}</a>, User candidates: <a href="{{exam.get_user_edit_url}}">{{candidate_count.1}}</a><br />
Open access: {{ exam.open_access }}<br /> Open access: {{ exam.open_access }}<br />
<div class="parent-help" title="Click to enable / disable the exam"> <div class="parent-help" title="Click to enable / disable the exam">