General plugins (Local): Auto Group

local_autogroup
Maintained by Picture of Mark WardMark Ward, Picture of Emma RichardsonEmma Richardson, Picture of Arnaud TrouvéArnaud Trouvé
A local plugin which automatically assigns enrolled users on a course into groups dependant upon information within their user profile. (Now with custom profile field support - called User Info Field in settings.) This plugin will create, update, and delete groups automatically to match the users on your course. All behaviour is event-driven and so will occur within page loads. The system can also monitor manual group setting changes and moderate them to ensure that groups are kept neat and tidy.
507 sites
267 downloads
44 fans
Current versions available: 5

A local plugin which automatically assigns enrolled users on a course into groups

dependant upon information within their user profile.

 

This plugin will create, update, and delete groups automatically

to match the users on your course. All behaviour is event-driven

and so will occur within page loads.

 

The system can also monitor manual group setting changes and

moderate them to ensure that groups are kept neat and tidy.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Picture of Mark Ward
Mark Ward (Lead maintainer)
Picture of Emma Richardson
Emma Richardson: Maintainer
Picture of Arnaud Trouvé
Arnaud Trouvé: Contributor
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Ian Fourie
    Thu, Nov 14, 2019, 3:08 PM
    Hi Team,

    First of all, great plugin, your work on this has been much appreciated.

    I have a unique situation which I hope you would be able to help with:

    Students belong to multiple groups outside of Moodle in a 3rd party database. These groups are structured externally and have an existing structure. So when a user authenticates and enrolls into a Moodle course, we would like the group creation and sorting to be automated.

    Is it possible to have comma separated values (group names) in a single profile field to automate groups? (If not we’re open to suggestions)

    Eg: Lets use Stuart (a student):

    He belongs to a School called “School A”. We have a custom profile field linking all schools with unique IDs. However every school has sub groups, for example:

    Stuart belongs to Sub Groups within School A: Year 1, Class A, Class B and Class C

    So can there be another custom profile field called “Sub Groups” where all groups can be placed separated by commas? Structured like this:

    School -> “School A”
    Sub Groups -> “Year 1, Class A, Class B, Class C”

    Ideally this should create 5 groups:
    School A (As top group), then subgroups: School A Year 1, School A Class A, School A Class B, School A Class C

    The order of the subgroups should also not matter. So if the position of a subgroup for Stuart is the 2nd place in the comma separated list, this should link to another user (Molly) who has the same unique subgroup in let’s say the 4th place in the commas separated list. For clarity:

    Stuart: Year 1, Group A, Group B, Group C
    Molly: Year 1, Group C, Group X, Group Z

    Stuart and Molly will be grouped together in subgroup Year 1 and Group C.

    There are 3 mechanisms at play here:

    1) Top Groups are linked to subgroups
    2) Subgroups are all added in one profile field separated by commas
    3) The order of the subgroups should not matter

    I hope the above provides clarity. I would appreciate if you could let me know how this would be possible with your plugin?

    The challenge is that the 3rd party database is highly complex in its structure with 1000s of groups which need to be created automatically as a user enrolls into a course.

    I’m also open to other suggestions to make these 3 mechanisms work.

    Thanks so much in advance.

    Ian


  • Picture of Chris Swinney
    Sun, Dec 29, 2019, 9:37 PM
    Hi,

    I have the same request as Denis Saez back on Tue, 23 Jul 2019. I'm looking for a way to create a single group automatically for each user enrolment (where each group contains just one member and could have a naming convention like "{firstname} {last name} (creation_date}". or somesuch). There have been a number of discussions around this subject over the years, but as yet I haven't seen a simple way to achieve this.

    There is an activity plugin called "Grouping" and although this allow the teacher to create groups in this way, it's not automatic at the time of enrolment.
  • Picture of Steve Radford
    Tue, Apr 14, 2020, 11:12 PM
    Does anyone know whether this plugin would work in Moodle V3.8? We're currently running in V3.6 and we're planning to upgrade to 3.8 later this week. Unsure if I should uninstall this plugin first to be sure it won't cause any issues.
  • Picture of Emma Richardson
    Wed, Apr 15, 2020, 1:27 AM
    I am using it in 3.8 and have not seen any issues so far.
  • Sketch...
    Mon, Jun 22, 2020, 7:24 PM
    Emma, has this plugin been tested in Moodle 3.9?
    Could you add a note to the plugin page https://moodle.org/plugins/pluginversions.php?plugin=local_autogroup saying what the latest supported versions are and that version 2.4.1 (2019010300) has been tested in Moodle 3.8. And 3.9?
    That versions page shows that the last release was on 4 February 2019. That creates the impression that the plugin is no longer actively maintained.
  • Picture of Arnaud Trouvé
    Wed, Jun 24, 2020, 4:41 AM
    Hi Luis,
    Just done a quick test on a fresh 3.9. It seems OK to me. smile
    I let Emma (current lead maintainer) to do more extensive tests and update plugin details to add 3.8 and 3.9 as supported versions.
  • Picture of Emma Richardson
    Wed, Jun 24, 2020, 7:41 PM
    I will try and get that updated soon.
  • Picture of Thomas Robb
    Wed, Jul 8, 2020, 9:56 AM
    I got these error messages when admin/index.php using Moodle 3.9. Is there a quick fix? I don't mind tweaking the code myself if I know what needs changing.

    Plugin mod_autogroup does not declare valid $plugin->component in its version.php.
    line 315 of /lib/classes/plugin_manager.php: call to debugging()
    line 335 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()
    line 217 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()
    line 143 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()
    line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
    line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
    line 355 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
    line 1118 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins()
    line 1239 of /admin/renderer.php: call to core_plugin_manager->missing_dependencies()
    line 212 of /admin/renderer.php: call to core_admin_renderer->missing_dependencies()
    line 679 of /admin/index.php: call to core_admin_renderer->upgrade_plugin_check_page()
    Invalid get_string() identifier: 'modulename' or component 'mod_autogroup'. Perhaps you are missing $string['modulename'] = ''; in mod/autogroup/lang/en/autogroup.php?
    line 349 of /lib/classes/string_manager_standard.php: call to debugging()
    line 7103 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 64 of /lib/classes/plugininfo/mod.php: call to get_string()
    line 142 of /lib/classes/plugininfo/base.php: call to core\plugininfo\mod->init_display_name()
    line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
    line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
    line 355 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
    line 1118 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins()
    line 1239 of /admin/renderer.php: call to core_plugin_manager->missing_dependencies()
    line 212 of /admin/renderer.php: call to core_admin_renderer->missing_dependencies()
    line 679 of /admin/index.php: call to core_admin_renderer->upgrade_plugin_check_page()
  • Picture of Arnaud Trouvé
    Wed, Jul 8, 2020, 4:27 PM
    Debug message refer to a "mod_autogroup" plugin not "local_autogroup".
    Maybe did you try to install it manually (not by using moodle interface) and put it in mod/ folder. As this is a local plugin you should put it in local/ folder smile
  • Picture of Thomas Robb
    Wed, Jul 8, 2020, 6:21 PM
    Thank you! I'm a very old Moodle user, since Moodle 1.4, and never put a plug-in anywhere except in "mod". Thank you for your help!
  • Picture of Thomas Robb
    Mon, Jul 27, 2020, 10:08 PM
    Would it be possible to add "country" to the possible criteria for auto-grouping? I'm running a MOOC and need to arrange the groups that way. In the past week, I've had to group over 400 users manually!
  • Picture of Emma Richardson
    Mon, Jul 27, 2020, 10:34 PM
    it would be doable but we don't really have anyone with time to work on this right now. If you have someone to develop and put in a pull request I am working on those right now. In the meantime, could you just sync the country field to a custom field and work it that way?
  • Picture of Thomas Robb
    Mon, Jul 27, 2020, 10:47 PM
    Thank you! I'll try that work around. If you do eventually get around to adding more fields, why not simply add all potentially useful fields, not just "country".
  • Picture of Stefano Tirati
    Wed, Aug 12, 2020, 4:13 PM
    Dear Emma,
    first of all congratulations, your plugin looks impressive!
    I have a request similar to the one of Ian Fourie dated 14 nov 2019.
    Some of our users need to be part of multiple groups: would it be possible to adopt a delimiter which would allow us to insert the values of multiple groups into 1 custom profile field so that certain users may be added to multiple groups?
  • Picture of Emma Richardson
    Fri, Sep 4, 2020, 1:08 AM
    Please post on our github. If there is any chance of you coming up with a fix that we can review, go ahead and do a pull request.
1 2 3 4
Please login to post comments