Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

Moodle webservice core_role_assign_roles dont works for course_categories

$
0
0
by Moritz Grey.  

Hey Everyone, 


i want to give the user id: 4 for coursecategorie: 1049 the role: 2 (coursecreater)

Here is my Curl:


MyMoodle/webservice/rest/server.php?wstoken=MyToken&wsfunction=core_role_assign_roles&moodlewsrestformat=json&assignments[0][roleid]=2&assignments[0][userid]=4&assignments[0][contextid]=1&assignments[0][contextlevel]=coursecat&assignments[0][instanceid]=1049

i get as answer "null", it works. But i do not see the user with the id 4 in the coursecategorie 1049 as coursecreater.

Whats wrong on my curl?

Thanks for help!



Viewing all articles
Browse latest Browse all 2361

Trending Articles