MDL-75085 external: Fix external_multiple_structure parameter passing

Some calls to the external_multiple_structure's constructor incorrectly
pass parameters where the value for the $description parameter is not
being passed. This results to invalid values being passed for the
$required parameter.
This commit is contained in:
Jun Pataleta 2023-02-01 11:32:07 +08:00
parent 1753e85f1a
commit bdd3e5efb1
2 changed files with 5 additions and 3 deletions

View File

@ -339,6 +339,7 @@ class core_completion_external extends external_api {
)
]
),
'Completion status details',
VALUE_DEFAULT,
[]
),

View File

@ -483,6 +483,7 @@ class core_course_external extends external_api {
'dataid' => new external_value(PARAM_NOTAGS, 'cm data id', VALUE_OPTIONAL),
)
),
'Course dates',
VALUE_DEFAULT,
[]
),
@ -514,7 +515,7 @@ class core_course_external extends external_api {
VALUE_OPTIONAL
),
)
), VALUE_DEFAULT, array()
), 'Course contents', VALUE_DEFAULT, array()
),
'contentsinfo' => new external_single_structure(
array(
@ -1305,7 +1306,7 @@ class core_course_external extends external_api {
'value' => new external_value(PARAM_RAW, 'the value for the option 1 (yes) or 0 (no)'
)
)
), VALUE_DEFAULT, array()
), 'Course duplication options', VALUE_DEFAULT, array()
),
)
);
@ -1532,7 +1533,7 @@ class core_course_external extends external_api {
'value' => new external_value(PARAM_RAW, 'the value for the option 1 (yes) or 0 (no)'
)
)
), VALUE_DEFAULT, array()
), 'Course import options', VALUE_DEFAULT, array()
),
)
);