Fix indentation and formatting in exam order editing functionality for improved readability

This commit is contained in:
Ross
2025-12-29 12:15:18 +00:00
parent 465f819973
commit 32c4305754
+6 -6
View File
@@ -157,7 +157,7 @@
}) })
$("#button-edit-order").click(function (evt) { $("#button-edit-order").click(function (evt) {
// hide the edit button while in edit mode so we can restore it after saving // hide the edit button while in edit mode so we can restore it after saving
$(this).addClass('d-none').prop('disabled', true); $(this).addClass('d-none').prop('disabled', true);
sortable('.sortable'); sortable('.sortable');
$("#full-question-list").addClass('sorting'); $("#full-question-list").addClass('sorting');
@@ -165,11 +165,11 @@
$("#full-question-list li").attr("title", "Drag to reorder"); $("#full-question-list li").attr("title", "Drag to reorder");
$("#full-question-list").after($("<button id='random-order-button'>Randomise order</button>").click(() =>{ $("#full-question-list").after($("<button id='random-order-button'>Randomise order</button>").click(() =>{
var ul = document.getElementById("full-question-list"); var ul = document.getElementById("full-question-list");
for (var i = ul.children.length; i >= 0; i--) { for (var i = ul.children.length; i >= 0; i--) {
ul.appendChild(ul.children[Math.random() * i | 0]); ul.appendChild(ul.children[Math.random() * i | 0]);
} }
renumber(); renumber();
})) }))