$USER variable in moodle web service

$USER variable in moodle web service

by Nir Karniel -
Number of replies: 0

Hi all,

 

I'm having some troubles using web service mod_assign_get_assignments which uses method

get_assignments.

 

As I understand this method takes the logged in user's session by using  $USER->id variable and returns list of all his assignments.

 I'm sending as parameter capabilities array is empty.

courseids: array of users' list of courses by taken from web service core_enrol_get_users_courses which works fine. 

Even thought I'm logged in as a simple user to moodle and calling the web service on the same browser, it always refers to the admin's user id and i'm getting  "User is not enrolled or does not have requested capability"

 

Thanks for replying

 

 

Average of ratings: -