Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 35 additions & 1 deletion data/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
{
"$schema": "../static/schema/versions.json",
"versions": [
{
"name": "6.1",
"releaseDate": "4 October 2027",
"generalEndDate": "3 October 2028",
"securityEndDate": "3 April 2029",
"isLTS": false,
"codeFreezeDate": "30 August 2027",
"releases": [
{
"name": "6.1.0",
"releaseDate": "4 October 2027",
"version": 2027100400,
"upgradePath": "https://docs.moodle.org/601/en/Upgrading",
"releaseNoteUrl": false
}
]
},
{
"name": "6.0",
"releaseDate": "19 April 2027",
"generalEndDate": "18 April 2028",
"securityEndDate": "18 October 2028",
"isLTS": false,
"codeFreezeDate": "15 March 2027",
"releases": [
{
"name": "6.0.0",
"releaseDate": "19 April 2027",
"version": 2027041900,
"upgradePath": "https://docs.moodle.org/600/en/Upgrading",
"releaseNoteUrl": false
}
]
},
{
"name": "5.3",
"releaseDate": "5 October 2026",
Expand Down Expand Up @@ -2630,4 +2664,4 @@
"isLTS": false
}
]
}
}
46 changes: 3 additions & 43 deletions docs/devupdate.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,10 @@
---
title: Moodle 5.3 developer update
title: Moodle 6.0 developer update
tags:
- Core development
- Moodle 5.3
- Moodle 6.0
---

{/* <!-- markdownlint-disable no-inline-html --> */}

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

## Linear navigation support

<Since version="5.3" issueNumber="MDL-84921" />

Moodle 5.3 introduces support for sequential linear navigation controls within course views. By default, third-party course formats do not display linear navigation elements. To explicitly opt in and declare support for this feature, course formats must override the `uses_linear_navigation()` method.

Activity modules can also take part in this navigation: the `\core_course\cm_info` class provides `get_navigation_url()`, `set_navigation_url()`, and `reset_navigation_url()` methods so a module can override the URL the "Previous" and "Next" controls lead to, or remove itself from the navigation flow altogether.

For a comprehensive integration guide, structural configuration examples, and page-state API controls, see the [Linear navigation support guide](./apis/plugintypes/format/linear_navigation.md).

## Supplementary content in the sticky footer

<Since version="5.3" issueNumber="MDL-88601" />

The `moodle_page` class now includes `set_supplementary_content()` and `get_supplementary_content()` methods, allowing any part of Moodle to inject an `action_link` as supplementary content into the sticky footer, regardless of whether the current course format supports linear navigation.

For instance, `mod_forum` uses this new mechanism to display a "Go to all discussions" link in the sticky footer when viewing an individual discussion.

For more information, see the [Adding supplementary content to the sticky footer](./apis/plugintypes/format/linear_navigation.md#adding-supplementary-content-to-the-sticky-footer) section.

## Scopes for API routes

<Since version="5.3" issueNumber="MDL-89710" />

API routes can now declare the scopes required to call them, using the `#[scopeset]` attribute alongside the existing `#[route]` attribute. When a request is authenticated with an OAuth2 access token or Personal Access Token, the router checks that the token was granted a scope combination which satisfies the route's requirements, in addition to any existing capability checks.

Every API route **must** now declare its scope requirements, either with one or more `#[scopeset]` attributes, or by explicitly opting out with `#[unscoped_resource]`. This is enforced by a core PHPUnit test that scans all routes in the `route\api` namespace, so any new route which omits this declaration will fail the test suite.

For details on declaring scopes on a route, and on defining new scope classes for a subsystem, see [Scopes](./apis/subsystems/routing/scopes.md) and [Defining Scopes](./apis/subsystems/routing/defining-scopes.md).

## Light and dark colour modes in Boost

<Since version="5.3" issueNumber="MDL-68037" />

The Boost theme can now render a site in either a light or a dark colour mode, built on the Bootstrap 5.3 colour modes API. The mode in use is written to the `data-bs-theme` attribute of the `html` tag. The feature is experimental, so it is off until a site turns on **Enable colour modes** on the new **Experimental settings** tab of the Boost settings, and the default mode is `Light` while it is experimental.

**A plugin only follows the mode if its own styles take their colours from the theme.** A literal colour in a plugin's `styles.css` keeps its value in both modes, so use the Moodle Design System tokens or the Bootstrap utility classes instead. The Behat `init.php` and `util.php --enable` commands also take a `--colourmode` option, so that a whole run can be exercised in one mode.

See the [Colour modes guide](./guides/colourmodes/index.md) for what to check in your plugin and how to test it in both modes.
This page highlights the important changes that are coming in Moodle 6.0 for developers.
6 changes: 3 additions & 3 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
id: introduction
title: Introduction
description: Developer documentation for Moodle 5.3.
description: Developer documentation for Moodle 6.0.
slug: /
tags:
- Getting started
---

Welcome to the Developer Documentation for **Moodle 5.3**.
Welcome to the Developer Documentation for **Moodle 6.0**.

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

Expand All @@ -23,4 +23,4 @@ This documentation is version-specific and includes a range of useful guides and

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

<ReleaseStateSummary releaseName="5.3" />
<ReleaseStateSummary releaseName="6.0" />
2 changes: 1 addition & 1 deletion general/releases/5.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ReleaseNoteIntro } from '@site/src/components/ReleaseInformation';

<ReleaseNoteIntro releaseName={frontMatter.moodleVersion} />

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

## Server requirements {/* #server-requirements */}

Expand Down
4 changes: 2 additions & 2 deletions nextVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/

const nextVersion = '5.3';
const nextLTSVersion = '5.3';
const nextVersion = '6.0';
const nextLTSVersion = '6.3';
const nextVersionRoot = `/docs/${nextVersion}`;

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion static/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@

# Issue #955
# Redirect /docs/* to /docs/[nextVersion]/:splat
/docs/* /docs/5.3/:splat
/docs/* /docs/6.0/:splat
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
121 changes: 121 additions & 0 deletions versioned_docs/version-5.3/_utils.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/**
* Copyright (c) Moodle Pty Ltd.
*
* Moodle is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Moodle is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React, { type ReactNode } from 'react';
import ComponentFileSummaryGeneric, {
type ComponentFileSummaryDescription,
type ComponentFileSummaryProps,
} from '@site/src/components/ComponentFileSummary';
import { MDXProvider } from '@mdx-js/react';

import { getExample } from '@site/src/moodleBridge';

export {
getExample,
ComponentFileSummaryProps,
};

/**
* Fill the default properties.
* @param {Props} props
* @return {Props}
*/
export const fillDefaultProps = (props: ComponentFileSummaryProps): ComponentFileSummaryProps => ({
filetype: 'php',
examplePurpose: props.summary,
...props,
});

const normaliseDescription = (Value: ComponentFileSummaryDescription): null | React.JSX.Element => {
if (typeof Value === 'boolean' || !Value) {
return null;
}

if (typeof Value === 'string' || React.isValidElement(Value)) {
return (
<MDXProvider>
{Value}
</MDXProvider>
);
}

return (
<MDXProvider>
<Value />
</MDXProvider>
);
};

/**
* Get the preferred description given a standard properties value which contains an optional description,
* and/or extraDescription, and a DefaultDescription object.
*
* @param {Props} props
* @param {DefaultDescription} DefaultDescription The default description to use if the `description` property is empty
* @returns {MDXLayout}
*/
export const getDescription = ({
description = null,
extraDescription = null,
children = null,
}: ComponentFileSummaryProps, defaultDescription?: ComponentFileSummaryDescription): null | ReactNode | JSX.Element => {
if (children) {
const Description = normaliseDescription(children);
return (
<MDXProvider>
{Description}
</MDXProvider>
);
}

if (description) {
const Description = normaliseDescription(description);
return (
<MDXProvider>
{Description}
</MDXProvider>
);
}

const Description = normaliseDescription(defaultDescription);
const ExtraDescription = normaliseDescription(extraDescription);

if (Description) {
return (
<MDXProvider>
{Description}
{ExtraDescription}
</MDXProvider>
);
}

return null;
};

export const ComponentFileSummary = (initialProps: ComponentFileSummaryProps): JSX.Element => {
const props = fillDefaultProps({
examplePurpose: initialProps?.summary ?? null,
...initialProps,
});

props.description = getDescription(props, props?.defaultDescription ?? null);

if (props?.example || props?.defaultExample) {
props.example = getExample(props, props?.defaultExample ?? null);
}

return ComponentFileSummaryGeneric(props);
};
Loading
Loading