public/course/UPGRADING.md
The external function core_course_get_course_contents now includes the candisplay property for each returned module. If this is false, the module should not be displayed on the course page (for example, for question banks).
For more information see MDL-85405
Add a new invalidation event for course action state so we can purge the courseactionsinstances cache when needed.
For more information see MDL-86862
Two optional new strings, modulename_summary and modulename_tip, have been added to modules and will be displayed in the activity chooser interface when defined.
For more information see MDL-87117
Add new routes for course module, so we can predict what would be the next page to show when using course linear navigation. The route url will be like course/cms/<cmid>/next. If there is not next page, this will return a 404 error.
For more information see MDL-87467
New 'restricted' parameter has been added to course_section_view() function to define whether the section was restricted for the user or not.
For more information see MDL-87679
The cm_info class now includes get_navigation_url(), set_navigation_url(?url $url), and reset_navigation_url() methods, allowing activities to explicitly define, override, or suppress their navigation URL. This customisation can be managed within the cm_info_dynamic callback. By setting the navigation URL to null, a module can be effectively excluded from the linear navigation flow, such as the automatic "Previous" and "Next" routing URLs. In cases where no override is specified, get_navigation_url() will return the default $cm->url by fallback.
For more information see MDL-87984
A new protected hidesettings property has been added to pagelib to force the page to hide the settings menu. Use set_hide_settings() and get_hide_setting() to fully hide the settings menu.
For more information see MDL-88214
The description field is no longer available on the edit form for delegated sections like mod_subsection.
For more information see MDL-87279
Deprecates moveto_module (core_course) in favor of cmactions::move_before or cmactions::move_end_section (core_courseformat\local\cmactions).
For more information see MDL-86854
The following methods have been deprecated and should no longer be used: - course_delete_module - course_module_flag_for_async_deletion Please consider using the equivalent methods, delete and delete_async, in core_courseformat\local\cmactions instead.
For more information see MDL-86856
Deprecates set_coursemodule_groupmode in favor of core_courseformat\cmactions::set_groupmode
For more information see MDL-86857
The duplicate_module has been deprecated in favor of core_courseformat\cmactions::duplicate
For more information see MDL-86858
The course_set_marker function has been deprecated and should no longer be used. Please consider using the equivalent methods, set_marker or remove_all_markers, in core_courseformat\local\sectionactions instead.
For more information see MDL-86860
\core_course_bulk_activity_completion_renderer::edit_default_completion() has been removed from public/course/classes/output/bulk_activity_completion_renderer.php.\core_course\reportbuilder\local\formatters\enrolment::enrolment_name() has been removed from public/course/classes/reportbuilder/local/formatters/enrolment.php.For more information see MDL-87425
The replaceSectionActionItem() has been removed from public/course/amd/src/actions.js.
For more information see MDL-87426
\core_courseformat\output\section_renderer\core_course_renderer::course_category_tree_category() has removed in public/course/renderer.php.For more information see MDL-87427
The following classes have been renamed and now support autoloading. Existing classes are currently unaffected.
| Old class name | New class name |
|---|---|
\course_request | \core_course\course_request |
For more information see MDL-82322
Activities can now specify an additional purpose in their PLUGINNAME_supports function by using the new FEATURE_MOD_OTHERPURPOSE feature.
For more information see MDL-85598
Added new gradable property to core_course\local\entity\content_item
For more information see MDL-86036
The following classes have been renamed and now support autoloading. Existing classes are currently unaffected.
| Old class name | New class name |
|---|---|
\cm_info | `\course\cm_info |
\cached_cm_info | \course\cached_cm_info |
\section_info | \course\section_info |
\course_modinfo | \course\modinfo |
For more information see MDL-86155
Removed fictitious __empty() magic method.
The empty() method does not make use of any __empty() method. It is not a
defined magic method.
For more information see MDL-86155
The 'Show description' checkbox is now present in all course formats. Activity descriptions can be displayed via the Additional activities block (formerly the Main menu block), regardless of whether the course format's has_view_page() function returns false.
For more information see MDL-85433
The core_course_get_course_content_items is now deprecated. Use core_courseformat_get_section_content_items instead.
For more information see MDL-80295
The course_section_add_cm_control course renderer method is deprecated. Use section_add_cm_controls instead.
For more information see MDL-80295
Passing the section number (integer) to the core_course\output\activitychooserbutton is deprecated. You must use a core_course\section_info instead.
For more information see MDL-80295
The getModulesData and activityModules methods from core_course/local/activitychooser/repository are deprecated. Use getSectionModulesData and sectionActivityModules instead
For more information see MDL-80295
The duplicatesection param in course/view.php is deprecated. Use course/format/update.php with action section_duplicate instead.
For more information see MDL-84216
The changenumsections.php script is deprecated. Please use course/format/update.php instead.
For more information see MDL-85284
The \course\cm_info::$extra and \course\cm_info::$score properties will now
emit appropriate debugging.
These have been deprecated for a long time, but did not emit any debugging.
For more information see MDL-86155
The MAX_MODINFO_CACHE_SIZE constant has been deprecated and replaced with a class constant.
For more information see MDL-86155
The course renderer method course_activitychooser is now deprecated. Its logic is not part of the new section_renderer::add_cm_controls method.
For more information see MDL-86337
The activitychoosertabmode setting has been removed. Consider implementing your own setting in your theme if needed.
For more information see MDL-85533
Now the core_courseformat\local\content\cm\completion output is more reusable. All the HTML has been moved to its own mustache file, and the output class has a new set_smallbutton method to decide wether to rendered it as a small button (like in the course page) or as a normal one (for other types of pages).
For more information see MDL-83872
New core_course\output\activity_icon class to render activity icons with or without purpose color. This output will centralize the way Moodle renders activity icons
For more information see MDL-84555
The core_course_edit_module and core_course_edit_section external functions are now deprecated. Use core_courseformat_update_course instead
For more information see MDL-82342
The core_course_get_module external function is now deprecated. Use fragment API using component core_courseformat and fragment cmitem instead
For more information see MDL-82342
The course_format_ajax_support function is now deprecated. Use course_get_format($course)->supports_ajax() instead.
For more information see MDL-82351
course_get_cm_edit_actions is now deprecated. Formats should extend core_courseformat\output\local\content\cm\controlmenu instead.
For more information see MDL-83527
Final deprecation of edit_default_completion()
For more information see MDL-78711
Final removal of core_course\output\activity_information
For more information see MDL-78926
Final deprecation of core_course_renderer\render_activity_information()
For more information see MDL-78926
sectionNum parameter has been added to activitychooser AMD module initializer.sectionnum parameter has been added to get_course_content_items() external function.sectionnum parameter has been added to get_content_items_for_user_in_course() function.For more information see MDL-81675
The core_course_get_courses_by_field web service now accepts a new parameter sectionid to be able to retrieve the course that has the indicated section.
For more information see MDL-81699
Added new activitychooserbutton output class to display the activitychooser button. New action_links can be added to the button via hooks converting it into a dropdown.
For more information see MDL-81767
New \core_course\hook\before_activitychooserbutton_exported hook added to allow third-party plugins to extend activity chooser button options.
For more information see MDL-81767
The following methods have been updated to accept a section name in addition to the section number:
\behat_course::i_open_section_edit_menu()\behat_course::i_show_section()\behat_course::i_hide_section(),\behat_course::i_wait_until_section_is_available()\behat_course::show_section_link_exists()\behat_course::hide_section_link_exists()\behat_course::section_exists()For more information see MDL-82259
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:
$mform->addElement('static', 'assigndelete', get_string('delete'));For more information see MDL-81872
The external function core_course_get_contents now returns the component and itemid of sections.
For more information see MDL-82385
The data-sectionid attribute in the activity chooser has been deprecated. Please update your code to use data-sectionnum instead.
For more information see MDL-81676
The $course parameter in the constructor of the \core_course\output\actionbar\group_selector class has been deprecated and is no longer used.
For more information see MDL-82393