This commit is contained in:
Ross
2024-10-14 10:50:34 +01:00
parent 61293f90a6
commit 615d5f8f80
6 changed files with 30 additions and 52 deletions
+2 -16
View File
@@ -37,22 +37,8 @@
{{ author }},
{% endfor %}
</div>
{% if can_edit %}
<p>
<button id='button-edit-order' title='click and drag questions to change order' data-posturl="{% url 'anatomy:exam_json_edit' pk=exam.pk %}">Edit question order / Delete questions</button>
</p>
{% endif %}
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
</div>
<a href="{% url 'anatomy:exam_json' pk=exam.pk %}">JSON</a>
<a href="{% url 'anatomy:exam_json_unbased' pk=exam.pk %}">JSON (unbased)</a>
<a href="{% url 'anatomy:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
{% if request.user.is_superuser %}
<button id='button-open-access' data-posturl="{% url 'anatomy:exam_json_edit' pk=exam.pk %}">Make questions open access</button>
<button id='button-closed-access' data-posturl="{% url 'anatomy:exam_json_edit' pk=exam.pk %}">Make questions closed access</button>
{% endif %}
{% include 'generic/exam_footer.html' %}
</div>
{% include 'exam_overview_js.html' %}
+1 -1
View File
@@ -11,5 +11,5 @@
<a href="{% url 'anatomy:exam_cids' exam_id=exam.pk %}">Candidates</a> /
<a href="{% url 'anatomy:exam_stats' exam_id=exam.pk %}">Stats</a> /
{% endif %}
<a href="{% url 'anatomy:anatomy_create_exam' pk=exam.pk %}">Add New Question</a>
<a href="{% url 'anatomy:anatomy_create_exam' pk=exam.pk %}" title="Add a new question directly into the exam.">Add New Question</a>
{% endblock %}
@@ -0,0 +1,18 @@
{% if can_edit %}
<p>
<button id='button-edit-order' title='click and drag questions to change order' data-posturl="{% url 'anatomy:exam_json_edit' pk=exam.pk %}">Edit question order / Delete questions</button>
</p>
<details><summary>Additional details</summary>
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
</div>
<a href="{% url 'anatomy:exam_json' pk=exam.pk %}">JSON</a>
<a href="{% url 'anatomy:exam_json_unbased' pk=exam.pk %}">JSON (unbased)</a>
<a href="{% url 'anatomy:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
{% if request.user.is_superuser %}
<button id='button-open-access' data-posturl="{% url 'anatomy:exam_json_edit' pk=exam.pk %}">Make questions open access</button>
<button id='button-closed-access' data-posturl="{% url 'anatomy:exam_json_edit' pk=exam.pk %}">Make questions closed access</button>
{% endif %}
</details>
{% endif %}
@@ -46,7 +46,7 @@ Markers:
<br/>
{% if can_edit %}
{% if can_edit and exam.exam_mode %}
<details class="answer-management">
<summary>Answer management</summary>
@@ -109,10 +109,10 @@ Author(s): {% for author in exam.author.all %}
<details>
<summary>Extra</summary>
<button title="This will clear all user answers and attempts"
hx-post="{% url exam.get_app_name|add:':order_questions' exam.pk %}"
hx-swap="outerHTML"
>Order questions</button>
<button title="This will clear all user answers and attempts"
hx-post="{% url exam.get_app_name|add:':order_questions' exam.pk %}"
hx-swap="outerHTML"
>Order questions</button>
</details>
{% block css %}
+3 -18
View File
@@ -25,8 +25,8 @@
</div>
<div>
<a href="{% url 'longs:exam_question_detail' exam.id forloop.counter0 %}"
title="View the question">View</a> / <a href="{% url 'longs:long_update' question.id %}"
title="Edit the question">Edit</a>
title="View the question">View</a> / <a href="{% url 'longs:long_update' question.id %}"
title="Edit the question">Edit</a>
<span class="id"><a href="{% url 'longs:question_detail' question.id %}">[id:
{{question.pk}}]</a></span>
</div>
@@ -50,22 +50,7 @@
{% endfor %}
</div>
{% if can_edit %}
<p><button id='button-edit-order' title='click and drag questions to change order' data-posturl="{% url 'longs:exam_json_edit' pk=exam.pk %}">Edit question order / Delete questions</button></p>
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
{% if exam.recreate_json %}[JSON out of date]{% endif %}
</div>
<a href="{% url 'longs:exam_json' pk=exam.pk %}">JSON</a>
<a href="{% url 'longs:exam_json_unbased' pk=exam.pk %}">JSON (unbased)</a>
<a href="{% url 'longs:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
<a href="{% url 'longs:refresh_exam_question_json' pk=exam.pk %}">Refresh Question JSON cache</a>
<button id='button-open-access' data-posturl="{% url 'longs:exam_json_edit' pk=exam.pk %}">Make questions open access</button>
<button id='button-closed-access' data-posturl="{% url 'longs:exam_json_edit' pk=exam.pk %}">Make questions closed access</button>
{% endif %}
{% include 'generic/exam_footer.html' %}
</div>
{% include 'exam_overview_js.html' %}
+1 -12
View File
@@ -43,18 +43,7 @@
{{ author }},
{% endfor %}
</div>
{% if can_edit %}
<p><button id='button-edit-order' title='click and drag questions to change order' data-posturl="{% url 'rapids:exam_json_edit' pk=exam.pk %}">Edit question order / Delete questions</button></p>
{% endif %}
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
</div>
<a href="{% url 'rapids:exam_json' pk=exam.pk %}">JSON</a>
<a href="{% url 'rapids:exam_json_unbased' pk=exam.pk %}">JSON (unbased)</a>
<a href="{% url 'rapids:exam_json_recreate' pk=exam.pk %}">Refresh JSON cache</a>
<button id='button-open-access' data-posturl="{% url 'rapids:exam_json_edit' pk=exam.pk %}">Make questions open access</button>
<button id='button-closed-access' data-posturl="{% url 'rapids:exam_json_edit' pk=exam.pk %}">Make questions closed access</button>
{% include 'generic/exam_footer.html' %}
</div>
{% include 'exam_overview_js.html' %}