This issue just goes over all the currently incorrect
namespaces in test cases and:
1. Change the namespace to the correct one.
2. Move/rename it to correct location if needed (level 2 and down).
3. Remove not needed MOODLE_INTERNAL check when possible.
4. Remove file phpdoc when the file only has one class.
5. Make small adjustments in case the change of namespace requires it.
Change-Id: Ia169a8c1dae9c6132d40158ac2a3e346dc3f5e1e
Co-authored-by: Sarah Cotton <sarah.cotton@catalyst-eu.net>
Co-authored-by: Mark Johnson <mark.johnson@catalyst-eu.net>
Verify the expected behaviour of the sync_members and sync_grades tasks
when enrolment instances are disabled, whether as a byproduct of module
deletion, or as status change made by the user.
Adds a warning to the 'name' column of the tables, letting teachers know
that the activity exposed by the method has been deleted and what their
options are.
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.
Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.
The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:
- upgrade_analytics_fix_contextids_defaults()
- upgrade_convert_hub_config_site_param_names()
- upgrade_rename_prediction_actions_useful_incorrectly_flagged()
- \mod_forum\task\refresh_forum_post_counts adhoc task.
And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):
- \core_search\manager::clean_up_non_existing_area(), used by
- \core\task\clean_up_deleted_search_area_task adhoc task
Following MDL-63580 this now finally deprecates and removes the class
\tool_task\run_from_cli, please use \core\task\manager.
Following MDL-63580 this now finally deprecates and removes
- admin/tool/task/cli/schedule_task.php, use admin/cli/scheduled_task.php
- admin/tool/task/cli/adhoc_task.php, use admin/cli/adhoc_task.php
Also mentions and references to the old CLI scripts are updated to
point to the new counterparts.
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
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
This should be a button given it's an action, and making it a button
means it can be activated using either the space or enter keys, instead
of just enter.