Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37690

Re: add moodle/webservice:createtoken capability to all students

$
0
0
by Anne Krijger.  

Hi Tim,

Thanks, that worked and will do for now.
This will give all authenticated users access to the Webservice.

I noticed that for the Authenticated user role there is no Context selected by default.
Looking at set_role_contextlevels(...) and mdl_role_context_levels that means that no records will be present for that role(id).

Looking at the code I gather it is not possible to give a role certain capabilities in one Context and other capabilities in another Context. Is that correct?

If I remember correctly you also can't assign more than one role to a user in a given context (course being the most obvious). I also didn't see a way to create a role as an extension of another role. So if I will need to assign the Webservice access capability only to students, how would I go about that?

I still feel like I'm not seeing something smile

Anne.


Viewing all articles
Browse latest Browse all 37690

Trending Articles