Enroling course and role assignment through rest api

Enroling course and role assignment through rest api

by Eswar sfc -
Number of replies: 1

Hi All,


Im using moodle version-3.3 ,iam able to create users through rest API,but i m failing to assign roles and coures to that user presently im facing this error,plz check below.


{"exception":"moodle_exception","errorcode":"wsusercannotassign","message":"You don't have the permission to assign this role (5) to this user (323) in this course(26)."}


Thanks,

Eswar

Average of ratings: -
In reply to Eswar sfc

Re: Enroling course and role assignment through rest api

by Zadok Lindt -

You have to muck around with the permissions in the System Admin section of Moodle to get it to work.

(I forget the name of the screen, I think its in "Plugins" or "Webservice" or something like that.