Assign system role on user registration

Assign system role on user registration

by Anne P. -
Number of replies: 1

Hi,

we are using moodle for internal and external learners. To enabe courses only for internal students, I have created a system role 'internal student' which allows users with this role to see hidden courses and categories. Right now I assign internal learners manually to this role - is there a way that by registering with an email address including '@company.com' this learner is assigned to the role internal student?

Thanks a lot in advance, Anne

Average of ratings: -
In reply to Anne P.

Assign system role on user registration

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi,

I suppose some dynamic cohort plugin that creates cohorts based on user emails could be used. Some of them may allow you to assign system role directly or you can use some other plugin to assign it.

See Dynamic cohorts plugin and Cohort role synchronisation plugins for example.

Average of ratings: Useful (1)