3 This file contains important information for developers on changes to the Moodle codebase.
5 More detailed information on key changes can be found in the [Developer update notes](https://moodledev.io/docs/devupdate) for your version of Moodle.
7 The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com).
15 - The previously deprecated function `search_generate_text_SQL` has been removed and can no longer be used.
17 For more information see [MDL-48940](https://tracker.moodle.org/browse/MDL-48940)
18 - The previously deprecated function `core_text::reset_caches()` has been removed and can no longer be used.
20 For more information see [MDL-71748](https://tracker.moodle.org/browse/MDL-71748)
21 - The following previously deprecated methods have been removed and can no longer be used:
22 - `renderer_base::should_display_main_logo`
24 For more information see [MDL-73165](https://tracker.moodle.org/browse/MDL-73165)
25 - Final deprecation of print_error(). Use moodle_exception instead.
27 For more information see [MDL-74484](https://tracker.moodle.org/browse/MDL-74484)
31 - The class autoloader has been moved to an earlier point in the Moodle bootstrap.
32 Autoloaded classes are now available to scripts using the `ABORT_AFTER_CONFIG` constant.
34 For more information see [MDL-80275](https://tracker.moodle.org/browse/MDL-80275)
35 - The `\core\dataformat::get_format_instance` method is now public, and can be used to retrieve a writer instance for a given dataformat
37 For more information see [MDL-81781](https://tracker.moodle.org/browse/MDL-81781)
41 - New DML constant `SQL_INT_MAX` to define the size of a large integer with cross database platform support
43 For more information see [MDL-81282](https://tracker.moodle.org/browse/MDL-81282)
44 - Added an `exception` L2 Namespace to APIs
46 For more information see [MDL-81903](https://tracker.moodle.org/browse/MDL-81903)
47 - Added a mechanism to support autoloading of legacy class files.
48 This will help to reduce the number of require_once calls in the codebase, and move away from the use of monolithic libraries.
50 For more information see [MDL-81919](https://tracker.moodle.org/browse/MDL-81919)
51 - The following exceptions are now also available in the `\core\exception` namespace:
53 - `\file_serving_exception`
54 - `\invalid_dataroot_permissions`
55 - `\invalid_parameter_exception`
56 - `\invalid_response_exception`
57 - `\invalid_state_exception`
59 - `\require_login_exception`
60 - `\require_login_session_timeout_exception`
61 - `\required_capability_exception`
62 - `\webservice_parameter_exception`
64 For more information see [MDL-81919](https://tracker.moodle.org/browse/MDL-81919)
65 - The following classes have been moved into the `\core` namespace and now support autoloading:
69 For more information see [MDL-81920](https://tracker.moodle.org/browse/MDL-81920)
70 - The following classes have been renamed and now support autoloading. Existing classes are currently unaffected.
71 | Old class name | New class name |
73 | `\moodle_url` | `\core\url` |
74 | `\progress_trace` | `\core\output\progress_trace` |
75 | `\combined_progress_trace` | `\core\output\progress_trace\combined_progress_trace` |
76 | `\error_log_progress_trace` | `\core\output\progress_trace\error_log_progress_trace` |
77 | `\html_list_progress_trace` | `\core\output\progress_trace\html_list_progress_trace` |
78 | `\html_progress_trace` | `\core\output\progress_trace\html_progress_trace` |
79 | `\null_progress_trace` | `\core\output\progress_trace\null_progress_trace` |
80 | `\progress_trace_buffer` | `\core\output\progress_trace\progress_trace_buffer` |
81 | `\text_progress_trace` | `\core\output\progress_trace\text_progress_trace` |
83 For more information see [MDL-81960](https://tracker.moodle.org/browse/MDL-81960)
84 - The following classes are now also available in the following new locations. They will continue to work in their old locations:
85 | Old classname | New classname |
87 | `\action_link` | `\core\output\action_link` |
88 | `\action_menu_filler` | `\core\output\action_menu\filler` |
89 | `\action_menu_link_primary` | `\core\output\action_menu\link_primary` |
90 | `\action_menu_link_secondary` | `\core\output\action_menu\link_secondary` |
91 | `\action_menu_link` | `\core\output\action_menu\link` |
92 | `\action_menu` | `\core\output\action_menu` |
93 | `\block_contents` | `\core_block\output\block_contents` |
94 | `\block_move_target` | `\core_block\output\block_move_target` |
95 | `\component_action` | `\core\output\actions\component_action` |
96 | `\confirm_action` | `\core\output\actions\confirm_action` |
97 | `\context_header` | `\core\output\context_header` |
98 | `\core\output\local\action_menu\subpanel` | `\core\output\action_menu\subpanel` |
99 | `\core_renderer_ajax` | `\core\output\core_renderer_ajax` |
100 | `\core_renderer_cli` | `\core\output\core_renderer_cli` |
101 | `\core_renderer_maintenance` | `\core\output\core_renderer_maintenance` |
102 | `\core_renderer` | `\core\output\core_renderer` |
103 | `\custom_menu_item` | `\core\output\custom_menu_item` |
104 | `\custom_menu` | `\core\output\custom_menu` |
105 | `\file_picker` | `\core\output\file_picker` |
106 | `\flexible_table` | `\core_table\flexible_table` |
107 | `\fragment_requirements_manager` | `\core\output\requirements\fragment_requirements_manager` |
108 | `\help_icon` | `\core\output\help_icon` |
109 | `\html_table_cell` | `\core_table\output\html_table_cell` |
110 | `\html_table_row` | `\core_table\output\html_table_row` |
111 | `\html_table` | `\core_table\output\html_table` |
112 | `\html_writer` | `\core\output\html_writer` |
113 | `\image_icon` | `\core\output\image_icon` |
114 | `\initials_bar` | `\core\output\initials_bar` |
115 | `\js_writer` | `\core\output\js_writer` |
116 | `\page_requirements_manager` | `\core\output\requirements\page_requirements_manager` |
117 | `\paging_bar` | `\core\output\paging_bar` |
118 | `\pix_emoticon` | `\core\output\pix_emoticon` |
119 | `\pix_icon_font` | `\core\output\pix_icon_font` |
120 | `\pix_icon_fontawesome` | `\core\output\pix_icon_fontawesome` |
121 | `\pix_icon` | `\core\output\pix_icon` |
122 | `\plugin_renderer_base` | `\core\output\plugin_renderer_base` |
123 | `\popup_action` | `\core\output\actions\popup_action` |
124 | `\preferences_group` | `\core\output\preferences_group` |
125 | `\preferences_groups` | `\core\output\preferences_groups` |
126 | `\progress_bar` | `\core\output\progress_bar` |
127 | `\renderable` | `\core\output\renderable` |
128 | `\renderer_base` | `\core\output\renderer_base` |
129 | `\renderer_factory_base` | `\core\output\renderer_factory\renderer_factory_base` |
130 | `\renderer_factory` | `\core\output\renderer_factory\renderer_factory_interface` |
131 | `\single_button` | `\core\output\single_button` |
132 | `\single_select` | `\core\output\single_select` |
133 | `\standard_renderer_factory` | `\core\output\renderer_factory\standard_renderer_factory` |
134 | `\table_dataformat_export_format` | `\core_table\dataformat_export_format` |
135 | `\table_default_export_format_parent` | `\core_table\base_export_format` |
136 | `\table_sql` | `\core_table\sql_table` |
137 | `\tabobject` | `\core\output\tabobject` |
138 | `\tabtree` | `\core\output\tabtree` |
139 | `\templatable` | `\core\output\templatable` |
140 | `\theme_config` | `\core\output\theme_config` |
141 | `\theme_overridden_renderer_factory` | `\core\output\renderer_factory\theme_overridden_renderer_factory` |
142 | `\url_select` | `\core\output\url_select` |
143 | `\user_picture` | `\core\output\user_picture` |
144 | `\xhtml_container_stack` | `\core\output\xhtml_container_stack` |
145 | `\YUI_config` | `\core\output\requirements\yui` |
147 For more information see [MDL-82183](https://tracker.moodle.org/browse/MDL-82183)
151 - All the setup and tear down methods of `PHPUnit` now are required to, always, call to their parent counterparts. This is a good practice to avoid future problems, especially when updating to PHPUnit >= 10.
152 This includes the following methods:
155 - `setUpBeforeClass()`
156 - `tearDownAfterClass()`
158 For more information see [MDL-81523](https://tracker.moodle.org/browse/MDL-81523)
159 - Use server timezone when constructing `\DateTimeImmutable` for the system `\core\clock` implementation.
161 For more information see [MDL-81894](https://tracker.moodle.org/browse/MDL-81894)
165 - The following methods have been deprecated, existing usage should switch to secure `\core\encryption` library:
170 For more information see [MDL-81940](https://tracker.moodle.org/browse/MDL-81940)
171 - The following method has been deprecated and should not be used any longer: `print_grade_menu`.
173 For more information see [MDL-82157](https://tracker.moodle.org/browse/MDL-82157)
174 - The following files and their contents have been deprecated:
176 - `lib/tokeniserlib.php`
178 For more information see [MDL-82191](https://tracker.moodle.org/browse/MDL-82191)
184 - Added 2 new settings:
185 - `mod_assign/defaultgradetype`
186 - The value of this setting dictates which of the GRADE_TYPE_X constants is the default option when creating new instances of the assignment.
187 - The default value is GRADE_TYPE_VALUE (Point)
188 - `mod_assign/defaultgradescale`
189 - The value of this setting dictates which of the existing scales is the default option when creating new instances of the assignment.
191 For more information see [MDL-54105](https://tracker.moodle.org/browse/MDL-54105)
192 - A new default value for `attemptreopenmethod` has been set to "Automatically until pass".
194 For more information see [MDL-80741](https://tracker.moodle.org/browse/MDL-80741)
198 - The default option "Never" for `attemptreopenmethod` setting, which disallowed multiple attempts at the assignment, has been removed. This option was unnecessary because limiting attempts to 1 through the `maxattempts` setting achieves the same behavior.
200 For more information see [MDL-80741](https://tracker.moodle.org/browse/MDL-80741)
204 - The constant `ASSIGN_ATTEMPT_REOPEN_METHOD_NONE` has been deprecated, and a new default value for `attemptreopenmethod` has been set to "Automatically until pass".
206 For more information see [MDL-80741](https://tracker.moodle.org/browse/MDL-80741)
212 - The previously deprecated `report_helper::save_selected_report` method has been removed and can no longer be used
214 For more information see [MDL-72353](https://tracker.moodle.org/browse/MDL-72353)
218 - The `report_helper::print_report_selector` method accepts an additional argument for adding content to the tertiary navigation to align with the report selector
220 For more information see [MDL-78773](https://tracker.moodle.org/browse/MDL-78773)
226 - The following deprecated methods in `report_eventlist_list_generator` have been removed:
227 - `get_core_events_list()`
228 - `get_non_core_event_list()`
230 For more information see [MDL-72786](https://tracker.moodle.org/browse/MDL-72786)
236 - The following previously deprecated Behat step helper methods have been removed and can no longer be used:
237 - `behat_grade::select_in_gradebook_navigation_selector`
238 - `behat_grade::select_in_gradebook_tabs`
240 For more information see [MDL-74581](https://tracker.moodle.org/browse/MDL-74581)
244 - The `core_grades_renderer::group_selector()` method has been deprecated. Please use `\core_course\output\actionbar\renderer` to render a `group_selector` renderable instead.
246 For more information see [MDL-80745](https://tracker.moodle.org/browse/MDL-80745)
248 ### core_reportbuilder
252 - System reports now support native entity column aggregation via each columns `set_aggregation()` method
254 For more information see [MDL-76392](https://tracker.moodle.org/browse/MDL-76392)
255 - The following external methods now return tags data relevant to each custom report:
256 - `core_reportbuilder_list_reports`
257 - `core_reportbuilder_retrieve_report`
259 For more information see [MDL-81433](https://tracker.moodle.org/browse/MDL-81433)
260 - Added a new database helper method `sql_replace_parameters` to help ensure uniqueness of parameters within a SQL expression
262 For more information see [MDL-81434](https://tracker.moodle.org/browse/MDL-81434)
266 - The following previously deprecated local helper methods have been removed and can no longer be used:
267 - `audience::get_all_audiences_menu_types`
268 - `report::get_available_columns`
270 For more information see [MDL-76690](https://tracker.moodle.org/browse/MDL-76690)
274 - In order to better support float values in filter forms, the following filter types now cast given SQL prior to comparison:
279 For more information see [MDL-81168](https://tracker.moodle.org/browse/MDL-81168)
280 - The base datasource `add_all_from_entities` method accepts a new optional parameter to specify which entities to add elements from
282 For more information see [MDL-81330](https://tracker.moodle.org/browse/MDL-81330)
283 - All time related code has been updated to the PSR-20 Clock interface, as such the following methods no longer accept a `$timenow` parameter (instead please use `\core\clock` dependency injection):
284 - `core_reportbuilder_generator::create_schedule`
285 - `core_reportbuilder\local\helpers\schedule::[create_schedule|calculate_next_send_time]`
287 For more information see [MDL-82041](https://tracker.moodle.org/browse/MDL-82041)
288 - The following classes have been moved to use the new exception API as a l2 namespace:
289 - `core_reportbuilder\\report_access_exception` => `core_reportbuilder\\exception\\report_access_exception` - `core_reportbuilder\\source_invalid_exception` => `core_reportbuilder\\exception\\source_invalid_exception` - `core_reportbuilder\\source_unavailable_exception` => `core_reportbuilder\\exception\\source_unavailable_exception`
291 For more information see [MDL-82133](https://tracker.moodle.org/browse/MDL-82133)
297 - The `token_table` and `token_filter` classes have been deprecated, in favour of new report builder implementation.
299 For more information see [MDL-79496](https://tracker.moodle.org/browse/MDL-79496)
305 - The functions quiz_overview_report::regrade_attempts and regrade_batch_of_attempts now have a new optional parameter $slots to only regrade some slots in each attempt (default all).
307 For more information see [MDL-79546](https://tracker.moodle.org/browse/MDL-79546)
309 ### gradereport_grader
313 - The `gradereport_grader/group` ESM has been deprecated. Please use `core_course/actionbar/group` instead.
315 For more information see [MDL-80745](https://tracker.moodle.org/browse/MDL-80745)
317 ### gradereport_singleview
321 - The `gradereport_singleview/group` ESM has been deprecated. Please use `core_course/actionbar/group` instead.
323 For more information see [MDL-80745](https://tracker.moodle.org/browse/MDL-80745)
329 - The `gradereport_user/group` ESM has been deprecated. Please use `core_course/actionbar/group` instead.
331 For more information see [MDL-80745](https://tracker.moodle.org/browse/MDL-80745)
337 - column_base::from_column_name now has an ignoremissing field, which can be used to ignore if the class does not exist, instead of throwing an exception.
339 For more information see [MDL-81125](https://tracker.moodle.org/browse/MDL-81125)
345 - The `data_add_record` method accepts a new `$approved` parameter to set the corresponding state of the new record
347 For more information see [MDL-81274](https://tracker.moodle.org/browse/MDL-81274)
351 - The `mod_data_renderer::render_fields_footer` method has been deprecated as it's no longer used
353 For more information see [MDL-81321](https://tracker.moodle.org/browse/MDL-81321)
359 - The `\core_message\helper::togglecontact_link_params` now accepts a new optional param called `isrequested` to indicate the status of the contact request
361 For more information see [MDL-81428](https://tracker.moodle.org/browse/MDL-81428)
365 - The `core_message/remove_contact_button` template is deprecated and will be removed in the future version
367 For more information see [MDL-81428](https://tracker.moodle.org/browse/MDL-81428)
373 - The `helplinktext` language string is no longer required by editor plugins, instead the `pluginname` will be used in the help dialogue
375 For more information see [MDL-81572](https://tracker.moodle.org/browse/MDL-81572)
381 - Added a new `renderer_base::get_page` getter method
383 For more information see [MDL-81597](https://tracker.moodle.org/browse/MDL-81597)
389 - New `core/context_header` mustache template has been added. This template can be overridden by themes to modify the context header
391 For more information see [MDL-81597](https://tracker.moodle.org/browse/MDL-81597)
395 - The method `\core\output\core_renderer::render_context_header` has been deprecated please use `\core\output\core_renderer::render($contextheader)` instead
397 For more information see [MDL-82160](https://tracker.moodle.org/browse/MDL-82160)
399 ### core_courseformat
403 - The constructor of `core_courseformat\output\local\state\cm` has been updated to accept a new optional parameter, `$istrackeduser`.
404 If `istrackeduser` is pre-computed for the course module's course, it can be provided here to avoid an additional function call.
406 For more information see [MDL-81610](https://tracker.moodle.org/browse/MDL-81610)
412 - - New optional sectionNum parameter has been added to activitychooser AMD module initializer. - New option sectionnum parameter has been added to get_course_content_items() external function. - New optional sectionnum parameter has been added to get_content_items_for_user_in_course() function.
414 For more information see [MDL-81675](https://tracker.moodle.org/browse/MDL-81675)
418 - The data-sectionid attribute in the activity chooser has been deprecated. Please update your code to use data-sectionnum instead.
420 For more information see [MDL-81676](https://tracker.moodle.org/browse/MDL-81676)
424 - The reset course page has been improved. The words "Delete" and "Remove" have been removed from all the options to make it easier to focus on the data to be removed and avoid inconsistencies and duplicated information. Third party plugins implementing reset methods might need to:
425 - Add static element in the _reset_course_form_definition method before all the options with the Delete string:
426 `$mform->addElement('static', 'assigndelete', get_string('delete'));`
427 - Review all the strings used in the reset page to remove the "Delete" or "Remove" words from them.
429 For more information see [MDL-81872](https://tracker.moodle.org/browse/MDL-81872)
435 - The method `mod_feedback\output\renderer::create_template_form()` has been deprecated. It is not used anymore.
437 For more information see [MDL-81742](https://tracker.moodle.org/browse/MDL-81742)
443 - get_overall_completion_state() function could also return COMPLETION_COMPLETE_FAIL and not only COMPLETION_COMPLETE and COMPLETION_INCOMPLETE
445 For more information see [MDL-81749](https://tracker.moodle.org/browse/MDL-81749)
451 - Bootstrap .no-gutters class is no longer used, use .g-0 instead.
453 For more information see [MDL-81818](https://tracker.moodle.org/browse/MDL-81818)
459 - The base class `info::get_groups` method has a `$userid` parameter to specify for which user you want to retrieve course groups (defaults to current user)
461 For more information see [MDL-81850](https://tracker.moodle.org/browse/MDL-81850)