This commit is contained in:
Andrew Nicols
2023-07-09 22:13:51 +08:00
4 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -254,7 +254,7 @@ class api {
$category->get_formatted_name(),
$category->get('name'),
get_string('editcategoryname', 'core_customfield'),
get_string('newvaluefor', 'core_form', format_string($category->get('name')))
get_string('newvaluefor', 'core_form', $category->get_formatted_name())
);
}
+1 -1
View File
@@ -638,7 +638,7 @@ abstract class handler {
foreach ($fieldswithdata as $data) {
$categoryid = $data->get_field()->get_category()->get('id');
if ($categoryid != $lastcategoryid) {
$categoryname = format_string($data->get_field()->get_category()->get('name'));
$categoryname = $data->get_field()->get_category()->get_formatted_name();
// Load category header lang string if specified.
if (!empty($headerlangidentifier)) {
+1 -1
View File
@@ -42,7 +42,7 @@ function core_customfield_inplace_editable($itemtype, $itemid, $newvalue) {
if (!$handler->can_configure()) {
throw new moodle_exception('nopermissionconfigure', 'core_customfield');
}
$newvalue = clean_param($newvalue, PARAM_NOTAGS);
$newvalue = clean_param($newvalue, PARAM_TEXT);
$handler->rename_category($category, $newvalue);
return \core_customfield\api::get_category_inplace_editable($category, true);
}
+4
View File
@@ -1,6 +1,10 @@
This files describes API changes in /customfield/*,
Information provided here is intended especially for developers.
=== 4.3 ===
* Field categories are now consistently of type `PARAM_TEXT`, ensure instance `get_formatted_name()` helper is used
during output
=== 4.2 ===
* The `\customfield_select\field_controller::get_options_array` method, deprecated since 3.10, has been removed, use
the field instance `get_options` method instead