Reputation: 1541
I need to assign student role to all users by default who are registering our Moodle site through registration form from frontend. How we can assign student role by default.
Note : If admin is creating new account or uploading bulk users they can assign any roles manually.
Upvotes: 0
Views: 2524
Reputation: 1541
We need to change some settings in admin to achieve this.
In Administration
> user' >
Permissions>
Define roles`
Edit student
role :
change Role archetype
to None
.
For Context types where this role may be assigned
enable system
.
In Site administration
> Plugins
> Enrolments
> Self enrolment
Change Default role assignment Invalid current value
to student
More details here : https://moodle.org/mod/forum/discuss.php?d=170956
Upvotes: 0
Reputation: 10241
The student role is added when a user is enrolled on a course, so is at the course level rather than site level.
It sounds like you want to auto-enrol users on courses? There are a couple of enrolment plugins that will do that:
https://moodle.org/plugins/enrol_autoenrol
https://moodle.org/plugins/enrol_auto
Upvotes: 0