webservice_access_exception for call gradereport_user_get_grade_items

webservice_access_exception for call gradereport_user_get_grade_items

by Ellen Greyling -
Number of replies: 6

Heya all! I have a problem and I was wondering if anyone could help.

I'm trying to pull completion data from Moodle into our integrated TMS system using the call gradereport_user_get_grade_items, but every time it just errors with the following appearing in our SQL logs: 

Moodle ID: 16, Error: Error Code: accessexception Message: Access control exception Exception: webservice_access_exception

The integration is working fine for pushing user data into Moodle. I've looked at a few threads on similar issues and checked all of my user's permissions and web service functions, and I can't see anything obviously wrong.

Current functions in the web service are as follows:
core_completion_get_activities_completion_status
core_course_create_courses
core_role_assign_roles
core_user_create_users
core_user_update_users
enrol_manual_enrol_users

I've also added all of the web service protocols to the api role, but no luck. Token isn't out of date or anything either. Anyone have anything else I can try?

Thanks!

Average of ratings: -
In reply to Ellen Greyling

Re: webservice_access_exception for call gradereport_user_get_grade_items

by Vitaly Potenko -
Picture of Core developers Picture of Plugin developers
Is it the error message with the debugging turned on?
In reply to Vitaly Potenko

Re: webservice_access_exception for call gradereport_user_get_grade_items

by Ellen Greyling -

Hiya,

No, this is the message that Moodle sends across to our TMS. Would more detailed logs appear in the Moodle debugging logs or not? 

In reply to Ellen Greyling

Re: webservice_access_exception for call gradereport_user_get_grade_items

by Vitaly Potenko -
Picture of Core developers Picture of Plugin developers
Try setting the debug mode in your Moodle into displaying of all possible errors (if not yet). And then call the function again to see if a more detailed message appears.
In reply to Vitaly Potenko

Re: webservice_access_exception for call gradereport_user_get_grade_items

by Ellen Greyling -
Have set the debugging to normal. Nothing more is coming through to our SQL error logs, but there is this error in the client's moodle debugs - not sure if it's related at all though? Doesn't reference web_services at all, so my thinking is not.

parent does not exist!
line 912 of /lib/adminlib.php: call to debugging()
line 68 of /admin/settings/messaging.php: call to admin_category->add()
line 8065 of /lib/adminlib.php: call to require()
line 41 of /admin/category.php: call to admin_get_root()
In reply to Ellen Greyling

Re: webservice_access_exception for call gradereport_user_get_grade_items

by Ellen Greyling -
Setting it to all or developer seems to just show more of the same error too
In reply to Ellen Greyling

Re: webservice_access_exception for call gradereport_user_get_grade_items

by Vitaly Potenko -
Picture of Core developers Picture of Plugin developers
Well, in that case I would have a testing instance of Moodle and try to put breaking points in the code of the functions called to see where exactly the exception is thrown. A bit tedious, right, but is more useful than just guessing. Finally you'll spot it.