Auto-Enrollment
Automatically enrol users into courses when they join a usergroup — works with Membership Pro, Frontend UserManager or plain Joomla.
How it works
EasyLearn controls course access through Joomla usergroups. Auto-Enrollment builds on this: you pair a usergroup with one or more courses, and whenever a user is added to that group they are automatically enrolled into the selected courses — and, optionally, notified by email.
Because the trigger is simply group membership, it works with any system that assigns Joomla usergroups:
- Membership / subscription extensions such as Membership Pro (assign the group on payment, remove it on expiry)
- Frontend UserManager when an administrator adds a user to a group
- The Joomla backend (Users → Manage)
No code or custom integration required. You only configure the pairing once; the enrollment happens on its own.
Creating an enrollment rule
- In the Joomla backend, open EasyLearn → Auto-Enrollment and click New.
- Choose the Usergroup that should trigger enrollment. Each group can have one rule.
- Select one or more Courses. Only courses that members of the chosen group can actually access are listed (the course's access groups must include this group). This prevents enrolling users into courses they cannot open.
- Set Send enrollment email to Yes if users in this group should receive an email when enrolled. This is configured per group, so some groups can notify users while others enrol silently.
- Save. From now on, any user added to that group is enrolled into the selected courses.
Auto-Enrollment only applies to future group memberships. Users already in the group are not retroactively enrolled (run the sync command with --no-email if you ever need to back-fill).
The enrollment email
When a group has email enabled, the user receives a single message listing all courses they were just enrolled into. The subject and body can be customised under EasyLearn → Options → Auto-Enrollment. Leave the fields empty to use the built-in default.
Available placeholders:
| Placeholder | Replaced with |
|---|---|
{name} |
The user's name |
{courses} |
A bulleted list of the courses |
{course} |
The first course title |
{link} |
A link to the course |
{sitename} |
Your site name |
Example: Membership Pro
- Create a Joomla usergroup, e.g. Course Members.
- In EasyLearn, set that group as the course's access group (course → Media & Access).
- In EasyLearn → Auto-Enrollment, pair Course Members with the course.
- In your Membership Pro plan, assign the Course Members group when a subscription becomes active (and remove it on expiry).
When a customer pays, Membership Pro adds them to the group, EasyLearn enrols them and (if enabled) emails them. When the subscription expires and the group is removed, access is revoked automatically.
Sync command (safety net)
Enrollment normally happens instantly, the moment a user is added to a group. A few systems assign groups by writing directly to the database, which can bypass the instant trigger. For those cases, EasyLearn ships a sync command you can schedule:
php /path-to-joomla/cli/joomla.php easylearn:sync-enrollments
Run it periodically (for example every 15 minutes) via cron. It is idempotent — it only creates missing enrollments and only emails users for genuinely new enrollments. To enrol without sending emails, add --no-email:
php /path-to-joomla/cli/joomla.php easylearn:sync-enrollments --no-email
The exact command for your server, including a ready-to-paste crontab line, is shown under EasyLearn → Options → Auto-Enrollment.
The sync command is optional. If your membership/registration system assigns groups the normal way (which Membership Pro, Frontend UserManager and the Joomla backend all do), enrollment already happens instantly without it.