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.
Applied the following changes to various testcase classes:
- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.
Special mention to:
- Some fixtures, initially defined in the test files have been
moved to new files in fixtures subdirectory, leaving the unit
test files clearer:
- moodle2_course_format_test.php
- Rename wrong named test:
- baseoptiogroup_test = baseoptigroup_test
We need a way to decide whether an action can currently be completed
(e.g., an assignment where submissions are not yet open can not
be actioned, even though it may be displayed on the upcomming events
list).
To do this, the action interface now contains an is_actionable method.
Part of MDL-55611 epic.
Course modules can now implement the function mod_{module}_core_calendar_provide_event_action
which allows them to return an action to attach to an event.
Part of MDL-55611 epic.