MDL-76723 core_tag: Use external_format_value constructor properly

* First parameter should be the field name that the format property
points to.
* No need for VALUE_REQUIRED since it's the default for the $required
parameter.
* Third parameter is the default value and not a description string.
This commit is contained in:
Jun Pataleta
2023-12-19 15:48:08 +08:00
parent 80839957ef
commit 99596c7bc7
+1 -1
View File
@@ -242,7 +242,7 @@ class core_tag_external extends external_api {
'name' => new external_value(PARAM_TAG, 'name'),
'rawname' => new external_value(PARAM_RAW, 'tag raw name (may contain capital letters)'),
'description' => new external_value(PARAM_RAW, 'tag description'),
'descriptionformat' => new external_format_value(PARAM_INT, VALUE_REQUIRED, 'tag description format'),
'descriptionformat' => new external_format_value('description'),
'flag' => new external_value(PARAM_INT, 'flag', VALUE_OPTIONAL),
'official' => new external_value(PARAM_INT,
'whether this flag is standard (deprecated, use isstandard)', VALUE_OPTIONAL),