Skip to content

Commit 003492f

Browse files
committed
[docs] custom activity chooser footer changes
1 parent 4bcac02 commit 003492f

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
@@ -9,6 +9,21 @@ tags:
99

1010
This page highlights the important changes that are coming in Moodle 5.1 for developers.
1111

12+
## Course: activity chooser footer has been changed
13+
14+
<Since version="5.1" issueNumber="MDL-85597" />
15+
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.
16+
17+
**How to determine if your plugin is affected:**
18+
19+
- 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`.
20+
- 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`.
21+
22+
**What you need to do:**
23+
24+
- 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.
25+
- For more advanced customizations, ensure you use the `course/templates/local/activitychooser/footer.mustache` template to render your custom footer content.
26+
1227
## Course format: max sections setting is now deprecated
1328

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

0 commit comments

Comments
 (0)