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
Some unit tests needed to be updated to specify a few extra
bits and pieces on the events to work properly with the
new event vault behaviour.
Part of MDL-55611 epic.
Modules associated with an event are stored in the event table
as the module's name and instance number not the actual ID of the instance
in the modules table.
So to lazy load them we need a proxy that uses the module name and instance
rather than the ID.
Part of MDL-55611 epic.
Previously every event would get piped through the two callbacks
even when the associated course module was invisible. This patch
adds an early bail out check to avoid that.
Part of MDL-55611 epic.
By implementing the mod_{modname}_core_calendar_is_event_visible callback
a module can decide whether or not a user should see an event.
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.