Automatic enrolment in groups

Administration tools ::: tool_groupautoenrol
Maintained by OamPascal Maury, Gemma Lesterhuis, Luuk VerhoevenLuuk Verhoeven, hamza tamyachte
Plugin to auto enrol users in Moodle courses groups
Latest release:
316 sites
188 downloads
32 fans
Current versions available: 4
  • Moodle - Tool Group Auto Enrol

    CI Status

    Automatically enrol students into course groups when they join a course. Works with all enrolment methods (manual, self-enrolment, cohort sync) and randomly assigns users to ensure balanced group distribution.

    Author

    ldesignmedia

    Moodle405 Moodle500 Moodle501

    PHP81 PHP82

    Privacy-friendly

    List of features

    • Automatically enrols students into groups when they join a course
    • Works with all enrolment methods (manual, self-enrolment, cohort sync)
    • Random assignment to ensure balanced group distribution
    • Per-course enable/disable configuration
    • Choice to auto-enrol in all existing groups or specific ones
    • GDPR compliant implementation
    • Course-level management through "Course administration > Users > Auto-enrol in groups"

    Installation

    1. Copy this plugin to the admin/tool/groupautoenrol folder on the server
    2. Login as administrator
    3. Go to Site Administrator > Notification
    4. Install the plugin
    5. Create groups in your course(s)
    6. Enable the plugin for specific courses via "Course administration > Users > Auto-enrol in groups"

    Security

    If you discover any security related issues, please email luuk@ldesignmedia.nl instead of using the issue tracker.

    License

    The GNU GENERAL PUBLIC LICENSE. Please see License File for more information.

    Contributing

    Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.

    Credits

    Changelog

    See CHANGELOG.md for a full list of changes.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Oam
Pascal Maury (Lead maintainer)
Gemma Lesterhuis: New maintainer
Luuk Verhoeven
Luuk Verhoeven: New Maintainer
hamza tamyachte: New Maintainer
Please login to view contributors details and/or to contact them

Comments

Show comments
  • Anthan Ren
    Mon, 23 May 2016, 1:56 PM
    Is there any possible to enrollment automatically from external database?
    Thanks.
  • Oam
    Mon, 23 May 2016, 4:02 PM
    Hello Anthan Ren,
    I never used external database, so I am not planning to work on enrollment automatically from external database for now, sorry. You can improve my code in this way smile
  • Janice Johnson
    Wed, 15 Feb 2017, 7:14 AM
    Hello - I have the plugin working on moodle 3.0x, and everything is working fine. I just don;t understand how the plugin assigns students to groups.

    I need students to be assigned to specific groups, and I have a table in an external database that contains the groups and students names. Can you tell me how this plugin assigns groups, so that I can augment for my use?
  • Oam
    Wed, 15 Feb 2017, 5:31 PM
    My plugin does not match your need. See my answer here : https://moodle.org/mod/forum/discuss.php?d=259371
  • John Anderson
    Tue, 3 July 2018, 3:20 AM
    Only random groups? Can I set it to just one? A specific group?
  • Oam
    Tue, 3 July 2018, 10:05 PM
    Yes, you can choose only one group.
    Note : I have no idea if my plugin still works with Moodle > 3.0.
    You have to test it first !
  • Thomas Robb
    Fri, 17 July 2020, 3:54 PM
    I would like new users to be automatically assigned to a group based on their country. Right now, I only see "Department, Institution, City & Preferred language. Would it be difficult to add "Country" to the list of profile fields? I'd be willing to pay a modest sum to have this implemented.
  • Gemma Lesterhuis
    Fri, 21 Aug 2020, 3:26 PM
    @thomas, if you want to use a profile field for group maybe this plugin is what you seek: https://moodle.org/plugins/local_autogroup
  • Gemma Lesterhuis
    Fri, 21 Aug 2020, 3:32 PM
    @pascal I have contracted a developer to update this plugin voor Moodle 3.9, we would like to publish this to Moodle.org, on this page. Could you please contact me on the best way to move forward?
  • Oam
    Fri, 21 Aug 2020, 4:03 PM
    Thank you Gemma for answering Thomas' question. Indeed, my plugin can not automatically assigtn users to a group based on their user profile information.
    No problem for updating this plugin, I have not time to update it anymore. I sent you a "contact request".
  • Gemma Lesterhuis
    Fri, 21 Aug 2020, 6:16 PM
    Just replied to the contact request. From what I understand you can add the successor to the plugin page with all the premissions. In my message I mentioned the names smile If you could arrange that, that would be great. Thank you
  • Sergio Renato Aldana Alvarez
    Tue, 26 Apr 2022, 4:14 AM
    I want to auto assing to 3 groups, but not sorted,
  • Vikram Solia
    Sat, 20 June 2026, 8:03 AM
    The latest version causes "Exception - Class "moodleform" not found" on this page:
    https://somemoodle/admin/tool/groupautoenrol/manage_auto_group_enrol.php?id=40

    Was able to patch it by replacing this line at top of the file from:
    require_once('../../../config.php');

    to this:
    require(__DIR__ . '/../../../config.php');
    require_once($CFG->libdir . '/formslib.php');
  • Vincent Cornelis
    Wed, 24 June 2026, 11:40 PM
    Hi Vikram Solia,

    Thank you for this contribution.
    We are looking into this and will provide an update shortly.

    Kind regards,

    Vincent Cornelis
    Ldesign Media
  • Luuk Verhoeven
    Thu, 25 June 2026, 2:27 AM
    Hi Vikram Solia,

    This should be solved now, we released version 5.1.1 you should be able to update the plugin to this new release.

    Kind regards,
    Luuk Verhoeven
1 2
Please login to post comments