I configured REST webservice on Moodle 3.0.5 to use function core_course_get_courses
which is supposed to return a response containing basic info about all available courses.
This is the URL I've been using:
https://example.com/webservice/rest/server.php?wstoken=713898e3fcaf9ead2218eb7565993230&wsfunction=core_course_get_courses&moodlewsrestformat=json
And, this is what I get:
{
"exception": "required_capability_exception",
"errorcode": "nopermissions",
"message": "Sorry, but you do not currently have permissions to do that (View courses without participation)"
}
The permission in question has been set from the start, that is:
moodle/course:view
It does not have any effect. I even allowed everything, some few hundred permissions just to see if it would work, but still no effect.
I used another function with the same service, it does work!:
core_enrol_get_enrolled_users
Another important fact is that the core_course_get_courses
function works on a local, development machine with fresh installation of Moodle. The production environment has 50 additional plugins installed.
The debugging, "extra Moodle debug messages for developers" has been enabled but there are no errors shown.
What could be the cause for this?
P.S. Dev. machine is Ubuntu 14.04