-
Bug
-
Resolution: Fixed
-
Minor
-
3.2, 3.2 regressions, 3.5, 3.7.1
-
MOODLE_32_STABLE, MOODLE_35_STABLE, MOODLE_37_STABLE
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
MDL-57678-master-3 -
-
0
-
International 4.0 - Sprint 1, International 4.0 - Sprint 2
We have found a minor regression of MDL-55564 which we stumbled upon while working on one of our plugins but which can also be seen on /admin/settings.php?section=enrolsettingsldap:
- There is a settings widget to display a list of categories. The content of the widget is fetched from make_categories_options() in /course/lib.php. The function returns a list of categories which is indented by
- In 3.2, the list of categories is not correctly indented anymore because the
 
- According to davosmith who investigated this problem for us,
the reason for the output is
MDL-55564- all the admin settings are now output via templates, which means that the code is automatically cleaned to escape any potentially bad characters (& < >). Unfortunately, this leads to the spaces becoming double-encoded in this case.
In our plugin, we will handle this problem as an intermediate solution by using
$categories = make_categories_options();
|
foreach ($categories as $id => $category) {
|
$categories[$id] = html_entity_decode($category);
|
}
|
before creating the settings widget (as a reference for the reviewer: https://github.com/moodleuulm/moodle-local_resort_courses/blob/master/settings.php#L64), but it would be nice if this problem could be investigated by Moodle HQ as the function make_categories_options() is designed to output the list indented, but the template rendering doesn't seem to be compatible anymore.
Thanks,
Alex
- has a non-specific relationship to
-
MDL-59967 Indention in admin_settings_coursecat_select broken: HTML in admin_settings_configselect option values is escaped
- Closed
-
MDL-60331 In question management, category selection fields do escape < > and & in optgroup labels
- Closed
- is a regression caused by
-
MDL-55564 Convert admin settings to templates
- Closed