This behaves very poorly and for most users has been silently not
working for many years.
When we stopped it from silently failing we discovered a number of
issues that it causes, for example:
- MDL-61117
- MDL-82790
Filename is no longer required (since 83db25c330), given it never
did anything so can be removed. Requiring the "Private files" block
also isn't necessary since original switch to generator methods.
Duplicate data provider keys were overwriting and/or duplicating
one another, leading to some cases being skipped.
Other "duplicate array key" errors were picked up by `phpcs` in
this dragnet across all tests, which have also been fixed.
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.
All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
Autolinks are used in the database for text fields via
the auto-linking filter.
The revert is partial here because of changes made
in MDL-70384 to all field forms/templates
This reverts commit 42edaba5 from MDL-80949
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.
It is better to use <strong> instead of <b> for accessibility as
<strong> is a semantic tag that convey to screen reader users that
the Attachments text is important. <b> on the other hand just makes
the text bold and is only for presentation and has no semantic meaning.
Replaces the existing YUI module in the glossary filter with an
AMD module. The auto-linked glossary entries are now obtained
through the existing webservices in mod_glossary and displayed
within a modal utilizing the core/modal js module.
Add config option to embed YouTube links using the youtube-nocookie.com
YouTube domain. This will stop extra YouTube cookies from being added
to the users computer it also stops calls to certain add tracking sites.
When libtidy removed option 'drop-font-tags' the docs said to use the
'clean' option instead (see MDL-69951). However, 'clean' replaces
legacy style information with classes, the corresponding CSS added in
<head>. With 'show-body-only' (used because we're inserting an HTML
fragment mid-way through <body>) that <head> with its CSS is omitted.
So 'clean' with 'show-body-only' removes legacy style information,
rather than tidying it. Consequently we now drop the 'clean' option.
This means <font> tags are no longer dropped as libtidy currently has
no equivalent to the removed 'drop-font-tags' functionality.