Skip to content

Commit 401bd95

Browse files
committed
[docs] Update references to Moodle 5.0
1 parent 4a02512 commit 401bd95

File tree

6 files changed

+11
-171
lines changed

6 files changed

+11
-171
lines changed

docs/devupdate.md

+3-163
Original file line numberDiff line numberDiff line change
@@ -1,170 +1,10 @@
11
---
2-
title: Moodle 5.0 developer update
2+
title: Moodle 5.1 developer update
33
tags:
44
- Core development
5-
- Moodle 5.0
5+
- Moodle 5.1
66
---
77

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

10-
This page highlights the important changes that are coming in Moodle 5.0 for developers.
11-
12-
## Activity overview page integration
13-
14-
<Since version="5.0" issueNumber="MDL-83872" />
15-
16-
The course navigation has been updated to include a new link to the activity overview page. This page will replace the current `index.php` page in the activity modules. By default, the overview page displays a table that includes the name of each activity, its completion status, and the grade (if applicable). Additionally, plugins can enhance this information by implementing a `mod_PLUGINNAME\courseformat\overview` class.
17-
18-
See the [Activity overview page integration](./apis/plugintypes/mod/courseoverview) documentation for more information.
19-
20-
## Calendar: New human date renderers
21-
22-
<Since version="5.0" issueNumber="MDL-83873" />
23-
24-
To improve date readability and user experience, the Calendar subsystem is transitioning from deprecated date rendering methods, such as `calendar_format_event_time` or `calendar_time_representation`, to a new suite of human date renderers. It enhances date display by:
25-
26-
- Using relative terms like "Today," "Yesterday," and "Tomorrow" for nearby dates.
27-
- Applying alert styling to dates nearing deadlines or events.
28-
29-
This update introduces two primary renderers:
30-
31-
- `humandate`: This renderer presents single dates and times in a user-friendly format, automatically adapting to the user's preferred 12-hour or 24-hour time display (`CALENDAR_TF_12`/`CALENDAR_TF_24`).
32-
- `humantimeperiod`: Designed for displaying date/time ranges, this renderer optimizes information presentation. When the start and end dates fall on the same day, it shows the full start date and time, but only the end time, eliminating redundant date information. This logic mirrors the existing functionality of the deprecated functions, ensuring a consistent user experience.
33-
34-
See the [Date and Time Output Classes](./apis/subsystems/output/humandate.md) documentation for more information.
35-
36-
## Course formats
37-
38-
<Since version="5.0" issueNumber="MDL-83527" />
39-
40-
All course formats created for Moodle versions prior to 4.0, which still depend on the 3.11 libraries, will be deprecated starting from Moodle 5.0 and will no longer function in Moodle 6.0. We are discontinuing the use of YUI for course editing and transitioning the course display logic to output classes.
41-
42-
You can determine if your course format is impacted by this change by examining the `lib.php` file within your plugin directory. If the format class does not override the `supports_components` method, or if the method returns `false`, it indicates that the course format relies on the deprecated YUI libraries and requires updating.
43-
44-
To ensure a smooth transition, we have documented the migration process in detail. Please refer to the [migration guide](./apis/plugintypes/format/migration.md) for comprehensive instructions on updating your course formats to be compatible with the latest Moodle standards.
45-
46-
### Course action menu outputs classes
47-
48-
<Since version="5.0" issueNumber="MDL-83527" />
49-
50-
The section and activity action menus now utilize output classes instead of global functions. The new classes are:
51-
52-
- `core_courseformat\output\local\content\cm\controlmenu`: the class now fully replaces the old `course_get_cm_edit_actions` function. Extend this class in your format plugin to add more options to the activity menu.
53-
- `core_courseformat\output\local\content\section\controlmenu`: the existing class has been refactored and now uses `action_menu_link` objects instead. If your format add more options to the section menu, you should update your code to use the new class instead of using arrays.
54-
- `core_courseformat\output\local\content\cm\delegatedcontrolmenu`: like the section control menu, the existing class has been refactored to use `action_menu_link` objects instead of arrays.
55-
56-
### New `core_courseformat_new_module` webservice
57-
58-
<Since version="5.0" issueNumber="MDL-83469" />
59-
60-
A new webservice, `core_courseformat_new_module`, has been introduced to replace the previous `core_courseformat_create_module`. The main difference between the two is that the new webservice uses the section id instead of the section number.
61-
62-
To be sure your format plugin is not affected by the change, you must check:
63-
64-
- If the plugin calls the deprecated webservice `core_courseformat_create_module`. If it does, you should update your code to use the new webservice.
65-
- The plugin has some link with `data-action` set to `addModule`. If it does, replace it by `data-action` set to `newModule` and add a `data-sectionid` attribute with the section id.
66-
67-
## Plugin type deprecation
68-
69-
<Since version="5.0" issueNumber="MDL-79843" />
70-
71-
A new process for plugin type and subplugin type deprecation has been introduced. See [the Plugin Type deprecation](./apis/plugintypes/index.md#deprecating-a-plugin-type) and [Subplugin deprecation](./apis/plugintypes/index.md#deprecating-a-subplugin-type) documentation for further information.
72-
73-
## Subplugins
74-
75-
<Since version="5.0" issueNumber="MDL-83705" />
76-
77-
The `subplugins.json` file now requires a new `subplugintypes` object to define the subplugins available within a plugin.
78-
79-
The format of this is identical to the existing `plugintypes` object, but the value should be a path which is relative to the plugin's root directory.
80-
81-
:::tip Example of the new `subplugintypes` values
82-
83-
The Quiz Activity located in `mod/quiz` defines the `quizaccess` subplugin type.
84-
85-
The legacy `plugintype` entry for this is as follows:
86-
87-
```json title="mod/quiz/db/subplugins.json demonstrating the legacy plugintypes object"
88-
{
89-
"plugintypes": {
90-
"quizaccess": "mod/quiz/accessrule"
91-
}
92-
}
93-
```
94-
95-
The new `subplugintypes` value is relative to the plugin root as follows:
96-
97-
```json title="mod/quiz/db/subplugins.json demonstrating the new subplugintypes object"
98-
{
99-
"subplugintypes": {
100-
"quizaccess": "accessrule"
101-
}
102-
}
103-
```
104-
105-
Both of these values may be combined for plugins supporting both Moodle 4.5 and earlier, and Moodle 5.0 onwards.
106-
107-
```json title="mod/quiz/db/subplugins.json demonstrating both the legacy plugintypes and the new subplugintypes values"
108-
{
109-
"plugintypes": {
110-
"quizaccess": "mod/quiz/accessrule"
111-
},
112-
"subplugintypes": {
113-
"quizaccess": "accessrule"
114-
}
115-
}
116-
```
117-
118-
:::
119-
120-
## Themes
121-
122-
### Activity icon colors
123-
124-
<Since version="5.0" issueNumber="MDL-83725" />
125-
126-
Themes can now customize activity icon colors using simple CSS variables. The new variables introduced are:
127-
128-
- `$activity-icon-administration-bg`
129-
- `$activity-icon-assessment-bg`
130-
- `$activity-icon-collaboration-bg`
131-
- `$activity-icon-communication-bg`
132-
- `$activity-icon-content-bg`
133-
- `$activity-icon-interactivecontent-bg`
134-
135-
All previous `$activity-icon-*-filter` elements can be removed, as they are no longer in use.
136-
137-
:::tip Example of customizing activity icon colors
138-
139-
Themes can customize the activity icon colors by overriding the following variables before loading the Boost scss:
140-
141-
```scss
142-
$activity-icon-administration-bg: #5915b1;
143-
$activity-icon-assessment-bg: #17857f;
144-
$activity-icon-collaboration-bg: #cf7a34;
145-
$activity-icon-communication-bg: #c70827;
146-
$activity-icon-content-bg: #5915b1;
147-
$activity-icon-interactivecontent-bg: #c70827;
148-
```
149-
150-
:::
151-
152-
### Bootstrap 5
153-
154-
<Since version="5.0" issueNumber="MDL-75669" />
155-
156-
Bootstrap has been upgraded to version 5, bringing new features and improvements.
157-
As part of this transition, we have implemented a backwards-compatibility layer to ensure a smooth migration for third-party plugins and custom code.
158-
159-
For more details on the upgrade process and how to utilize the compatibility layer, please visit [Bootstrap 5 migration](./guides/bs5migration/index.md).
160-
This will help you adapt your projects to the latest Bootstrap version.
161-
162-
## Unit Tests
163-
164-
<Since version="5.0" issueNumber="MDL-83468" />
165-
166-
Moodle has updated the version of PHPUnit used in core to version 11.4. Some tests may encounter issues as a result.
167-
168-
Please see the [PHPUnit 11 Upgrade Guide](/general/development/tools/phpunit/upgrading-11) for assistance in updating any broken tests.
169-
170-
:::
10+
This page highlights the important changes that are coming in Moodle 5.1 for developers.

docs/intro.md

+4-4
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.0.
4+
description: Developer documentation for Moodle 5.1.
55
slug: /
66
tags:
77
- Getting started
88
---
99

10-
Welcome to the Developer Documentation for **Moodle 5.0**.
10+
Welcome to the Developer Documentation for **Moodle 5.1**.
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.0) for Moodle 5.0 */}
20+
{/*- You may want to read the [Release notes](/general/releases/5.1) for Moodle 5.1 */}
2121

2222
:::
2323

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

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

general/releases/5.0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ReleaseNoteIntro } from '@site/src/components/ReleaseInformation';
1212

1313
<ReleaseNoteIntro releaseName={frontMatter.moodleVersion} />
1414

15-
If you are upgrading from a previous version, please see [Upgrading](https://docs.moodle.org/en/Upgrading) in the user docs.
15+
If you are upgrading from a previous version, please see [Upgrading](https://docs.moodle.org/500/en/Upgrading) in the user docs.
1616

1717
## Server requirements
1818

nextVersion.js

+1-1
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.0';
18+
const nextVersion = '5.1';
1919
const nextLTSVersion = '5.3';
2020
const nextVersionRoot = `/docs/${nextVersion}`;
2121

static/_redirects

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@
7878

7979
# Issue #955
8080
# Redirect /docs/* to /docs/[nextVersion]/:splat
81-
/docs/* /docs/5.0/:splat
81+
/docs/* /docs/5.1/:splat

versioned_docs/version-5.0/intro.md

+1-1
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.0) for Moodle 5.0 */}
20+
- You may want to read the [Release notes](/general/releases/5.0) for Moodle 5.0
2121

2222
:::
2323

0 commit comments

Comments
 (0)