This commit is contained in:
Ross
2021-09-08 15:49:25 +01:00
parent 7e3dfadf6e
commit d4e9899cba
+11 -7
View File
@@ -11,12 +11,12 @@
<h1>Exam: {{ exam.name }}</h1>
This exam has {{question_number}} questions. Time limit: {{exam.time_limit}} seconds.<br />
<div class="parent-help" title="">
Normal count: {{ exam.get_normal_abnormal_breakdown }}<span
class="help-text">[Number of normal questions within the exam]</span>
Normal count: {{ exam.get_normal_abnormal_breakdown }}<span class="help-text">[Number of normal questions within
the exam]</span>
</div>
<div class="parent-help" title="">
Exam mode: {{ exam.exam_mode }}<span
class="help-text">[When true the packet will be taken as an exam (it will not self mark and results will be saved here)]</span>
Exam mode: {{ exam.exam_mode }}<span class="help-text">[When true the packet will be taken as an exam (it will
not self mark and results will be saved here)]</span>
</div>
<div class="parent-help" title="Click to enable / disable the exam">
@@ -65,7 +65,7 @@
{{ author }},
{% endfor %}
</div>
<p><button id='button-edit-order'>Edit exam order</button></p>
<p><button id='button-edit-order' title='click and drag questions to change order'>Edit exam order</button></p>
<div>
JSON creation time: {{exam.json_creation_time}} ({{exam.json_creation_time|date:"c"}}),
JSON creation id: {{exam.exam_json_id}}
@@ -189,10 +189,14 @@
sortable('.sortable');
$("#full-question-list li").each((n, el) => {
$(el).append($("<span class='exam-question-delete flex-col'>[DELETE]</span>").click(() => {el.remove();}));
$(el).append($(
"<span class='exam-question-delete flex-col'><button>DELETE</button></span>"
).click(() => {
el.remove();
}));
})
$("#full-question-list").append($("<button>Save exam order</button>").click(() => {
$("#full-question-list").append($("<button title='click and drag questions to change order'>Save exam order</button>").click(() => {
new_order = [];
$("#full-question-list li").each((n, el) => {
new_order.push(el.dataset.question_pk)