If an existing session is active at the time of launch, that user id
appears in the user_updated log. This log should show the launching user
updating their own record, not someone else. To resolve this, auth the
user before making any record updates so that the event gets the correct
user id.
If an existing session is active at the time of launch, that user id
appears in the user_created log, incorrectly (it should be system/0).
This patch makes sure that any existing session is terminated before
creation of a new user during launches.
While the init.php was cleaned up not long ago, let's
re-review it (small detail only) and proceed to, also,
clean up the util.php one.
Note that both will raise an error about missing MOODLE_INTERNAL
check, but that's expected, they are CLI scripts, independent
from Moodle's bootstrap, so they don't have config.php required
either.
Instead of manually including composer's auto-loading
stuff and then run PHPUnit\TextUI\Command::main(), now
we are using the PHPUnit "binary".
That way behaviour should be 100% the same than
running vendor/bin/phpunit (recommended instead of util.php --run).
Also, note that, for other util.php commands, we still need
composer's auto-loading to happen, so we have moved it immediately
after the --run command.
Finally, a few more file_exists() conditions have been added
to ensure that PHPUnit is properly installed. Redundant but...
This ensures compliance with the following WCAG criterion:
"H71: Providing a description for groups of form controls using fieldset
and legend elements".
This is consistent with the API used for other form element types,
in order to provide screen-readable text in the fieldset legend while
not necessarily wanting to display said label.
The new class property is automatically exported to the template via
the `templatable_form_element` trait.
After the changes done in MDL-79986, the "Jump to current topic/week"
link in the Sections links block stopped working.
This patch fixes it and uses the new section.php page.
The test now checks for the required icons, without needing to specify a count.
Allowing developers to add custom icons to the folder pix/f/mycustomicon.svg without needing to alter any unit test.