Skip to content

Commit 8bdfcd1

Browse files
committed
[docs] Update references to Moodle 5.1
1 parent a822386 commit 8bdfcd1

File tree

5 files changed

+10
-89
lines changed

5 files changed

+10
-89
lines changed

docs/devupdate.md

Lines changed: 3 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,10 @@
11
---
2-
title: Moodle 5.1 developer update
2+
title: Moodle 5.2 developer update
33
tags:
44
- Core development
5-
- Moodle 5.1
5+
- Moodle 5.2
66
---
77

88
<!-- markdownlint-disable no-inline-html -->
99

10-
This page highlights the important changes that are coming in Moodle 5.1 for developers.
11-
12-
## Activity modules: now activities can define a secondary purpose
13-
14-
<Since version="5.1" issueNumber="MDL-85598" />
15-
16-
From now on, activity modules can define two different features in their `PLUGINNAME_supports` function:
17-
18-
- `FEATURE_MOD_PURPOSE`: This is the mandatory main activity purpose, and also the one that will determine the activity's icon color.
19-
- `FEATURE_MOD_OTHERPURPOSE`: An optional secondary purpose to be used as an extra category in the activity chooser modal.
20-
21-
See the [Activity module support functions](./apis/plugintypes/mod#activity-module-support-functions) for further information.
22-
23-
## Code Structure
24-
25-
<Since version="5.1" issueNumber="MDL-83424" />
26-
27-
Most of the Moodle codebase, including all plugins, has been moved into a new `public` directory within the Moodle web root.
28-
29-
Most Moodle tooling has already been updated to support this, but minor web server reconfiguration will be required to support this.
30-
31-
See the [Restructure documentation](./guides/restructure/index.md) for further information on some of the changes required.
32-
33-
## Course format: activity chooser is now in core_courseformat
34-
35-
<Since version="5.1" issueNumber="MDL-85597" />
36-
The activity chooser logic and templates have been relocated from `core_course` to `core_courseformat`. This change may impact themes that override the activity chooser rendering, but it also enables format plugins to provide custom outputs and templates for activity chooser elements, similar to other course content components. For details on how format can override outputs, see the [overriding output classes from course format plugin page](http://localhost:3000/docs/5.1/apis/plugintypes/format#override-output-classes).s
37-
38-
**How to check if your plugin is affected:**
39-
40-
For theme plugins, review whether any of the following templates are overridden:
41-
42-
- `core_course/activitychooser` (now in `core_courseformat/activitychooser`)
43-
- `core_course/activitychooserbutton` (now in `core_courseformat/local/content/activitychooserbutton`)
44-
- Any template in `core_course/local/activitychooser` (now in `core_courseformat/local/activitychooser`)
45-
46-
Additionally, renderer methods for loading the activity chooser have changed. Check if your format or theme overrides the following method:
47-
48-
- `core_course_renderer::course_activitychooser` (no longer used)
49-
50-
**What you need to do:**
51-
52-
- Move any overridden templates or AMD modules to their new locations in `core_courseformat`.
53-
- Follow any deprecation notices for the activity chooser.
54-
55-
## Course format: activity chooser footer has been changed
56-
57-
<Since version="5.1" issueNumber="MDL-85597" />
58-
59-
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.
60-
61-
**How to determine if your plugin is affected:**
62-
63-
- 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`.
64-
- 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`.
65-
66-
**What you need to do:**
67-
68-
- 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.
69-
- For more advanced customizations, ensure you use the `course/templates/local/activitychooser/footer.mustache` template to render your custom footer content.
70-
71-
## Course format: max sections setting is now deprecated
72-
73-
<Since version="5.1" issueNumber="MDL-84291" />
74-
75-
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.
76-
77-
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.
78-
79-
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.
80-
81-
## Course format: new activity chooser rendering
82-
83-
<Since version="5.1" issueNumber="MDL-80295" />
84-
85-
The activity chooser in course formats has been refactored to use a new rendering approach. It now includes additional attributes such as `data-section-id` and `data-returnsectionid`, and the course renderer method for the activity chooser has changed.
86-
87-
This update primarily affects format plugins that customize section or activity card rendering. If your plugin calls `course_section_add_cm_control`, you should update it to use the new `section_add_cm_controls` method.
88-
89-
For themes that override activity chooser templates, ensure that the activity chooser button includes the required `data-section-id` and the `data-returnsectionid` attributes.
10+
This page highlights the important changes that are coming in Moodle 5.2 for developers.

docs/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
id: introduction
33
title: Introduction
4-
description: Developer documentation for Moodle 5.1.
4+
description: Developer documentation for Moodle 5.2.
55
slug: /
66
tags:
77
- Getting started
88
---
99

10-
Welcome to the Developer Documentation for **Moodle 5.1**.
10+
Welcome to the Developer Documentation for **Moodle 5.2**.
1111

1212
This documentation is version-specific and includes a range of useful guides and information.
1313

@@ -17,10 +17,10 @@ This documentation is version-specific and includes a range of useful guides and
1717
- Look through our [guides to Moodle APIs](./apis.md)
1818
- Browse our [Moodle feature](./guides.md) deep dives
1919
- Interested in supporting the Moodle App in your plugins? Read the [Moodle App documentation](/general/app)
20-
{/*- You may want to read the [Release notes](/general/releases/5.1) for Moodle 5.1 */}
20+
{/*- You may want to read the [Release notes](/general/releases/5.2) for Moodle 5.2 */}
2121

2222
:::
2323

2424
import ReleaseStateSummary from '@site/src/components/ReleaseStateSummary';
2525

26-
<ReleaseStateSummary releaseName="5.1" />
26+
<ReleaseStateSummary releaseName="5.2" />

nextVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18-
const nextVersion = '5.1';
18+
const nextVersion = '5.2';
1919
const nextLTSVersion = '5.3';
2020
const nextVersionRoot = `/docs/${nextVersion}`;
2121

static/_redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@
7777

7878
# Issue #955
7979
# Redirect /docs/* to /docs/[nextVersion]/:splat
80-
/docs/* /docs/5.1/:splat
80+
/docs/* /docs/5.2/:splat

versioned_docs/version-5.1/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This documentation is version-specific and includes a range of useful guides and
1717
- Look through our [guides to Moodle APIs](./apis.md)
1818
- Browse our [Moodle feature](./guides.md) deep dives
1919
- Interested in supporting the Moodle App in your plugins? Read the [Moodle App documentation](/general/app)
20-
{/*- You may want to read the [Release notes](/general/releases/5.1) for Moodle 5.1 */}
20+
- You may want to read the [Release notes](/general/releases/5.1) for Moodle 5.1
2121

2222
:::
2323

0 commit comments

Comments
 (0)