This commit includes more changes, all them also adding the :void
return type to unit tests missing them.
The difference is that all these changes, while also detected
perfectly by the moodle.PHPUnit.TestReturnType sniff, were not
auto-fixed (like the previous commit ones), because all them
do include some "return" statement and, for safety, we don't
fix them.
All the cases have been visually inspected and confirmed that
the existing "return" statements always belong to anon
functions within the test body and not the test own return statement.
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.
Activity chooser is saving section number in a data attribute called
data-sectionid. We should use data-sectionnum instead to make it easier
to understand.
* When a course activity is specified via an anchor in the URL we
should expand the course content containing the activity
* When we point to a specific activity via an anchor in the URL we should
expand the course index (section) surrounding the actitity.
- Created sectiondelegatemodule abstract class for those delegated sections
managed by a module
- This class will override get_parent_section from the base class, retrieving
the parent section from the module
The changes here are heterogeneous:
- Include stuff that is not available (other test has included it).
Sometimes local to a unit test, others in setupBeforeClass() or
globally, ... depends on every case.
- Rename some tests (namespaces, test name, ...) towards getting it
running.
- Amend small bits here and there.
Important note: I've left any "cosmetic" warning out from the
changes, only a few errors (like long array syntax) have been fixed.
The section header from the section template has been moved to the content template
so we don't close it from within the content template.
Nothing seems to use the content template, so there should not be any
differences in HTML output anywhere.