Skip to content

[docs] max sections deprecation #1366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/apis/plugintypes/format/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions docs/devupdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ tags:
<!-- markdownlint-disable no-inline-html -->

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

## Course format: max sections setting is now deprecated

<Since version="5.1" issueNumber="MDL-84291" />
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.