MDL-78533 grade: relax param type of itemname in external structures.

Ensure it conforms to the same format as allowed for course modules.
This commit is contained in:
Paul Holden
2023-08-21 10:53:40 +01:00
parent e998f14061
commit bdfe13c4fd
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ class get_gradeitems extends external_api {
'gradeItems' => new external_multiple_structure(
new external_single_structure([
'id' => new external_value(PARAM_ALPHANUM, 'An ID for the grade item', VALUE_REQUIRED),
'itemname' => new external_value(PARAM_TEXT, 'The full name of the grade item', VALUE_REQUIRED),
'itemname' => new external_value(PARAM_CLEANHTML, 'The full name of the grade item', VALUE_REQUIRED),
'category' => new external_value(PARAM_TEXT, 'The grade category of the grade item', VALUE_OPTIONAL),
])
),
+1 -1
View File
@@ -505,7 +505,7 @@ class user extends external_api {
new external_single_structure(
[
'id' => new external_value(PARAM_INT, 'Grade item id'),
'itemname' => new external_value(PARAM_TEXT, 'Grade item name'),
'itemname' => new external_value(PARAM_CLEANHTML, 'Grade item name'),
'itemtype' => new external_value(PARAM_ALPHA, 'Grade item type'),
'itemmodule' => new external_value(PARAM_PLUGIN, 'Grade item module'),
'iteminstance' => new external_value(PARAM_INT, 'Grade item instance'),
+3
View File
@@ -17,6 +17,9 @@ Information provided here is intended especially for developers.
- grade/classes/external/get_groups_for_selector
- Has been relocated to core_group_external::get_groups_for_selector()
- groupimageurl is now available as an optional parameter to give the user an image either set or generated for the group.
* The grade `itemname` property contained in the return structure of the following external methods is now PARAM_CLEANHTML:
- `core_grades_get_gradeitems`
- `gradereport_user_get_grade_items`
* The grade_helper::get_lang_string() function has been deprecated. Please use get_string() instead.
=== 4.1 ===