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-08 17:20:45 +01:00
parent f12e1b82a0
commit e4ba5d276d
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
2 changed files with 5 additions and 1 deletions

View File

@ -508,7 +508,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'),

View File

@ -1,6 +1,10 @@
This file describes API changes in /grade/* ;
Information provided here is intended especially for developers.
=== 4.1.6 ===
* The grade `itemname` property contained in the return structure of the following external methods is now PARAM_CLEANHTML:
- `gradereport_user_get_grade_items`
=== 4.1 ===
* The $importactiveurl parameter in the constructor of the core_grades\output\import_action_bar class has been deprecated and is not used anymore.
* The $exportactiveurl parameter in the constructor of the core_grades\output\export_action_bar class has been deprecated and is not used anymore.