Automatic enrolment in groups

Administration tools ::: tool_groupautoenrol
Maintained by OamPascal Maury, Gemma Lesterhuis, Luuk VerhoevenLuuk Verhoeven
Plugin to auto enrol users in Moodle courses groups
Latest release:
290 sites
77 downloads
25 fans
Current versions available: 3

Moodle tool for automatically enrolling students into course groups

In brief, groupautoenrol randomly assigns students to course groups when they are enrolled in a course (via any enrollment method: auto-enrol by key, cohort sync, or manual enrolment).

Moodle39 Moodle42 Moodle43 Moodle44 Moodle45 Moodle50

PHP74 PHP80 PHP81

Features

Core Functionality

  • Automatically enrolls students into groups when they join a course
  • Works with all enrollment methods (manual, self-enrollment, cohort sync)
  • Random assignment to ensure balanced group distribution
  • Per-course configuration

Technical Details

  • Uses \core\event\user_enrolment_created (user_enrolled) Moodle event
  • Safely handles deleted groups (ignores them during assignment)
  • GDPR compliant implementation
  • Admin tool plugin architecture for better integration

Configuration Options

  • Enable/disable plugin per course
  • Choose to auto-enrol in all existing groups or specific ones
  • 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"

Note: The "Auto-enrol in groups" link appears even if the plugin is not enabled for the course.

Testing the Plugin

  1. Create test groups: Navigate to a course and create multiple groups via Course administration > Participants > Groups
  2. Enable auto-enrollment: Go to Course administration > Users > Auto-enrol in groups and enable the feature
  3. Test enrollment methods:
    • Manual enrollment: Add users manually and verify group assignment
    • Self-enrollment: Have users self-enroll using an enrollment key
    • Cohort sync: Add users via cohort synchronization
  4. Verify results: Check Course administration > Participants > Groups to confirm users were randomly assigned

Compatibility

  • Tested with Moodle 3.9 - 5.0
  • PHP 7.4, 8.0, 8.1 support
  • Previous versions available for older Moodle releases

Version History

  • 5.0.0: Added support for Moodle 5.0
  • 4.5.0: Moodle 4.5 & PHP 8.1 version (stable release, June 2024)
  • 4.4.0: Moodle 4.4 version
  • 4.3.0: Moodle 4.3 version
  • 4.2.1: Fix issue #2 - Increased size of groupslist column
  • 4.2.0: Moodle 4.2 & PHP 8.0/8.1 version
  • 3.9.0: Moodle 3.9 & PHP 7.2 | Moodle 4.0 & PHP 7.4 | Moodle 4.1 & PHP 8.0
  • 1.1.2: Stable version as admin tool plugin for Moodle 3.x
  • 1.1.1: Stable version as local plugin for Moodle 2.x ( see moodle-local_groupautoenrol)
  • 1.1: Initial stable version (had bugs)

Key Features in 4.5.0

  • GDPR implementation
  • Per-course enable/disable option
  • Choice to auto-enrol in all existing groups or specific ones

Bug and Problem Support

This plugin is carefully developed and thoroughly tested, but bugs and problems can always appear. If you discover any security related issues, please email support@ldesignmedia.nl instead of using the issue tracker.

Please bear in mind that bug and problem support is not free of charge. This is with the exception of developers that report and suggest a solution by creating a pull request.

Feature Proposals

We are aware that members of the community will have other needs and would love to see them solved by this plugin. We are always interested to read about your feature proposals or even get a pull request from you, but please understand that we handle these as feature proposals and not as feature requests that we commit to implementing.

License

Group Auto Enrol code is provided freely as open source software, under version 3 of the GNU General Public License.

Contributing

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

Credits

Screenshots

Screenshot #0
Screenshot #1

Contributors

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

Comments RSS

הצגת הערות
  • Oam
    12/04/2016, 00:30
    I fixed the problem ! חיוך
  • Dinis Medeiros
    13/04/2016, 05:45
    Thank YOU! חיוך
  • Anthan Ren
    23/05/2016, 13:56
    Is there any possible to enrollment automatically from external database?
    Thanks.
  • Oam
    23/05/2016, 16:02
    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 חיוך
  • Janice Johnson
    15/02/2017, 07:14
    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
    15/02/2017, 17:31
    My plugin does not match your need. See my answer here : https://moodle.org/mod/forum/discuss.php?d=259371
  • John Anderson
    3/07/2018, 03:20
    Only random groups? Can I set it to just one? A specific group?
  • Oam
    3/07/2018, 22:05
    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
    17/07/2020, 15:54
    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
    21/08/2020, 15:26
    @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
    21/08/2020, 15:32
    @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
    21/08/2020, 16:03
    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
    21/08/2020, 18:16
    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 חיוך If you could arrange that, that would be great. Thank you
  • I want to auto assing to 3 groups, but not sorted,
1 2
Please login to post comments