AutoEnrol

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:
4711 sites
1k downloads
174 fans
Current versions available: 1

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.

Autoenrol filter use moodle standard availability interface that adds great flexibility in user filtering.
You can filter access to your courses using core availability plugins like date, user profile and sets of them or use additional availability plugins like: badge, other course completion, payments, etc...
The only limit is that the availability plugin rule should evaluate elements available outside courses.

The Moodle availability plugin for user profile fields unfortunately does not include language and authentication. 
If you need them, you can install additional availability plugins like Restriction by language and Restriction by authentication.

Screenshots

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

Contributors

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

Comments RSS

Show comments
  • Александр Гнедов
    Thu, 13 July 2023, 4:11 PM
    Hello!
    Thanks for such a cool plugin.
    Tell me, please, how can I add the "position" field in the application, because when choosing fields, it is not there and is most likely not available on the platform either.
    It turns out that you first need to add this field through the administration panel so that timing data is recorded there? And then it is already expected in the course auto-assignment add-on?
  • Roberto
    Fri, 14 July 2023, 6:01 PM
    Hello,
    I'm sorry but I didn't find any reference to a "position" field in Moodle.
    The user database table does not include it, and if you don't have a user profile custom field called position I don't think you can manage it without an additional availability plugin.

    I suggest to you to search for an availability plugin that check the "position" field in order to use it with autoenrol.

    HTH,
    Roberto
  • Александр Гнедов
    Mon, 7 Aug 2023, 6:40 PM
    Roberto, thanks.

    Can you tell me more about the accessibility plugin.

    I have LDAP connected on Moodle, and all employees have a position field. I created a custom field "position", but I don't know how to automatically pull it into this field, maybe you know how to do it?
  • Roberto
    Mon, 7 Aug 2023, 7:10 PM
    Hello,
    if you have created a custom field for "position", you just need to map it from your LDAP connection.
    You can look at https://docs.moodle.org/402/en/LDAP_authentication#Custom_User_profile_fields for details.
    If users position change time by time I suggest to update local on login so each time the user login Moodle gets data from LDAP.

    After that you can add a user filter with the custom filed to Autoenrol with without any other availability plugin.

    HTH,
    Roberto
  • Александр Гнедов
    Tue, 24 Oct 2023, 4:57 PM
    Hello. Is it possible to create an assignment condition using the "date" format? So that, for example, a course is assigned to a student only after a certain date. For example, a student entered on October 23 and from October 24 he will be assigned one course or another. I saw there is a "starts" condition, but it doesn't fit, right?
  • Roberto
    Wed, 25 Oct 2023, 9:04 PM
    Hello, did you mean a way to add a delay to student enrolment?
    I try to enrol today but I will enrolled from tomorrow.
    You can't do that with autoenrol, you need an other enrolment plugin to do that.
    I don't know if someone has already developed something like that but it could be done so if not you can develop it by yourself.

    HTH,
    Roberto
  • Александр Гнедов
    Fri, 27 Oct 2023, 6:52 PM
    Roberto, I meant, is it possible to set the restrictions for automatic enrollment on a certain user field so that a student who came a year ago is not automatically enrolled in the course, but a student who came yesterday is automatically enrolled. For this purpose, I created my own field - “Date of admission to school”. As I understand it, you can’t do this using conditions, right?
  • Roberto
    Mon, 30 Oct 2023, 3:22 PM
    Hello,
    you can use custom field with auto enrol but profile field availability plugin does not support date custom fields.
    I submitted an issue in Moodle Tracker (MDL-72083) a couple of years ago but it still opened.
    You can vote for it in order to promote the development.

    Cheers,
    Roberto
  • Yogesh Kumar
    Sun, 12 Nov 2023, 3:24 PM
    The following option throws a DB error for users complaining about the duplicates in DB after the first login.
    User Filtering --> Group By (User Filter) --> Group Name (some value)

    It should not try to make an entry to the group every time the user logs in.

    Error Message:
    [Sun Nov 12 03:32:37.028814 2023] [php:notice] [pid 3214911] [client 76.66.101.94:53101] Default exception handler: Error writing to database Debug: Duplicate entry '3-618' for key 'm_groumemb_usegro_uix'\nINSERT INTO m_groups_members (groupid,userid,timeadded,component,itemid) VALUES(?,?,?,?,?)\n[array (\n 0 => '618',\n 1 => '3',\n 2 => 1699759957,\n 3 => '',\n 4 => 0,\n)]\nError code: dmlwriteexception\n* line 497 of /lib/dml/moodle_database.php: dml_write_exception th
  • Kingsley Kcay
    Tue, 23 Jan 2024, 6:13 PM
    Hello!
    Thanks for this great plugin.

    Could there be another option to "enrol by link" (a randomly generated link) which can be automatically emailed or shared with users?

    - Loading to course
    - Login to site
    - Enrol by link

    For example:
    (moodle site.com/enroll=XCDFS)
    .... OR...
    (moodle site .com/course/view.php?id=7&enrol=XCDFS)
  • Roberto
    Wed, 24 Jan 2024, 3:32 PM
    Hello,
    adding this feature is not easy as adding an option to a dropdown menu.
    I think is better to use other enrolment plugins like enrol_invitation or enrol_easy that do something like you need.

    HTH,
    Roberto
  • Elena Virtanen
    Tue, 13 Feb 2024, 12:03 AM
    Hello! Thank you so much for your cool and helpful plugin!

    I have a question concerning the option Enrol When - Loading the Course. Could you please clarify, how does it work? I configured it, but I just don't see my course, if I'm not enrolled. What should student/admin do to see the course and enroll then? What means loading here?

    Also I would like to ask, how to configure Auto enrol in the following case.
    The filter set by user profile field - email. Only those, whose email contains @company.com, can be enrolled. But how to extend this filter only to new users? Not for all, who already have such email.

    Thank you in advance!
  • Roberto
    Mon, 19 Feb 2024, 6:54 PM
    Hello Elena,
    sorry for the bad traslation.
    "Loading" means the student load the course page.
    I changed the traslation to "Entering the course".

    HTH,
    Roberto
  • John Anderson
    Fri, 1 Mar 2024, 6:00 AM
    Hi - best enrollment method ever ! I was thinking about the grouping feature. I have courses where learners enroll when they open the course page. I was thinking / wondering if a parameter could be passed into that for grouping? Something like

    https://my.moodle.edu/bhrplms/course/view.php?id=1068&group=groupa

    This would / could let certain links be built, that would place learners into designated groups, just through URL
    Just my though - thank you for your work on this.
  • Roberto
    Fri, 1 Mar 2024, 4:30 PM
    Hello John,
    with AutoEnrol you can manage user groups using user filter or user profile fields.

    I understand the reason for your idea but I see possible problems related to malicious use of the feature you suggest adding.

    I think could be better to use a different plugin to manage it.

    HTH,
    Roberto
Please login to post comments