Enrolment: Enrol by user profile fields

enrol_attributes
Maintained by Picture of Nicolas DunandNicolas Dunand
This plugin allows users to be enrolled according to any value stored in their user profile.
770 sites
439 downloads
71 fans
Current versions available: 5

This plugin allows users to be enrolled according to any value stored in their user profile. If you use an external authentication scheme (LDAP, Shibboleth), you can store values in hidden user fields of the users' Moodle profile, and then use these values to automatically enrol users if some courses.

Screenshots

Screenshot #0

Contributors

Picture of Nicolas Dunand
Nicolas Dunand (Lead maintainer)
Picture of RISET Université de Lausanne
RISET Université de Lausanne: Supporting institution
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Georg Wiesinger
    Mon, Nov 19, 2018, 9:16 PM
    Hi, this plugin was working like a charm until a couple of days ago the automatic enrolment by user fields stopped at all! All settings remained untouched, the enrolment logic is working well when testing it with "force enrolment now", cronjob does work properly, no other plugins as well as Moodle updates installed until today when I was updating to the latest release 3.5.3+ (from older build 3.5.3+).

    May I ask if you could provide me with some tips or hints as I actually have no idea what the problem is?!

    Kind regards,
    George
  • Picture of Nicolas Dunand
    Mon, Nov 19, 2018, 9:24 PM
    Hi, which version of the plugin are you using? We've recently added a "Enrol users immediately at login" setting (no change, as it's "On" by default), to improve login speed.

    Things to check:
    1. Does "force enrolments" work as expected?
    2. If using the latest version, if "Enrol users immediately at login" is not checked, then enrolments are only processed when clicking "Force" or by cron, but not at each login anymore.
    3. Try to manually start this plugin's scheduled tasks (in Moodle admin > Server > Scheduled tasks).
  • Picture of Georg Wiesinger
    Fri, Nov 23, 2018, 3:50 PM
    Hi, thank you for your kind answer!

    I'm using the latest build of your plugin (2018092300) with the latest build of Moodle 3.5.3+! "Enrol users immediately at login" is checked. "Force enrolments" is working well, but executing the scheduled task "processenrolments_task" failed because of database write error! So I guess this is causing the issue, right? Is there anything I can do to get this process working again? The other task "invalidatecache_task" is working smoothly.

    Kind regards,
    George
  • Picture of Georg Wiesinger
    Fri, Nov 23, 2018, 4:28 PM
    Hi again, I finally found the issue in the database table "mdl_task_scheduled/processenrolments_task". "faildelay" was set to "86400" and I changed it to "0". Now everything works fine! smile

    No idea why this happened at all.

    Kind regards,
    George
  • Picture of Nicolas Dunand
    Mon, Nov 26, 2018, 3:39 PM
    Hi Georg,

    Thanks for reporting back. Without more information about the exact database error it will be difficult to debug any further. However, as forcing the scheduled task to run again solved the issue it is likely that what caused this was a temporary database condition.

    Glad to hear all is fine, cheers!
  • Picture of Rolf Petersen
    Fri, Feb 15, 2019, 9:04 PM
    Hi Nicolas, I know this great plugin from earlier versions, but are there any Plans and dates for an update to use this plugin with Moodle 3.6 soon, really need it?
  • Picture of Rolf Petersen
    Wed, Feb 27, 2019, 7:26 PM
    Hi Nicolas, the latest Version of this plugin for up to Moodle 3.6 does not work. It is activated (eye open) but it does not appear on possible enrol-methodes for any course within the respective dropdown-menue (enrolemethodes)! What may I do wrong here?
  • Picture of Nicolas Dunand
    Wed, Feb 27, 2019, 9:09 PM
    Hi Rolf,
    If the plugin is not configurer correctly at the site level, it won't show in the enrolment methods in a cours.
  • Picture of Rolf Petersen
    Mon, Mar 18, 2019, 5:25 PM
    Hello Nicolas again. Is it possible to set enrolmentperiod by any means with this plugin?
    Rolf
  • Picture of Nicolas Dunand
    Mon, Mar 18, 2019, 6:53 PM
    Hi Rolf,

    It is not possible at the moment. However, how would this work ? If the user profile field values stay the same, after the end of the enrolment period the user would be enrolled again ?
  • Picture of Rolf Petersen
    Mon, Mar 18, 2019, 8:31 PM
    Thank you Nicolas
    My idea is, then enrollment with one certain user profile field shout have a time, when it expires.
    those users enroled by a certain field would be enroled for a certain time only. So the enrolment "lasts" for a short time only. When newly enrolled with a special key, Enrolement is valid for 30/45 days only. My thoughts wrong anywhere?
  • Picture of Dnyaneshwar Somwanshi
    Mon, Mar 25, 2019, 10:03 PM
    agree with Rolf. by the way . nice feature.
  • Picture of Thomas Leggett
    Wed, Apr 3, 2019, 3:33 PM
    Hi Nicolas, and thank you for what seems to be a great plugin.

    Is there a plan to expand on the validation of the user? Because it's is just a little bit simplistic with just an equals.

    For example, my users have the option to register their company name on their profile, and I would like to grant them access to certain courses if they have.
    So in the user profile fields rules I would like to have 'orgno' not null and 'orgno' > 0. Today all I can do is check for 'orgno' = XXXX.
    But in my case all users have different values in that field.
  • Picture of German Acevedo
    Sat, May 25, 2019, 5:46 AM
    Hi Nicolas,
    I have installed this module in Moodle 3.6 and enabled it, but can't find any place where I can configure the enrollment instances. Even inside my courses I can't add this enrollment method. What should I check to have it working?
  • Picture of Nicolas Dunand
    Mon, Jun 3, 2019, 4:58 PM
    Hi German,
    There are some mandatory settings in the Moodle administration, under Plugins > Enrolments > Enrol by user profile fields. In particular, even if you leave all other fields to their default values, you have to set the "Profile fields to be used in the selector" field for the plugin to work.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Please login to post comments