From c550ef8dcbfd179028d3315233c3401c3fcb0c2c Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 17 Apr 2024 11:09:53 +0100 Subject: [PATCH] MDL-81578 user: disable form change checker for bulk user actions. When bulk user actions are used from the "Browse users" report. --- admin/user/user_bulk_forms.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin/user/user_bulk_forms.php b/admin/user/user_bulk_forms.php index 1a1604e225a..62c4814fc79 100644 --- a/admin/user/user_bulk_forms.php +++ b/admin/user/user_bulk_forms.php @@ -148,6 +148,10 @@ class user_bulk_action_form extends moodleform { public function definition() { $mform =& $this->_form; + // Most bulk actions perform a redirect on selection, so we shouldn't trigger formchange warnings (specifically because + // the user must have _already_ changed the current form by selecting users to perform the action on). + $mform->disable_form_change_checker(); + $mform->addElement('hidden', 'returnurl'); $mform->setType('returnurl', PARAM_LOCALURL);