mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-46054-master' of git://github.com/jleyva/moodle
This commit is contained in:
commit
fb991204a9
@ -405,7 +405,7 @@ class core_grades_external extends external_api {
|
||||
'str_feedback' => new external_value(
|
||||
PARAM_TEXT, 'A string representation of the feedback from the grader', VALUE_OPTIONAL),
|
||||
)
|
||||
), 'Any student grades to alter', VALUE_OPTIONAL),
|
||||
), 'Any student grades to alter', VALUE_DEFAULT, array()),
|
||||
'itemdetails' => new external_single_structure(
|
||||
array(
|
||||
'itemname' => new external_value(
|
||||
@ -428,7 +428,7 @@ class core_grades_external extends external_api {
|
||||
PARAM_BOOL, 'True if the grade item should be deleted', VALUE_OPTIONAL),
|
||||
'hidden' => new external_value(
|
||||
PARAM_BOOL, 'True if the grade item is hidden', VALUE_OPTIONAL),
|
||||
), 'Any grade item settings to alter', VALUE_OPTIONAL
|
||||
), 'Any grade item settings to alter', VALUE_DEFAULT, array()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -161,8 +161,8 @@ class mod_forum_external extends external_api {
|
||||
array(
|
||||
'forumids' => new external_multiple_structure(new external_value(PARAM_INT, 'forum ID',
|
||||
'', VALUE_REQUIRED, '', NULL_NOT_ALLOWED), 'Array of Forum IDs', VALUE_REQUIRED),
|
||||
'limitfrom' => new external_value(PARAM_INT, 'limit from', VALUE_OPTIONAL, 0),
|
||||
'limitnum' => new external_value(PARAM_INT, 'limit number', VALUE_OPTIONAL, 0)
|
||||
'limitfrom' => new external_value(PARAM_INT, 'limit from', VALUE_DEFAULT, 0),
|
||||
'limitnum' => new external_value(PARAM_INT, 'limit number', VALUE_DEFAULT, 0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -1313,9 +1313,9 @@ class '.$classname.' {
|
||||
}
|
||||
}
|
||||
} else if ($keydesc->required == VALUE_OPTIONAL) {
|
||||
//it does make sens to declare a parameter VALUE_OPTIONAL
|
||||
//VALUE_OPTIONAL is used only for array/object key
|
||||
throw new moodle_exception('parametercannotbevalueoptional');
|
||||
// It does not make sense to declare a parameter VALUE_OPTIONAL.
|
||||
// VALUE_OPTIONAL is used only for array/object key.
|
||||
throw new moodle_exception('erroroptionalparamarray', 'webservice', '', $name);
|
||||
}
|
||||
} else { //for the moment we do not support default for other structure types
|
||||
if ($keydesc->required == VALUE_DEFAULT) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user