Note: The original callback was incorrectly using the $PAGE output,
which cannot be relied upon in this callback. The best we can do here is
to add a notification to explain the situation.
Allow the repository call to the web service method to complete before
re-directing, otherwise the call may not complete and/or races against
the page reload causing random Behat errors.
Since 0188af39 we've cached loaded reports, however there was an
edge case in those report sources that relied on the current user
as part of their own initialization (e.g. checking capabilities).
Co-authored-by: Marina Glancy <marina@moodle.com>
This is only randomly affecting to Moodle 4.2 with PostgreSQL 13
that, for some reason, returns the control to the script before
some files (.pid) have been deleted as part of the database
shutdown.
It seems that adding 1 second of sleep it's enough to workaround
that problem (there are examples of that in various Travis discussions).
So we are adding here 2 seconds, to ensure we are in the safe side
towards consistent passes. And we are applying the same strategy
also to the MySQL installation, just to keep them 100% parallel.
Right now, any E_DEPRECATED, E_USER_DEPRECATED error type leads
to exception in behat runs, because the behat error handled is
not aware of them. See MDL-38041 for the initial implementation.
We don't want that to happen and they must behave like other "low"
error types (notices, warnings...), that will be reported in logs
or output, but won't trigger any exception, so the test can continue.
This commit just adds those 2 "new" error types to the handler,
providing the very same behaviour for them than the rest.
Following MDL-61880 you could turn on "Authenticate token requests via
HTTP headers" but not turn this off again. This change fixes this and
adds a Behat scenario to test toggling this checkbox is saved
correctly.
When a single template is reset, the string displayed in the modal should
not reference to "all templates" to avoid confusion, as it was shown in the
original prototype for the 4.1 database project.
Probably from historical reasons and because of layout of former Moodle
versions the container the feedback is situated in has 70% width and is
indented. In nowadays themes this looks weird and gives visual inconsistency.