Skip to content

Commit

Permalink
MDL-75085 external: Fix external_multiple_structure parameter passing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
junpataleta committed Feb 2, 2023
1 parent 2147bd6 commit a85c424
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions completion/classes/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ public static function get_activities_completion_status_returns() {
)
]
),
'Completion status details',
VALUE_DEFAULT,
[]
),
Expand Down
7 changes: 4 additions & 3 deletions course/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ public static function get_course_contents_returns() {
'dataid' => new external_value(PARAM_NOTAGS, 'cm data id', VALUE_OPTIONAL),
)
),
'Course dates',
VALUE_DEFAULT,
[]
),
Expand Down Expand Up @@ -519,7 +520,7 @@ public static function get_course_contents_returns() {
VALUE_OPTIONAL
),
)
), VALUE_DEFAULT, array()
), 'Course contents', VALUE_DEFAULT, array()
),
'contentsinfo' => new external_single_structure(
array(
Expand Down Expand Up @@ -1310,7 +1311,7 @@ public static function duplicate_course_parameters() {
'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()
),
)
);
Expand Down Expand Up @@ -1537,7 +1538,7 @@ public static function import_course_parameters() {
'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()
),
)
);
Expand Down

0 comments on commit a85c424

Please sign in to comment.