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.
An entrypoint capability has been added that allows accessing the
upload tool. Further relevant capability checks are then performed
depending on the action being taken during the upload process.
Co-authored-by: Marina Glancy <marina@moodle.com>
Stylelint 15 deprecates a heap of rules which will be removed in 16.
We can't use 16 because it's ESM and requires a big restructure of our
build process.
We can temporarily silence the deprecations and then when we update our
build tooling we can make use of @stylistic/stylelint-plugin to add the
rules back.
This commit:
- bumps stylelint and related dependencies accordingly
- fixes issues identified with newer sniffs
- temporarily silences deprecation warnings
Most params are formally deprecated here. This was originally planned
for MDL-80042, but I realised that having an emit, and final param is a
very useful option going forward.
This patch also moves the is_deprecated(), and related methods to the
\core\deprecated attribute.
For cohort enrol method we can have multiple instances. We can match
those by cohort idnumber and role provided.
Also adding some extra validation and update tests.
Currently, Moodle uses fetchOBject() from ADOdb to get the table columns.
Sadly, the current ADOdb, especially the fetchObject() function, still creates dynamic properties.
Altering the fetchObject() with fetchRow() to avoid the dynamic properties deprecation error on PHP 8.2
The $CFG->svgicons setting was introduced in Moodle 2.4 due to incomplete
SVG support in certain web browsers.
The landscape has evolved significantly since then, and all modern browsers
now handle SVG files correctly.
The $CFG->svgicons settings has been removed and the supports_svg() method
has been updated with currently supported browsers (IE support was removed
in Moodle 3.10).
When updating a manual enrolment instance, the value of 'notifyall' field must be calculated automatically based on the value of
'expirynotify' field. The relevant plugin's method missed that, thus, the value of 'notifyall' field was never updated when
editing a manual enrolment instance and changing the 'expirynotify' setting.
A functional test has been added to test the entire behaviour of the relevant plugin's method.