1441 |
ariadna |
1 |
# core_courseformat (subsystem / plugintype) Upgrade notes
|
|
|
2 |
|
|
|
3 |
## 5.0.2+
|
|
|
4 |
|
|
|
5 |
### Added
|
|
|
6 |
|
|
|
7 |
- Add a new modinfo::get_instance_of() to retrieve an instance of a cm via its name and instance id. Add a new modinfo::sort_cm_array() to sort an array of cms in their order of appearance in the course page. Replaces calls to get_course_and_cm_from_instance() and get_instances_of() whenever it was just used to retrieve a single instance of a cm.
|
|
|
8 |
|
|
|
9 |
For more information see [MDL-86021](https://tracker.moodle.org/browse/MDL-86021)
|
|
|
10 |
|
|
|
11 |
## 5.0
|
|
|
12 |
|
|
|
13 |
### Added
|
|
|
14 |
|
|
|
15 |
- A new core_courseformat\base::get_generic_section_name method is created to know how a specific format name the sections. This method is also used by plugins to know how to name the sections instead of using using a direct get_string on "sectionnamer" that may not exists.
|
|
|
16 |
|
|
|
17 |
For more information see [MDL-82349](https://tracker.moodle.org/browse/MDL-82349)
|
|
|
18 |
- A new course/format/update.php url is added as a non-ajax alternative to the core_courseformat_course_update webservice
|
|
|
19 |
|
|
|
20 |
For more information see [MDL-82767](https://tracker.moodle.org/browse/MDL-82767)
|
|
|
21 |
- Add core_courseformat\base::invalidate_all_session_caches to reset course editor cache for all users when course is changed. This method can be used as an alternative to core_courseformat\base::session_cache_reset for resetting the cache for the current user in case the change in the course should be reflected for all users.
|
|
|
22 |
|
|
|
23 |
For more information see [MDL-83185](https://tracker.moodle.org/browse/MDL-83185)
|
|
|
24 |
- Add after_course_content_updated hook triggered when a course content is updated (module modified, ...) through edition.
|
|
|
25 |
|
|
|
26 |
For more information see [MDL-83542](https://tracker.moodle.org/browse/MDL-83542)
|
|
|
27 |
|
|
|
28 |
### Changed
|
|
|
29 |
|
|
|
30 |
- From now on, deleting an activity without Ajax will be consistent with deleting an activity using Ajax. This ensures that all activity deletions will use the recycle bin and avoid code duplication. If your format uses the old non-Ajax method to bypass the recycle bin it won't work anymore as the non-Ajax deletions are now handled in course/format/update.php.
|
|
|
31 |
|
|
|
32 |
For more information see [MDL-82767](https://tracker.moodle.org/browse/MDL-82767)
|
|
|
33 |
|
|
|
34 |
### Deprecated
|
|
|
35 |
|
|
|
36 |
- The state actions section_move and all related functions are final deprecated and cannot be used anymore. Use the newer section_move_after from now on.
|
|
|
37 |
|
|
|
38 |
For more information see [MDL-80116](https://tracker.moodle.org/browse/MDL-80116)
|
|
|
39 |
- The core_courseformat::base get_section_number and set_section_number are now final deprecated. Use get_sectionum and set_sectionnum instead.
|
|
|
40 |
|
|
|
41 |
For more information see [MDL-80116](https://tracker.moodle.org/browse/MDL-80116)
|
|
|
42 |
- All course editing YUI modules are now deprecated. All course formats not using components must migrate before 6.0. Follow the devdocs guide https://moodledev.io/docs/5.0/apis/plugintypes/format/migration to know how to proceed.
|
|
|
43 |
|
|
|
44 |
For more information see [MDL-82341](https://tracker.moodle.org/browse/MDL-82341)
|
|
|
45 |
- The core_courseformat\base::get_non_ajax_cm_action_url is now deprecated. Use get_update_url instead.
|
|
|
46 |
|
|
|
47 |
For more information see [MDL-82767](https://tracker.moodle.org/browse/MDL-82767)
|
|
|
48 |
- Many get actions from course/view.php and course/mod.php are now deprecated. Use the new course/format/update.php instead to replace all direct edit urls in your code. The affected actions are: indent, duplicate, hide, show, stealth, delete, groupmode and marker (highlight). The course/format/updates.php uses the same parameters as the core_courseformat_course_update webservice
|
|
|
49 |
|
|
|
50 |
For more information see [MDL-82767](https://tracker.moodle.org/browse/MDL-82767)
|
|
|
51 |
- Deprecate the use of element ID selectors in favor of querySelector for Reactive component initialisation. We will use '#id' instead of 'id' for example.
|
|
|
52 |
|
|
|
53 |
For more information see [MDL-83339](https://tracker.moodle.org/browse/MDL-83339)
|
|
|
54 |
- The core_courseformat_create_module web service has been deprecated. Please use core_courseformat_new_module as its replacement.
|
|
|
55 |
|
|
|
56 |
For more information see [MDL-83469](https://tracker.moodle.org/browse/MDL-83469)
|
|
|
57 |
- The state mutation addModule, primarily used for creating mod_subsection instances, has been deprecated. Replace it with newModule. Additionally, all course formats using links with data-action="addModule" must be updated to use data-action="newModule" and include a data-sectionid attribute specifying the target section ID.
|
|
|
58 |
|
|
|
59 |
For more information see [MDL-83469](https://tracker.moodle.org/browse/MDL-83469)
|
|
|
60 |
- Using arrays to define course menu items is deprecated. All course formats that extend the section or activity control menus (format_NAME\output\courseformat\content\section\controlmenu or format_NAME\output\courseformat\cm\section\controlmenu) should return standard action_menu_link objects instead.
|
|
|
61 |
|
|
|
62 |
For more information see [MDL-83527](https://tracker.moodle.org/browse/MDL-83527)
|
|
|
63 |
- The externservercourse.php feature used to override the course view page has been deprecated in favor of using hooks. The following hooks are available to do something similar: \core_course\hook\before_course_viewed.
|
|
|
64 |
|
|
|
65 |
For more information see [MDL-83764](https://tracker.moodle.org/browse/MDL-83764)
|
|
|
66 |
|
|
|
67 |
### Removed
|
|
|
68 |
|
|
|
69 |
- Protected function `core_courseformat\output\local\content\section\availability::availability_info()` has been fully removed. Use `core_courseformat\output\local\content\section\availability::get_availability_data()` instead.
|
|
|
70 |
|
|
|
71 |
For more information see [MDL-78489](https://tracker.moodle.org/browse/MDL-78489)
|
|
|
72 |
- The old UI for moving activities and sections without javascript is not avaiable anymore from the actions dropdown. From now, on the only UI to move activities and sections is using the move action in the course editor. Format plugins can still use the old links to make the "move here" elements appear, but they will show deprecated messages. All the non-ajax moving will be removed in Moodle 6.0.
|
|
|
73 |
|
|
|
74 |
For more information see [MDL-83562](https://tracker.moodle.org/browse/MDL-83562)
|
|
|
75 |
|
|
|
76 |
### Fixed
|
|
|
77 |
|
|
|
78 |
- HTML IDs relating to section collapse/expand have been changed in the course format templates.
|
|
|
79 |
- core_courseformat/local/content/section/header #collapssesection{{num}} has been changed to #collapsesectionid{{id}}
|
|
|
80 |
- core_courseformat/local/content/section/content #coursecontentcollapse{{num}} had been changed to #coursecontentcollapseid{{id}}
|
|
|
81 |
|
|
|
82 |
For more information see [MDL-82679](https://tracker.moodle.org/browse/MDL-82679)
|
|
|
83 |
|
|
|
84 |
## 4.5
|
|
|
85 |
|
|
|
86 |
### Added
|
|
|
87 |
|
|
|
88 |
- The constructor of `\core_courseformat\output\local\state\cm` has been updated to accept a new optional parameter, `$istrackeduser`.
|
|
|
89 |
If `istrackeduser` is pre-computed for the course module's course, it can be provided here to avoid an additional function call.
|
|
|
90 |
|
|
|
91 |
For more information see [MDL-81610](https://tracker.moodle.org/browse/MDL-81610)
|
|
|
92 |
- Added new `core_courseformat_create_module` webservice to create new module (with quickcreate feature) instances in the course.
|
|
|
93 |
|
|
|
94 |
For more information see [MDL-81767](https://tracker.moodle.org/browse/MDL-81767)
|
|
|
95 |
- A new `$disabled` parameter has been added to the following `html_writer` methods:
|
|
|
96 |
|
|
|
97 |
- `\core\output\html_writer::select()`
|
|
|
98 |
- `\core\output\html_writer::select_optgroup()`
|
|
|
99 |
- `\core\output\html_writer::select_option()`
|
|
|
100 |
|
|
|
101 |
For more information see [MDL-82146](https://tracker.moodle.org/browse/MDL-82146)
|
|
|
102 |
- A new class, `\core_courseformat\output\local\content\basecontrolmenu`, has been created.
|
|
|
103 |
The following existing classes extend the new class:
|
|
|
104 |
|
|
|
105 |
- `\core_courseformat\output\local\content\cm\controlmenu`
|
|
|
106 |
- `\core_courseformat\output\local\content\section\controlmenu`
|
|
|
107 |
|
|
|
108 |
For more information see [MDL-82510](https://tracker.moodle.org/browse/MDL-82510)
|
|
|
109 |
- Course sections now use an action menu to display possible actions that a user may take in each section. This action menu is rendered using the `\core_courseformat\output\local\content\cm\delegatedcontrolmenu` renderable class.
|
|
|
110 |
|
|
|
111 |
For more information see [MDL-82510](https://tracker.moodle.org/browse/MDL-82510)
|