General plugins (Local): Cohort role synchronization
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 3.5 onwards (up to and including 3.10).
The latest plugin release is 3.3 (9 November 2020):
- Support for Moodle 3.10
Although the plugin was designed for Moodle 2.6, it should continue to work fine in later versions - please let me know if not!
I've tested the plugin successfully against the latest git master (3.0) and it works fine, so will work in any supported version prior to that.
Thanks for creating this plugin. I'm wondering if you plan to upgrade it for Moodle 3.0 on the repositary?
Thank you, Catherine
you might be interested that we created a plugin which provides a mapping from custom user profile fields to cohorts. It is published on https://github.com/moodleuulm/moodle-local_profilecohort and currently waiting for approval in the plugins repo.
I have recommended your plugin in our plugin's README as a solution for mapping from custom user profile fields to system roles and we are using this combination in production.
Thanks for your work!
Alex
Awesome plugin, just what we need for making our moodle site a little bit easier to maintain. It's working on our 3.2 test site right now but we're planning to push our site to 3.3 soon too and we're wondering if there are any known issues with it on 3.3 as it isn't officially compatible according to this page.
Cheers,
Rob
I would like to give the manager-role the capability to perform this plugin.
In my site the function is only available to the admin.
How can the capabilities be set?
Any updates to Moodle 3.5?
Ricardo
That would be really great!
https://www.onlyhealthyadvice.com/
Thanks for a great plugin
Is there any chance you could extend this plugin so that cohorts could be assigned roles in categories?