Skip to content

Commit c5afd9f

Browse files
authored
Merge pull request #1300 from ferranrecio/MDL-83469-main
MDL-83469 adding core_courseformat_new_module references
2 parents c710a9c + bd34cbf commit c5afd9f

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

docs/apis/plugintypes/mod/_files/lib_description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Each feature is identified by a constant, which is defined in the `lib
3333

3434
- `FEATURE_GROUPS` and `FEATURE_GROUPINGS`: The activity module supports groups and groupings.
3535
- `FEATURE_SHOW_DESCRIPTION`: The activity module supports showing the description on the course page.
36-
- `FEATURE_QUICKCREATE`: The activity `[modname]_add_instance()` function is able to create an instance without showing a form using the default settings. It is used by the `core_courseformat_create_module` webservice to know which activities are compatible. If this feature is supported, the activity module should provide a `quickcreatename` string in the language file that will be used as the name of the instance created.
36+
- `FEATURE_QUICKCREATE`: The activity `[modname]_add_instance()` function is able to create an instance without showing a form using the default settings. It is used by the `core_courseformat_new_module` webservice to know which activities are compatible. If this feature is supported, the activity module should provide a `quickcreatename` string in the language file that will be used as the name of the instance created.
3737
- `FEATURE_COMPLETION`: The activity module supports activity completion. For now this feature only affects the bulk completion settings. However, in the future ([MDL-83027](https://tracker.moodle.org/browse/MDL-83027)) activities can set to false to disable all completion settings.
3838

3939
<details>

docs/devupdate.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ The section and activity action menus now utilize output classes instead of glob
5353
- `core_courseformat\output\local\content\section\controlmenu`: the existing class has been refactored and now uses `action_menu_link` objects instead. If your format add more options to the section menu, you should update your code to use the new class instead of using arrays.
5454
- `core_courseformat\output\local\content\cm\delegatedcontrolmenu`: like the section control menu, the existing class has been refactored to use `action_menu_link` objects instead of arrays.
5555

56+
### New `core_courseformat_new_module` webservice
57+
58+
<Since version="5.0" issueNumber="MDL-83469" />
59+
60+
A new webservice, `core_courseformat_new_module`, has been introduced to replace the previous `core_courseformat_create_module`. The main difference between the two is that the new webservice uses the section id instead of the section number.
61+
62+
To be sure your format plugin is not affected by the change, you must check:
63+
64+
- If the plugin calls the deprecated webservice `core_courseformat_create_module`. If it does, you should update your code to use the new webservice.
65+
- The plugin has some link with `data-action` set to `addModule`. If it does, replace it by `data-action` set to `newModule` and add a `data-sectionid` attribute with the section id.
66+
5667
## Plugin type deprecation
5768

5869
<Since version="5.0" issueNumber="MDL-79843" />

versioned_docs/version-4.5/apis/plugintypes/mod/_files/lib_description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Each feature is identified by a constant, which is defined in the `lib
3333

3434
- `FEATURE_GROUPS` and `FEATURE_GROUPINGS`: The activity module supports groups and groupings.
3535
- `FEATURE_SHOW_DESCRIPTION`: The activity module supports showing the description on the course page.
36-
- `FEATURE_QUICKCREATE`: The activity `[modname]_add_instance()` function is able to create an instance without showing a form using the default settings. It is used by the `core_courseformat_create_module` webservice to know which activities are compatible. If this feature is supported, the activity module should provide a `quickcreatename` string in the language file that will be used as the name of the instance created.
36+
- `FEATURE_QUICKCREATE`: The activity `[modname]_add_instance()` function is able to create an instance without showing a form using the default settings. It is used by the `core_courseformat_new_module` webservice to know which activities are compatible. If this feature is supported, the activity module should provide a `quickcreatename` string in the language file that will be used as the name of the instance created.
3737
- `FEATURE_COMPLETION`: The activity module supports activity completion. For now this feature only affects the bulk completion settings. However, in the future ([MDL-83027](https://tracker.moodle.org/browse/MDL-83027)) activities can set to false to disable all completion settings.
3838

3939
<details>

0 commit comments

Comments
 (0)