Group Membership Limit
Enforce maximum group size across your Moodle™ site. Set per-group member limits that block self-enrolment, manual additions, and bulk actions when the group is full.
One-time unlock, lifetime updates
⭐ Why this plugin is unlike anything else available
Hard enrollment caps per Moodle group
▸ Moodle's native group system has no enrollment limit. Group Membership Limit adds a configurable cap per group — when a member is added beyond the cap, the plugin automatically removes the over-limit member so the group never exceeds its maximum.
▸ The self-enrolment path reports the group as full so learners are not silently added past the cap. No admin monitoring required.
▸ Essential for face-to-face workshops, supervised assessment sessions, and cohort-gated content where room capacity or supervisor ratios are a real constraint — not a configuration option.
Group Membership Limit is a lightweight local plugin that adds per-group member caps to Moodle™. Set the maximum number of students allowed in any group, and the plugin automatically enforces that limit across all enrolment methods - self-enrolment with group keys, manual additions, and bulk operations.
The Problem
- Moodle™ has no built-in group size limits
- Groups can grow beyond classroom capacity
- Manual monitoring is time-consuming
- Over-enrolled groups affect learning quality
The Solution
- Set maximum members per group
- Automatic enforcement across all methods
- Clear error messages for students
- No core file modifications required
Automatic Enforcement
Limits enforced across self-enrol, manual adds, and bulk operations
Clear Messaging
Students see a friendly message when a group is full
Zero Core Changes
Pure plugin approach - no Moodle™ core files modified
The plugin uses three mechanisms to enforce group limits:
Listens for the group_member_added event. When a member is added that exceeds the limit, they are immediately removed.
Intercepts self-enrolment with group keys before the user is added, showing a clear "group is full" message.
Adds a "Maximum members" field directly into Moodle™'s group edit form. The value is saved automatically when you create or update a group.
- 1
Download the plugin
Get the ZIP file from the download button above
- 2
Install via Moodle™
Site administration → Plugins → Install plugins → Upload ZIP
- 3
Complete the upgrade
Follow the on-screen prompts. Moodle™ will create the
local_groupcaptable automatically. - 4
Set group limits
Go to any course → Participants → Groups → Edit a group → set the Maximum members field
- 5
Purge caches
Site administration → Development → Purge all caches
- See archived release notes for supported Moodle environments
- See archived release notes for PHP requirements
- No additional dependencies required
- 1,000 LMS Labs credits to unlock
To update the plugin, simply upload the new ZIP file over the existing installation:
- 1.Download the latest version
- 2.Upload via Site administration → Plugins → Install plugins
- 3.Moodle™ will detect the new version and run the upgrade automatically
Your existing group limits are preserved during upgrades.
Self-Enrolment Blocking
When a student tries to self-enrol using a group enrolment key and the group is full, they see a clear error message and are not added to the group.
Manual Add Protection
If a teacher or admin manually adds a member beyond the limit, the addition is automatically reversed by the event observer.
Event Observer Logic
The plugin listens for Moodle™ core events, meaning it works regardless of how the user is being added to the group (CSV import, manual add, or API).
Group Count Awareness
The plugin performs a direct database count of current members before validating a new addition, preventing race conditions during high-volume enrolment.
