diff --git a/public/customfield/classes/output/management.php b/public/customfield/classes/output/management.php index 1ff22a3b696..49be1e7b4a4 100644 --- a/public/customfield/classes/output/management.php +++ b/public/customfield/classes/output/management.php @@ -110,13 +110,15 @@ class management implements renderable, templatable { ['name' => 'data-area', 'value' => $data->area], ['name' => 'data-itemid', 'value' => $data->itemid], ]; - $categoryarray['toggle'] = $output->render_from_template('core/toggle', [ + if (!$canedit) { + $categoryarray['toggle'] = $output->render_from_template('core/toggle', [ 'id' => 'shared-toggle-' . $category->get('id'), 'checked' => $toggleenabled, 'extraattributes' => $attributes, 'label' => get_string('enableplugin', 'core_admin', $category->get_formatted_name()), 'labelclasses' => 'visually-hidden', ]); + } $categoryarray['fields'] = array(); diff --git a/public/customfield/externallib.php b/public/customfield/externallib.php index e18e2dcd7aa..4da6e08d6b5 100644 --- a/public/customfield/externallib.php +++ b/public/customfield/externallib.php @@ -131,7 +131,7 @@ class core_customfield_external extends external_api { ) ) , '', VALUE_OPTIONAL), - 'toggle' => new external_value(PARAM_RAW, 'toggle'), + 'toggle' => new external_value(PARAM_RAW, 'toggle', VALUE_OPTIONAL), ) ) ), diff --git a/public/customfield/templates/list.mustache b/public/customfield/templates/list.mustache index 5ca89ab2cc4..be601b2ddca 100644 --- a/public/customfield/templates/list.mustache +++ b/public/customfield/templates/list.mustache @@ -88,11 +88,11 @@ {{/canedit}} - {{^canedit}} + {{#toggle}}
- {{{toggle}}} + {{{.}}}
- {{/canedit}} + {{/toggle}} {{/usescategories}}
diff --git a/public/version.php b/public/version.php index 85e43098f16..3195f902c7e 100644 --- a/public/version.php +++ b/public/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2025092300.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2025092500.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '5.1beta (Build: 20250923)'; // Human-friendly version name