Enrolment ::: enrol_autoenrol
Maintained by Picture of Mark WardMark Ward, RobertoRoberto Pinna
Adds functionality to automatically enrol users onto a course, either as they log into your Moodle site or as they acess a course. This plugin is primarily intended for use on courses which you want all users to be able to access but can also be configured for more advanced purposes.

AutoEnrol 2.0

Moodle 2.9, 3.0, 3.1, 3.2, 3.3, 3.4
Released: Monday, February 5, 2018, 11:07 PM

AutoEnrol Enrolment Method

When added to a course this enrolment plugin can enrol users onto a course automatically, either as they log into your Moodle site or as they click on the course. It is intended for use on site-wide courses such as "Moodle Help" or "Learner Voice".

In addition the plugin has advanced functionality to support automatically grouping and filtering users based upon their attributes. Depending on how your user accounts are set up this may help you to give access to certain user groups.

The plugin adds new permissions to help you manage the use of the plugin. The first permission called "config" allows the user to add a new instance of the plugin and change only the most basic options. The second permission is called "method" and gives users the ability to change when the user will be enrolled on a course, and what type of enrolment it will be (ie something other than student). There are further permissions relating to the plugin which should be reviewed through Moodle's "Define Roles" page.


  • v2.0
    • Added custom profile fields support
    • Added method delete feature
    • Added auto unenrol when profile field changes and it do not match the filter
    • Added group remove/change when profile field change
    • Fixed code style to pass Moodle code checker tests
    • Added welcome message support
  • v1.3.1
    • Tweaks to the Readme to improve readability and installation instructions.
    • Added new capability to control whether user can enable or disable instances.
  • v1.3
    • Release for Moodle 2.6, 2.7 and 2.8.
    • Groups now identified by group idnumber instead of name (so feel free to rename groups!).
    • New setting option to control the group cleanup behaviour.
  • v1.2
    • New functionality and tweaks:
    • It is now possible to add multiple instances to a single course.
    • Added an option to give instance a custom label.
    • Filtering functions now allow for partial matches.
    • Expanded filtering functions to include email address.
    • Added an option to limit number of enrolments.
    • By default, users are now only enrolled if they aren't already enrolled on a course.
    • Individual users can now be manually unenrolled through Users > Enrolled Users.
    • Added a permission for users to unenrol themselves if not enrolling during login.
  • v1.1
    • Minor update. Improved instance configuration form compatibility with Moodle 2.5.
  • v1.0
    • Stable release. New config option to "Add instance to new courses".
  • v0.91
    • Bug Fix - Filtering was being bypassed when enrolling on site-login.
  • v0.9
    • Beta release.


  1. Copy the plugin directory "autoenrol" into moodle\enrol.
  2. Check admin notifications to install.
  3. Visit the "Site Administration > Plugins > Enrolments" page.
  4. Click the eye symbol next to "Auto Enrol" to enable the plugin.


The module was authored by Mark Ward and is being maintained by Roberto Pinna.

The original module developed by Mark Ward can be found on his GitHub.

Thanks to

With thanks to various friends for contributing, especially Matthew Cannings.

Thanks also to users who have taken the time to share feedback and improve the module.

Technical Support

Issue tracker can be found on GitHub. Please try to give as much detail about your problem as possible and I'll do what I can to help.


Released Under the GNU General Public Licence

Version information

Version build number
Version release name
Can be updated from
1.2 (2013070100), 1.3 (2014113000)
Can be updated to
2.0+ (2018022600), 2.1 (2018101902), 2.1.1 (2019111800)
Stable version
MD5 Sum
Supported software
Moodle 2.9, Moodle 3.0, Moodle 3.1, Moodle 3.2, Moodle 3.3, Moodle 3.4

Version control information

Version control system (VCS)
VCS repository URL

Default installation instructions for plugins of the type Enrolment

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "myenrol") in the "enrol" subdirectory.
  4. Visit to finish the installation