This commit fixes few things:
- Fix correct language string order.
- Change the code in myprofile.php to be consistent with other checks.
- Update provided test to fix behat failure.
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
* When adding the block_site_main_menu on every page, the activity chooser generated
for this entire page is set with courseid = 1. So any activity is then added to the
home page instead of a course.
Secondary nav previously had to be in my_plugin\local\views\secondary; this
location continues to work but is deprecated. The new location is
my_plugin\navigation\views\secondary.
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
Modifies the existing upgrade step to only take into consideration
block instances that have a specific category set prior to determening
if a legacy category is being used and updating them. Instances that do
not have any category set should be ignored.
The previous upgrade step was both duplicating a lot of code, and also
very non-performant as each record was fetched from the DB into PHP and
updated there.
Most of the operations can be performed straight into the database
without requiring any fetch to PHP at all.
This change includes unit tests for the new upgrade steps to ensure that
only the relevant data is created, updated, or deleted.