General plugins (Local): CSV Enrolls & Groups plugin

local_userenrols
Maintained by Fred Fred 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. It also provides a way to make group assignments based on meta-course enrollments.
173 sites
55 downloads
9 fans
Moodle 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

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. An additional feature allows instructors to make group assignments based on meta-course enrollments.

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
    Thu, 11 Sep 2014, 11:34 PM
    Ajmal, have responsed with direct messages.
  • Picture of Brenton Arnold
    Thu, 30 Apr 2015, 9:35 AM
    Hi Fred,
    How does it handle removing students from groups?

    Regards,
    Brenton
  • Fred
    Tue, 21 Jul 2015, 10:24 PM
    Brenton, I apologize for the delay in responding. The plugin does not remove users from any groups of which they may already be members.
  • Picture of Marc McLain
    Tue, 22 Sep 2015, 3:06 AM
    Hi Fred, would this plugin work for ONLY adding users to a group via CSV? We have users already enrolled in a course, but we need a way to group students and remove students from a group quickly and efficiently. Would this plugin be a viable option?
  • Fred
    Tue, 22 Sep 2015, 3:36 AM
    Marc, yes, the plugin will make group assignments for students who happen to already be enrolled in the course.
  • Mark
    Thu, 26 Nov 2015, 7:09 AM
    Hi Fred,
    I thought I saw somewhere that your plugin was scheduled for update/release for Moodle 2.8 and 2.9 in November.
    Has this happened?
    Cheers
    Mark
  • Picture of Marc McLain
    Fri, 25 Mar 2016, 3:28 AM
    Hi Fred, I'm on Moodle 2.7 and am receiving the following error when I push the CSV file: "Unable to parse the line contents"

    The contents are by email. Would you happen to know why this issue is taking place?
  • Fred
    Fri, 25 Mar 2016, 3:45 AM
    Marc, there's likely a character I did not correctly account for in the email address. The regex pattern used for emails is:
    $regex_pattern = '/^"?\s*([a-z0-9][\w.%-]*@[a-z0-9][a-z0-9.-]{0,61}[a-z0-9]\.[a-z]{2,6})\s*"?(?:\s*[;,\t]\s*"?\s*([a-z0-9][\w\' .,&-]*))?\s*"?$/Ui';

    You test that pattern against your input file, or if you need help with that, you can message/email a sample email address entry from your file.
  • Picture of Sergey Churkin
    Mon, 28 Aug 2017, 4:29 PM
    Hi Fred! I have moodle v. 3.1.2 and instaled plugin, but it's not works. Have you a build of plugins for moodle v.3.1.2+ ?
  • Fred
    Mon, 28 Aug 2017, 8:04 PM
    Sergey... will respond to you with message.
  • Picture of Joyeux Eloise
    Wed, 6 Sep 2017, 5:43 PM
    Hi Fred! I also have a version 3.1 of moodle and we used the plugin in version 2.7. A version of the plugin for moodle v3.1 planned soon? ? Thank you in advance for your help !
  • Picture of Joseph Liaw
    Wed, 13 Sep 2017, 8:49 AM
    Hi Fred:
    Thanks for a FANTASTIC plugin that makes getting students enrolled and into groups into your courses! This also works fantastic for quickly creating groups for group assignments, and dovetails perfectly for the amazing Active Quiz plugin to quickly put your entire class into groups, and then allowing students to quickly self check-in who in their group is present for each session....

    Quick question: any chance you will be updating for Moodle 3.1 and 3.2 soon? Thanks for sharing your great work with the Moodle community!
  • Fred
    Fri, 15 Sep 2017, 9:59 PM
    Joyeux, and Josepth,

    Thank you both for your comments. The plugin version available on Moodle's download site should work on 3.1 or 3.2 without problem. There is a more current version on the github repository, however, please be forewarned that the current version removes functionality having to do with group assignments from metalink course enrollments. The functionality for group assignments from .csv file imports is still there.

    Because I do not know how many users would be impacted by removing the course metalink group assignment feature, I have not uploaded the current version to Moodle.
  • Picture of jon pullen
    Tue, 5 Dec 2017, 10:42 PM
    Hi Fred,

    Could you confirm that the ID Number field is limited to only numerical entries? (as the name suggests)
    Some of our users have alphanumeric IDs, causing the "unable to parse" message.

    Thanks in advance.
  • Fred
    Tue, 5 Dec 2017, 11:03 PM
    Jon, correct. The regex on line 218 of userenrols/lib.php controls, and can be edited if need be.
1 2
Please login to post comments