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

enrol_manual_enrol_users roleid parameter

$
0
0

by Andrew Solomon.  

I'm trying to enrol users into a course - as students - using the enrol_manual_enrol_users wsfunction. One of the parameters required is the roleid for role 'student'.

I don't see a wsfunction which will inform me of what the 'student' role's id is, although I have seen that in two separate installations:

moodle=> select id, shortname from mdl_role where shortname = 'student';

 id | shortname 

----+-----------

  5 | student

(1 row)


Should I just hard-code 5 as the roleid?

Thanks for your advice in advance!


Andrew


Viewing all articles
Browse latest Browse all 2361

Trending Articles