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