diff --git a/docs/apis/plugintypes/format/index.md b/docs/apis/plugintypes/format/index.md index 72f0e261a..17bd62b13 100644 --- a/docs/apis/plugintypes/format/index.md +++ b/docs/apis/plugintypes/format/index.md @@ -206,7 +206,6 @@ You must define `$string['sectionname']` if your language file even if the forma | `get_section_number()` | Return zero if the course will deploy all sections or a section number if the current page is only presenting a single section. | | `get_course_display()` | Return `COURSE_DISPLAY_SINGLEPAGE` or `COURSE_DISPLAY_MULTIPAGE` depending if the course has multiple section per page or not. | | `get_last_section_number()` | Returns the last section | -| `get_max_sections()` | Returns the maximum number of sections this format can contain | | `page_title()` | Formats can override this method to alter the page title. | ### Course features diff --git a/docs/devupdate.md b/docs/devupdate.md index ca571b8da..885e5d1d7 100644 --- a/docs/devupdate.md +++ b/docs/devupdate.md @@ -8,3 +8,12 @@ tags: This page highlights the important changes that are coming in Moodle 5.1 for developers. + +## Course format: max sections setting is now deprecated + + +The `maxsections` setting in course formats is now deprecated. Previously, this setting was used to limit the number of sections in a course. Starting with Moodle 5.1, courses can have an unlimited number of sections. + +Although the `maxsections` setting remains available for now, it is marked as deprecated and will be removed in Moodle 6.0. Also, the `get_max_sections` from `core_courseformat\base` is also deprecated and will be removed in Moodle 6.0. + +If your format plugin relies on `maxsections`, you should add a custom setting in your plugin to control section limits. For reference, see the week format plugin, which now uses its own setting for this functionality.