CSV Enrolls & Groups plugin

General plugins (Local) ::: local_userenrols
Maintained by FredFred Woolard
Use this local plugin to import user enrollments and group assignments from a delimited text file into the course. New user accounts will not be created, so each of the users listed in the input file must already have an account set up in the site.
Latest release:
840 sites
136 downloads
38 fans
Current versions available: 4

The CSV Enrolls & Groups plugin allows you to import user enrollments for a course from an uploaded delimited text file. It is contributed by Fred Woolard.

Enrollments are made with the manual enrol plugin and using a selectable role. The plugin can optionally create course groups and assign the new enrollees to those groups.

Each of the users listed in the input file must have an existing Moodle user account; new Moodle user accounts will not be created.

This plugin was originally (Moodle 1.9) a refactor of the mass_enroll course admin mod done by Patrick Pollet and Valery Fremaux, using the standard groups course import plugin as a template. The current Moodle 2.x revision is again a refactor, but as a local plugin (placed into the local/ directory off the Moodle root), and accessed from the course administration menu under the 'Users' node.

Besides being able to create groups, you can select from existing groups and override the data file's group designation.

Screenshots

Screenshot #0

Contributors

Fred
Fred Woolard (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Fred
    Tue, 11 May 2021, 11:38 PM
    @josephliaw, i will try in the next several days to test this plugin against the current releases.
  • Fred
    Tue, 1 June 2021, 4:28 AM
    I have published a new release, which has only one functional change, which is removal of a distinct regex pattern for an idnumber assumed to be made up of digits--so what remains is a pattern for emails, and a looser pattern for alphanums plus pcre word chars ([a-z0-9][\w@.-]). I have tested against 3.11, 3.10, and 3.9 and did not observe any issues.
  • Fred
    Tue, 15 June 2021, 2:11 AM
    Curious to know if any users think a feature to un-enroll users is needed. I was looking at an old pull request, which seemed straight-forward enough to consider implementing--just adding an 'Unenrol' option in the form's Role (dropdown) select control. But then made me think it was too easy to accidentally do something destructive, and a separate menu item, and form was warranted to make it very clear the action being taken. Or is un-enrolling users really not needed?
  • Ramiro Gallardo
    Sun, 29 Aug 2021, 5:18 AM
    Thanks Fred for sharing this plugin. Please, tell me what hapened with this error message "Unable to parse the line contents"
  • Acumen Arc
    Fri, 6 May 2022, 9:49 PM
    its not working on Moodle 3.9.
    Form to import CSV is not visible
  • Fred
    Tue, 24 May 2022, 5:02 AM
    @acumen, if you would please, detail the navigation steps you take to get to the plugin's form. There are two ways. 1) From the course admin dropdown (gear), select 'More' and then click the 'Users' tab, you should see the 'Import Enrolls' menu item. 2) From the drawer menu, select 'Participants', then from its gear dropdown menu you should see the 'Import Enrolls' item towards the bottom. If you are navigating correctly, but when selecting the 'Import Enrolls' item, the form does not appear, it is possible the installation did not complete successfully.
  • Przemek Kaszubski
    Tue, 23 Aug 2022, 3:03 AM
    Hello, I was wondering if a Moodle 4 version of the plugin will be released some time soon? Thanks, and kind regards.
  • Henrik sune Pedersen
    Fri, 23 Sept 2022, 9:31 PM
    Hi Fred

    We are having a problem with ÆØÅæøåëöüáó if these chars are in the CSV file it doesnt put the users in the group.
    We have tried to save the file as CSV UTF-8 without BOM and Wth Bom even in ANCI and nothing works.
    Do you have an work around?
  • Premruetai Seeplak
    Tue, 6 June 2023, 4:57 PM
    I use version 0.0.10_34 and it's not working on Moodle 4.2
    When I select import enrolls. Then it shows HTML error 500 my site is currently unable to handle this request
  • Andrew Obermeier
    Wed, 28 June 2023, 1:01 PM
    Hello, Me too. I'm trying to use it with Moodle 4.2, but the same HTML error 500 occurs as Premrutai Seeplak reported.
  • Kevin TREUSSIER
    Fri, 30 June 2023, 4:56 PM
    Hello.
    We have also the same problem with Moodle 4.2, but I think it's probably the change of php 8 version the origin.
    With debug mod, I have this message : " Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /var/www/html/moodle42/moodle/local/userenrols/import_form.php on line 158 "
    I had the good syntaxe with parenthesis on this file and now the plugin works well !
  • Fred
    Mon, 3 July 2023, 1:05 AM
    Apologies to everyone whose usage was disrupted by the lack of PHP8 compatibility. The issue of the ternary ? operator has been corrected, and the module appears to work correctly with PHP8.
  • Andrew Obermeier
    Mon, 10 July 2023, 7:54 AM
    Thank you very much! I've just tested it in 4.2, and it seems to work well.
  • Fred
    Mon, 10 July 2023, 8:18 AM
    I have reluctantly updated the current version's compatibility list to include Moodle 4.x, based on the feedback from @AndrewObermeier that the plugin seems to work well with 4.2. However, as always, test for your particular site before putting in production.
  • C'est moi :-)
    Tue, 12 Sept 2023, 5:13 PM
    Would it be possible to add a page for the admin to define plugin options, like default values?

    This would allow administrators to define default values for choices. For exemple, using idnumber (better than username). This would ease usage by teachers, avoiding errors (and needing to change values in selectors).
1 2 3 4 5
Please login to post comments