MDL-81578 user: disable form change checker for bulk user actions.

When bulk user actions are used from the "Browse users" report.
This commit is contained in:
Paul Holden 2024-04-17 11:09:53 +01:00
parent 8cf14f6e70
commit c550ef8dcb
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -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);