Enrolment ::: enrol_autoenrol
Maintained by Mark Ward, RobertoRoberto Pinna
Adds functionality to automatically enrol users onto a course, either as they log in to your Moodle site or as they access a course. This plugin was at first intended for use on courses which you want all users to be able to access but can also be configured for more advanced purposes as reserved access courses. Using the new user filtering you can think at Autoenrol as a Swiss Army knife for Moodle enrolments.
Latest release:
3199 sites
125 fans
Current versions available: 3

When added to a course this enrolment plugin can enrol users onto a course automatically, either as they log in to your Moodle site or as they access to the course.
It was at first 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 profile fields. Depending on how your user accounts are setup this may help you to give access to certain user groups.

Configuration of the plugin is managed by two capabilities which allow administrators to easily control who has access to the plugin.

New advanced user filtering (available from 2.3)
A complete rewrite of Autoenrol filter that use moodle standard availability interface adds great flexibility in user filtering.
The moodle profile availability core plugin unfortunately does not include language and authentication method. 
If you need them, you can install additional availability plugins like Restriction by language and Restriction by authentication.


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5


Mark Ward (Lead maintainer)
Roberto Pinna: Maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Roberto
    Mon, Nov 22, 2021, 4:32 PM
    Hi Daniel,
    that is no more needed.
    From 2.2 release user cache is refreshed after enrolment so courses are shown in dashboard after login.
  • Roberto
    Mon, Nov 22, 2021, 4:38 PM
    Hello Henrique,
    student unsubscriptions are managed from the "Autoenrol expirations check" scheduled task.
    It should be run every 10 minutes.
    Please check its logs for more information.
  • Tue, Nov 23, 2021, 7:53 PM
    Hi Roberto, so my planned task is running but my students are not automatically unsubscribed, do you know what else I can do?
  • Roberto
    Fri, Nov 26, 2021, 11:02 PM
    Hello Henrique,
    I'm sorry.
    There was a bug and I fixed it today.

  • Wed, Dec 8, 2021, 6:28 PM
    Cannot install on Windows platforms
  • Roberto
    Thu, Dec 9, 2021, 3:45 PM
    Hello Spoony,
    can you better explain what's happens? Did you get some errors?

  • Thu, Dec 9, 2021, 4:37 PM
    Hi Roberto, hope you are doing fine. First of all, thank you for this great plugin. I have installed and it works fine for me, except one thing. When I set the end date for a course, it doesn't work. It works when I set "duration" though. Is there a bug or something I am missing? I tried all scenarios but couldn't solve the issue.
  • Roberto
    Thu, Dec 9, 2021, 7:17 PM
    Hello Tumer,
    end date, as for other enrolment plugins, just blocks new enrolments after that date but keep active old enrolments until expiration.
    If you want to block access to course after a date I think you can add a date restriction rule in user filter setting it until your "End date". Date restrinction needs to be enabled in Autoenrol plugin administration settings.
    You need to check administration setting "Auto unenrol action" in order to do the right thing when the rule does not match anymore (unenrol user, keep enrolled, disable enrolment, etc).

  • Thu, Dec 9, 2021, 7:24 PM
    Hi Alberto,
    Thank you for your prompt reply back. In fact, when I set "enrolment duration" it automatically enrolls the student and unenrols when it expires. However, when I use the "end date" enabled, it enrolls but does not unenrol at the expiration time I set; in fact, the expiration time is not set by the plugin, so the student gets an unlimited access. When I try it with manual enrolments or other plugin, the expiration time is listed and saved to database, and the unenrolment works for them since they set the "end date". I hope I could make it clear. I hope you have an easy solution within the plugin itself. I would be grateful if you let me share my screen over skype to show the issue better; I have added your skype today. If you may spare 5 mins, the issue will be better understood.
  • Thu, Dec 9, 2021, 7:33 PM
    To make it more clear, in the administration setting of Autoenrol, there is the option of "Enrolment expiry action"; I had set it to "unenrol the user"; but, it doesn't work since the "end date" is not successfully set by the plugin. I tried manual enrolments and other plugins, and unenrol works fine at expiration. So, I believe there must be a piece of code or adjustment missing, and you will easily find and fix it. I really need to use the plugin with an end date and I will really appreciate if you could find the solution.
  • Fri, Dec 10, 2021, 12:38 PM
    Hi. This plugin has been wonderful to streamline user experience as we launch our new site, to give learners trial access to content straight away. Not that we want to start charging users for access we have hit a snag. Even though an enrolment duration is set, users can still access courses even after enrolment expires. I first tried setting what happens when enrolment expires to deactivate enrolment, then when that didn't work, to unenrol users (created another new user to test from scratch). Am I missing something?

    To test in our sandbox environment, I set duration on the auto enrol plugin to 1 minute for each course. It is set to auto enrol on login. I created a new user, logged in, got access. Waited 1 minute, started reading and saw cron runs every 10 minutes, checked again after 10 minutes. The user still has access to all the courses.

    What set of settings do I need so users gain access when they first log in, but after a set number of days (or time to test), they should not be auto enrolled again.

    Your help would be greatly appreciated.

  • Roberto
    Fri, Dec 10, 2021, 4:36 PM
    Hi Jessica,
    did you use the last release 2.3.5 (2021112600)? I'm sorry but enrolment duration did not work on previous releases.
    Did you set duration before enrol the user?
    The enrolment duration is set for any single user during the enrolment procedure. If you set or change the durantion after user enrolments this does not affect already enrolled users.
    If you need to change already enrolled user duration you need to do it by selecting all users in your course and then "Alter enrolment end time" using the dropdown menu "Edit selected user enrolments" for autoenrol.

  • Fri, Dec 10, 2021, 4:58 PM
    Hi Roberto
    Thank you so much for your quick reply.
    Just checked and we don't have 2.3.5, site is prompting upgrade to that version. I'll request the installation. This is a really useful addition - thank you!
    Really great info about the change in duration only affecting new users - that is perfect. We'll manage that one as needed.

    Kind regards
  • Fri, Dec 17, 2021, 8:24 PM
    Can you use this to enrol students and then automatically put them into a group?
  • Roberto
    Mon, Dec 20, 2021, 3:53 PM
    Yes Alex,
    that is the main feature of AutoEnrol.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Please login to post comments