-
Bug
-
Resolution: Fixed
-
Major
-
2.3.1
I'm building out a webservice that retrieves a given user's courses. I've created an external webservice with the core_enrol_get_users_courses() function, allowed it for authorized users only, assigned a role account to it, and verified that the user has all the required capabilities. When I try to retrieve courses for the passed user id, I get a null return.
After turning on debugging I find that validate_context() is throwing a require_login_exception exception, which doesn't make any sense to me. I've verified that if I skip the validate_context tests the proper courses would be returned.
- has been marked as being related by
-
MDL-23398 Web service moodle_group_get_groups doesn't work
-
- Closed
-
-
MDL-27968 Impossible to test externallibs (still occurs in phpunit tests)
-
- Closed
-
-
MDL-35292 require_login_exception received when attempting to delete a course with core_course_delete_courses webservice
-
- Closed
-
-
MDL-46101 Do not call require_login() from external_api::validate_context()
-
- Closed
-