tidy up the marker changes

This commit is contained in:
Ross
2024-08-05 13:20:29 +01:00
parent e46f843284
commit b73b43d155
24 changed files with 300 additions and 58 deletions
@@ -27,8 +27,8 @@
{% endif %}
This exam has {{question_number}} questions.
<span title="Time per question: {% widthratio exam.time_limit question_number 1 %} seconds">Time limit: {{exam.time_limit}} seconds [{{exam.get_time_limit}}]
This exam has {{question_number}} questions.
<span title="Time per question: {% widthratio exam.time_limit question_number 1 %} seconds">Time limit: {{exam.time_limit}} seconds [{{exam.get_time_limit}}]
<i class="bi bi-info-circle"></i>
</span>.
Exam mode: {{ exam.exam_mode }}<br />
@@ -37,22 +37,33 @@ Exam mode: {{ exam.exam_mode }}<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 />
{% endif %}
<details>
<summary>Answer management</summary>
Markers:
{% for marker in exam.markers.all %}
{{marker}}{% if not forloop.last %},{% endif %}
{% empty %}
<span title="Only exam authors will be able to mark.">No additional markers.</span>
{% endfor %}
<br/>
<div class="alert alert-danger">
<p>Manage answers for this collection. </p>
Please note these are permanant and cannot be undone.
</div>
{% if can_edit %}
<details>
<summary>Answer management</summary>
<button title="This will clear all user answers and attempts"
hx-post="{% url exam.get_app_name|add:':exam_reset_answers' exam.pk %}"
hx-swap="outerHTML"
hx-confirm="Are you sure you want to reset all answers? This action cannot be undone."
>Reset all answers</button>
</details>
<div class="alert alert-danger">
<p>Manage answers for this collection. </p>
Please note these are permanant and cannot be undone.
</div>
<button title="This will clear all user answers and attempts"
hx-post="{% url exam.get_app_name|add:':exam_reset_answers' exam.pk %}"
hx-swap="outerHTML"
hx-confirm="Are you sure you want to reset all answers? This action cannot be undone."
>Reset all answers</button>
</details>
{% endif %}
Open access: {{ exam.open_access }}<br />
@@ -60,16 +71,24 @@ Open access: {{ exam.open_access }}<br />
Start date: {{ exam.start_date }}
{% endif %}
{% if exam.end_date %}
/ End date: {{ exam.end_date }}
/ End date: {{ exam.end_date }}
{% endif %}
<div class="parent-help" title="Click to enable / disable the exam">
Exam active: <input type="checkbox" id="exam-active-switch" {% if exam.active %}checked{% endif %} data-posturl="{% url exam.get_app_name|add:':exam_toggle_active' pk=exam.pk %}"> <span class="help-text">[When checked the exam will be available to take in the test system]</span>
Exam active: <input type="checkbox"
{% if not can_edit %}
disabled
{% endif %}
id="exam-active-switch" {% if exam.active %}checked{% endif %} data-posturl="{% url exam.get_app_name|add:':exam_toggle_active' pk=exam.pk %}"> <span class="help-text">[When checked the exam will be available to take in the test system]</span>
</div>
{% if exam.exam_mode %}
<div class="parent-help" title="Click to enable / disable the exam results">
Publish results: <input type="checkbox" id="exam-publish-results-switch" data-posturl="{% url exam.get_app_name|add:':exam_toggle_results_published' pk=exam.pk %}"
Publish results: <input type="checkbox"
{% if not can_edit %}
disabled
{% endif %}
id="exam-publish-results-switch" data-posturl="{% url exam.get_app_name|add:':exam_toggle_results_published' pk=exam.pk %}"
{% if exam.publish_results %}checked{% endif %}> <span class="help-text">[When checked the exam results will be available to users on this site]</span>
</div>
{% if exam.get_app_name == "anatomy" or exam.get_app_name == "rapids" or exam.get_app_name == "longs" %}