This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing
All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.
Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
MDL-78806 core: Remove redundant site name on page titles
* With the site name now being appended to the page titles, there
is no need to manually append the page titles.
It's possible to have some Moodle components soft linked instead
of being real directories within codebase (within dirroot).
For example, Composer's "vendor" directory can be soft linked
(from elsewhere), or also plugins can be installed using soft
links.
In those cases, Moodle calculates the $SCRIPT global as null. And,
then, string operations on it are emitting a PHP deprecation message
with PHP 8.1 and up.
This fix just ensures that the behaviour is the same than before
PHP 8.1, aka: ltrim(null) = '' (empty string), without any PHP warning.
Secondary nav previously had to be in my_plugin\local\views\secondary; this
location continues to work but is deprecated. The new location is
my_plugin\navigation\views\secondary.
Some pages have settings that really aren't required anymore.
These have been removed and a function has been aded so that other
developers can turn off the navigation overflow if they want.
The coding exception hint should say it all. Creating an activity module
should not need any output function call. It turned out it can lead to
hard-to-debug bugs and unexpected behaviour. So better to explicitly
fail and let the developer fix the code.
If enabled $CFG->allowcohortthemes, then themes can be set at the cohort level.
This will affect all users with only one cohort or more than one but with the same theme.
The default theme order will be: course, category, session, user, cohort, site.
Previous commits were overlooked, they should have passed the
system context to filter_manager::setup_page_for_fitlers(), the
page context was passed instead. Regardless, the processing of
the latter is too excessive for what we need, but, more importantly,
it does not return "Off, but available" filters which we also need.
This introduces a flag to force the settings menu
to be displayed on the page if the theme uses a settings
menu. This is for use by activities and resources.