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:
697 sites
30 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.


Screenshot #0


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

Comments RSS

Show comments
  • Fri, Oct 30, 2020, 7:22 PM
    Yes I was thinking about that suggestion!. Thank you very much, it's a very usefull plugin!.
  • Tue, Jan 12, 2021, 7:10 PM
    Hello! How to make the plugin understand the Cyrillic alphabet in the imported file in the group name?
  • Tue, Jan 12, 2021, 10:33 PM
    Hallo Guy,
    please i have a question: We would like every teacher/manager to have the opportunity to upload a list of participants as a CSV file on your course.
    Best regards

  • Fri, Jan 22, 2021, 11:27 PM
    Is it possible by using this plugin - prohibited new group creation during the CSV import? User with enrolment right can not create a new group but only can added users to that group where is enroled.

  • Fred
    Fri, Jan 22, 2021, 11:34 PM
    @Артем, I apologize for the delay in responding. Best option is to adjust the regular expression used to validate input so it will accept the range of characters from the Cyrillic alphabet; or, if the source of the input file is trusted absolutely, adjust the regular expression to access any/all characters. The regular expression is still used to parse the fields, though it can be simplified to split the string on commas, tabs, etc.
  • Fred
    Fri, Jan 22, 2021, 11:36 PM
    @Mojmir, yes, you can prevent new groups from being created by leaving the 'Create groups' option set to 'No'
  • Wed, Jan 27, 2021, 4:41 AM
    Hello Fred,

    in plugin is possible to change option 'Create groups' into 'Yes' and it's option which I need prohibit.
    I use group on course for split of organization which use e-learning.
    Is possible to allow teacher only import student into exist group.

    Thank you
  • Fred
    Wed, Jan 27, 2021, 5:16 AM
    @mojmir, it is not possible to configure the plugin settings so the option is prohibited from change. To do what you want will require making a change to the plugin code; the change would be in the 'import_form.php' file, and is not difficult if you are comfortable with Moodle coding. Otherwise, no, the 'Create groups' setting can not be forced to remain set to 'No'.
  • Tue, Apr 13, 2021, 10:31 PM
    hello,this plugin is exactly what I'm looking for but I'm afraid of breaking my moodle smile has anyone tried on Moodle 3.9? thank you
  • Wed, Apr 14, 2021, 10:11 PM
    @Julia, we use this plugin on a few Moodle 3.9 site and it works OK.
  • Tue, May 11, 2021, 3:52 AM
    Thanks Fred for sharing this plugin--very helpful especially during COVID and remote learning--students do much better when they can work in groups!

    Question: any chance you will be able to update your fantastic plugin this summer to 3.9?

    Thanks again for sharing your great work!
  • Fred
    Tue, May 11, 2021, 11:38 PM
    @josephliaw, i will try in the next several days to test this plugin against the current releases.
  • Fred
    Tue, Jun 1, 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, Jun 15, 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?
  • Sun, Aug 29, 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"
1 2 3 4
Please login to post comments