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

Automatic enrolment in groups 5.0.0

Moodle 3.9, 3.10, 3.11, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0
Released: 2025年 07月 30日(週三) 01:16

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

Version information

Version build number
2025072900
Version release name
5.0.0
Maturity
穩定版
MD5 Sum
c59d6c920fe82ef9b6d8203fb7ce263b
Supported software
Moodle 3.9, Moodle 3.10, Moodle 3.11, Moodle 4.0, Moodle 4.1, Moodle 4.2, Moodle 4.3, Moodle 4.4, Moodle 4.5, Moodle 5.0
  • Latest release for Moodle 3.9
  • Latest release for Moodle 3.10
  • Latest release for Moodle 3.11
  • Latest release for Moodle 4.0
  • Latest release for Moodle 4.1
  • Latest release for Moodle 4.2
  • Latest release for Moodle 4.3
  • Latest release for Moodle 4.4
  • Latest release for Moodle 4.5
  • Latest release for Moodle 5.0

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS tag
5.0.0

Default installation instructions for plugins of the type Administration tools

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "mytool") in the "admin/tool" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation