Hi there,
I am enrolling users to courses directly in database (mdl_user_enrolments). But I need all users to have student role for each course, where are they enrolled. Can You help me, how to do it?
I have two ideas:
1) Directly in mysql, but I don't know the right tables. Where is connection "user, course, role"?
2) Set up defaultuserroleid as student. But this is not allowed by moodle. Where in code I can enable defaultuserroleid changing?
Regards,
Petr Bezruc
Roles and permissions
add user with student role directly to database
This discussion has been locked so you can no longer reply to it.