Moodle 5.0 developer update
This page highlights the important changes that are coming in Moodle 5.0 for developers.
Subplugins
The subplugins.json
file now requires a new subplugintypes
object to define the subplugins available within a plugin.
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.
subplugintypes
valuesThe Quiz Activity located in mod/quiz
defines the quizaccess
subplugin type.
The legacy plugintype
entry for this is as follows:
{
"plugintypes": {
"quizaccess": "mod/quiz/accessrule"
}
}
The new subplugintypes
value is relative to the plugin root as follows:
{
"subplugintypes": {
"quizaccess": "accessrule"
}
}
Both of these values may be combined for plugins supporting both Moodle 4.5 and earlier, and Moodle 5.0 onwards.
{
"plugintypes": {
"quizaccess": "mod/quiz/accessrule"
},
"subplugintypes": {
"quizaccess": "accessrule"
}
}
Themes
Themes can now customize activity icon colors using simple CSS variables. The new variables introduced are:
$activity-icon-administration-bg
$activity-icon-assessment-bg
$activity-icon-collaboration-bg
$activity-icon-communication-bg
$activity-icon-content-bg
$activity-icon-interactivecontent-bg
All previous $activity-icon-*-filter
elements can be removed, as they are no longer in use.
Themes can customize the activity icon colors by overriding the following variables before loading the Boost scss:
$activity-icon-administration-bg: #5915b1;
$activity-icon-assessment-bg: #17857f;
$activity-icon-collaboration-bg: #cf7a34;
$activity-icon-communication-bg: #c70827;
$activity-icon-content-bg: #5915b1;
$activity-icon-interactivecontent-bg: #c70827;