Skip to content

Commit 7855822

Browse files
committed
[docs] custom activity chooser footer changes
1 parent 858fbfa commit 7855822

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/devupdate.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ Most Moodle tooling has already been updated to support this, but minor web serv
1919

2020
See the [Restructure documentation](./guides/restructure/index.md) for further information on some of the changes required.
2121

22+
## Course: activity chooser footer has been changed
23+
24+
<Since version="5.1" issueNumber="MDL-85597" />
25+
The activity chooser UI now features a dedicated footer button for adding the selected activity to the course. The logic for managing the activity chooser footer has moved to `course/amd/src/local/activitychooser/dialogue.js`, which now controls the visibility of the back and add buttons based on the modal's content. This update may impact plugins that implement custom activity chooser footers.
26+
27+
**How to determine if your plugin is affected:**
28+
29+
- Check if your plugin provides a `custom_chooser_footer` implementation. You can do this by searching your plugin's `lib.php` for a function named `PLUGINTYPE_PLUGINNAME_custom_chooser_footer`.
30+
- If your plugin implements this function, review your footer AMD module to see if it calls `modal.setFooter(...)`. To identify the AMD module, look at the first parameter passed when creating a new `core_course\local\entity\activity_chooser_footer` instance in your `custom_chooser_footer` function—this is the `$footerjspath`.
31+
32+
**What you need to do:**
33+
34+
- In most cases, simply remove the `modal.setFooter(...)` call from your AMD module, as the new activity chooser footer now manages this logic for you.
35+
- For more advanced customizations, ensure you use the `course/templates/local/activitychooser/footer.mustache` template to render your custom footer content.
36+
2237
## Course format: max sections setting is now deprecated
2338

2439
<Since version="5.1" issueNumber="MDL-84291" />

0 commit comments

Comments
 (0)