Enrol by user profile fields

Enrolment ::: enrol_attributes
Maintained by Nicolas Dunand
This plugin allows users to be enrolled according to any value stored in their user profile.
Latest release:
1747 sites
1k downloads
139 fans
Current versions available: 6

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

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

Comments RSS

Comentarios

  • altan ahmet
    lun, 4 de nov de 2019, 00:00
    Hi Nicolas

    I want to restrict my course to users with a gov.uk email address

    1. In User profile fields, do I define the extra profile field in text input field or text area ?
    2. Can you help with how I should be defining what I want , i.e. users with a gov.uk address ? Is it a case of simply adding free text or do I have to define an algorthim, such as " if email address ends in gov.uk " in the text area ? I am not a code writer so I would need advice on how to do the latter


  • Nicolas Dunand
    mié, 6 de nov de 2019, 18:41
    Hi Altan,

    1. The extra profile field should be a text input.
    2. As of now the plugin only allows to check for exact values, not intervals or "value ending in", so changes should be made in the code to allow for this.
  • altan ahmet
    mié, 6 de nov de 2019, 23:14
    Thanks Nicolas
  • Leslie Chukwunweike
    sáb, 9 de nov de 2019, 04:24
    Hi, Nicolas

    I'm using the latest build of your plugin (2018092300) with the latest build of Moodle 3.7 "Enrol users immediately at login" is checked. "Force enrolments" is not working well but "Purge enrolments" is working well, but executing the scheduled task "processenrolments_task" failed because of database write error! This process has never run since i installed the plug The other task "invalidatecache_task" is working smoothly.

    I have tried changing the faildelay value of the process through database table, but it keeps adjusting to 60seconds after each failed run. cron runs well. Any tips you can give me?
    Kind regards,
    Leslie
  • Nicolas Dunand
    lun, 25 de nov de 2019, 16:33
    Hi Leslie,

    Sorry about the late reply. What I can suspect is that there is a timeout on the scheduled task. This can happen because the "Force" and "Purge" act on one enrollment (course), but the scheduled task acts on all defined rules in all courses.

    Do you run the cron by Web (page call) or CLI (command-line) ? I would recommend to try and run the cron by command line and see whether there still is a timeout and if so whether any more specific error is displayed.

    Cheers,
    Nicolas
  • Dillon Esterhuizen
    vie, 24 de ene de 2020, 21:08
    Hey Nicolas

    I installed your plugin on a Moodle 3.4 site. When I go to Enrolled Users, I can see the info, cog and bin icons for users that I've enrolled using other enrollment methods, but not by users that have been enrolled using this plugin. If I select the user and then below the list go to "With selected user..." and select "Delete selected user enrolments", it just reloads the page and gives me a message "No users selected".

    Do you perhaps know how I can delete one specific user enrollment when the user was enrolled using your plugin?

    Kind regards,
    Dillon
  • Noortje Engels
    jue, 4 de jun de 2020, 17:29
    Hi Nicolas,
    I've installed the correct build for my moodle environment (2018092300). But when I add them as an enrollment method the plugin doesn't show itself very good. I cannot see the three buttons (add, brackets, delete), i only see some crooked text which is not readable.
    My moodle version is: Moodle 3.2+ (Build: 20161222) and I've installed enrol_attributes_moodle35_2018092300. I've tried to install the 2000 version but it gives the same result.
    I really haven't got a clue where to look for the solution. I hope you can help sonrisa.

    Thanks in advance.
    Kind regards,
    Noortje
  • Nicolas Dunand
    jue, 4 de jun de 2020, 17:32
    Hi Noortje,
    This plugin is know to have some display issues with some third-party themes. Could you mention which theme is active in your Moodle installation ?
    Moreover, I have to point out that even if this plugin functionally supports Moodle 3.2, this Moodle version is long out
    of date.
  • Nicolas Dunand
    jue, 4 de jun de 2020, 17:33
    DIllon,

    Sorry, your comment espaced my attention. This plugin doest not allow individual user deletion (unenrollment), as presumably the user would be enrolled again after a while if his profile fields match the enrollment rule.
  • Israel Pelayo
    sáb, 15 de ago de 2020, 01:23
    Excellent plugin, it has helped me a lot. Thank you so much for everything. Would it be possible to integrate the functions of start date and end date to carry out the enrollment? It would be great if dates could be controlled. Thank you very much.
  • Nicolas Dunand
    sáb, 15 de ago de 2020, 03:45
    Thanks Israel for your feedback. Indeed this could be a good improvement. I'm not making any promises, but please suggest this as a new issue on GitHub (see "Source control URL" link above), so we can discuss this in detail.
  • Israel Pelayo
    dom, 16 de ago de 2020, 11:47
    Thank you very much Nicolas Dunant. I will put the suggest on GitHub right now. Have a nice day
  • Jeff Yonker
    mié, 2 de sept de 2020, 22:00
    Are you still supporting this?
    If so, I am running moodle 3.5 and have tried installing all 3 versions that say they are verified for my version. All 3 install and configure correctly, however when I try to add the method to a course I'm getting an error:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at webmaster@disasterrelieftraining.com to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    Server log only shows this: [01-Sep-2020 19:04:03 America/Chicago] PHP Notice: Undefined index: State in /home/onlinedi/public_html/lib/navigationlib.php on line 1898

    Thanks
  • Nicolas Dunand
    mié, 2 de sept de 2020, 22:59
    Hello Jeff,

    Yes this is still functional and fully supported in supported Moodle versions. To track down the problem, I would advise to make your Moodle display debug messages that could provide you a lead on the cause of the error. The "php notice" log entry is not related to that "Internal Server error" that you see.

    Cheers
  • Jeff Yonker
    jue, 3 de sept de 2020, 00:45
    Thanks Nicolas.
    I have all the debugging already turned on. Im not sure where I should look for the debugging messages.
    When I try to add that enrollment method it immediately goes to a generic white screen with that error - no debug info.
Please login to post comments