Merge branch 'MDL-70151-master' of git://github.com/andrewnicols/moodle
authorJake Dallimore <jake@moodle.com>
Wed, 9 Dec 2020 06:45:39 +0000 (14:45 +0800)
committerJake Dallimore <jake@moodle.com>
Wed, 9 Dec 2020 06:45:39 +0000 (14:45 +0800)
mod/assign/module.js

index 111003b..9b7ad6b 100644 (file)
@@ -76,6 +76,7 @@ M.mod_assign.init_grading_table = function(Y) {
         var batchform = Y.one('form.gradingbatchoperationsform');
         if (batchform) {
             batchform.on('submit', function(e) {
+                M.util.js_pending('mod_assign/module.js:batch:submit');
                 checkboxes = Y.all('td.c0 input');
                 var selectedusers = [];
                 checkboxes.each(function(node) {
@@ -102,8 +103,10 @@ M.mod_assign.init_grading_table = function(Y) {
                         confirmmessage = M.util.get_string('batchoperationconfirm' + operation.get('value'), 'assign');
                     }
                     if (!confirm(confirmmessage)) {
+                        M.util.js_complete('mod_assign/module.js:batch:submit');
                         e.preventDefault();
                     }
+                    // Note: Do not js_complete. The page being reloaded will empty it.
                 }
             });
         }