mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
This is commented out because auto-hidden toasts currently call `hide()` and trigger the `bs.toast.hide` event immediately, and _then_ apply the autohide delay. Since we automatically add M.util.pending_js calls when we _start_ to hide, and resolve them when the hide _finishes_, this means that we do: - addToast called - trigger `bs.toast.show` event - add to pending_js - [pending_js queue not empty - behat waits] - message is shown in UI - `hide()` called - trigger `bs.toast.hide` event - add to pending_js - [pending_js queue not empty - behat waits] - start autohide delay - [pending_js queue not empty - behat waits] - [pending_js queue not empty - behat waits] - [pending_js queue not empty - behat waits] - [pending_js queue not empty - behat waits] - end autohide delay - remove message (no longer present in DOM) - trigger `bs.toast.hidden` event - resolve pending_js - [pending_js queue empty - behat stops waiting] - Behat runs next step: And I should see "1 enrolled users" -- Step fails beacuse the message has been shown, and has then been removed The conversation should have been: - addToast called - trigger `bs.toast.show` event - add to pending_js - [pending_js queue not empty - behat waits] - message is shown in UI - start autohide delay - trigger `bs.toast.shown` event - resolve pending_js - [pending_js queue empty - behat stops waiting] - Behat runs next step: And I should see "1 enrolled users" -- Step passes - autohide delay ends and calls `hide()` - trigger bs.toast.hide event - add to pending_js - [behat waits] - end autohide delay - remove message (no longer present in DOM) - trigger `bs.toast.hidden` event - resolve pending_js - [pending_js queue empty - behat stops waiting] - Behat run continues See MDL-67386 for futher information.
ENROLMENT MODULES ----------------- (Yes, that's the correct English spelling ;-) ) All enrolment modules must extend base class enrol_plugin which is defined in lib/enrollib.php. You can find documentation of each method in the base class.