Fix indentation and formatting in exam order editing functionality for improved readability
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
})
|
||||
$("#button-edit-order").click(function (evt) {
|
||||
// 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');
|
||||
$("#full-question-list").addClass('sorting');
|
||||
|
||||
@@ -165,11 +165,11 @@
|
||||
$("#full-question-list li").attr("title", "Drag to reorder");
|
||||
|
||||
$("#full-question-list").after($("<button id='random-order-button'>Randomise order</button>").click(() =>{
|
||||
var ul = document.getElementById("full-question-list");
|
||||
for (var i = ul.children.length; i >= 0; i--) {
|
||||
ul.appendChild(ul.children[Math.random() * i | 0]);
|
||||
}
|
||||
renumber();
|
||||
var ul = document.getElementById("full-question-list");
|
||||
for (var i = ul.children.length; i >= 0; i--) {
|
||||
ul.appendChild(ul.children[Math.random() * i | 0]);
|
||||
}
|
||||
renumber();
|
||||
}))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user