I caught this in error logs when testing the plugin:
Debugging: Invalid $required parameter value: 'Errors'. It must be either VALUE_DEFAULT, VALUE_REQUIRED, or VALUE_OPTIONAL in
* line 54 of /lib/external/classes/external_description.php: call to debugging()
* line 47 of /lib/external/classes/external_single_structure.php: call to core_external\\external_description->__construct()
* line 604 of /local/coursetransfer/classes/external/frontend/sites_external.php: call to core_external\\external_single_structure->__construct()
* line ? of unknownfile: call to local_coursetransfer\\external\\frontend\\sites_external::origin_test_returns()
* line 118 of /lib/external/classes/external_api.php: call to call_user_func()
* line 1408 of /webservice/lib.php: call to core_external\\external_api::external_function_info()
* line 1315 of /webservice/lib.php: call to webservice_base_server->load_function_info()
* line 44 of /webservice/rest/server.php: call to webservice_base_server->run()
And I noticed that all declarations of external structures have actually invalid parameters. In places like this:
I caught this in error logs when testing the plugin:
And I noticed that all declarations of external structures have actually invalid parameters. In places like this:
https://github.com/UNIMOODLE/moodle-local_coursetransfer/blob/d366527dc0d0d71b959cb8328ec5855b8f681e51/classes/external/backend/remove_external.php#L232
there should be no
PARAM_TEXT
or any other param type. The constructor expects different parameters.This is serious as it may have impact on the web service functionality or even security.