Paul Holden
Lead maintainer
Moodle Cohorts are a great tool for creating site-wide groups of users, and using these groups to enrol users en-masse into courses. This plugin extends the functionality of cohorts by allowing them to be automatically assigned to system-level roles.
This is especially useful for local customizations, i.e. you want your Staff Users cohort to be enrolled into all staff related courses, but also assign them to a system role that grants them extra permissions across the site. By listening for relevant events, any amendments made to configured cohorts will automatically be reflected in the appropriate roles.
After installing the plugin, linking a cohort to a role is as simple as selecting each from a dropdown menu and pressing Save changes:

See the project readme file for the most up to date instructions.
Supports Moodle version 4.1 onwards (up to and including 5.1).
The latest plugin release is 5.1 (10 October 2025):