-
Improvement
-
Resolution: Incomplete
-
Minor
-
None
-
4.3
-
None
-
MOODLE_403_STABLE
It would be "helpful" if the external_api implemented a simple "true/false" or "success" return structure that we could just return instead of having to manually construct a simple "result (boolean) type structure.
Something along the lines of, so that we don't all have to simply reproduce the same _returns() function.
new \external_single_structure([ |
'result' => new \external_value(PARAM_BOOL, 'True or false') |
]);
|
Or alternatively just allow the web services to wrap any web service method with a success result if it doesn't throw an exception or return a value.