General plugins (Local): Mass enrolments

local_mass_enroll
Maintained by Picture of Rogier van Dongen Rogier van Dongen
A tool to all teachers to enrol existing users to their courses using CSV files (without bothering the admins)
239 sites
178 downloads
14 fans

One awkward thing about Moodle 1.x and the recent Moodle 2.x is that teachers are allowed to manually enroll known Moodle accounts to a course as teachers, non editing teachers, students... , but not using a 'flat file' produced by some CSV export.

They have to send a file to an admin user who will inject it into Moodle using the standard 'flatfile enrollment' method with the following limitations :

  • Teachers must provide account's and course idnumbers and admin user must reformat the file by adding the required extra columns 'add' and 'target role', before copying the file to the appropriate location in moodledata directory.
  • The report information is sent to admin, not to the course's teacher; so admin has to forward it to the teacher after the cron job has completed.
  • There is no way in flatfile enrollment method to specify in which groups these accounts should be added, so teacher has to go manually again across the list to assign accounts to groups.

This little extension, that adds itself to course administration menu will hopefully help teachers to do it themselves.

After installing it  a new item 'Bulk enrolments' will appear in the course administration menu for teachers (see screenshots).

It requires a CSV file, prepared by the teacher, with an unique Moodle id in the first column (idnumber, username or email) and optionally a group name in the second column. The first line of the CSV file must be present but its content is currently ignored.

Options are provided to force group (and grouping) autocreation if they do not yet exist in the target course.

Every line of the file may contain a different group name or even no group for some accounts

Screenshots

Screenshot #0

Contributors

Picture of Rogier van Dongen
Rogier van Dongen (Lead maintainer)
Picture of Patrick Pollet
Patrick Pollet: Original author
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Joshua Holden
    Sun, 9 Feb 2014, 5:12 AM
    Hi, Patrick and everyone watching this!
    We've been very happy using the plug-in on Moodle 2.4, but now we're migrating to 2.6 and our sysadmins are balking at installing the plug-in since it isn't officially rated for 2.6. Has anyone tried it? Any problems?
  • Picture of Joshua Holden
    Sun, 9 Feb 2014, 5:13 AM
    P.S Thanks in advance!
  • Picture of Kai Yang Lim
    Thu, 13 Mar 2014, 11:00 AM
    Exactly what I need! Thank you. Using Moodle2.5.4.
  • Picture of Patrick Pollet
    Thu, 13 Mar 2014, 7:02 PM
    Still works under latest moodle 2.6. I must bave to figure out how to add 2.6 icon to download tab here.
    Cheers
  • Picture of Tom YC
    Mon, 9 Jun 2014, 8:52 PM
    Hi.

    I installed this on Moodle 2.7 today and I cannot get the links to appear under the Users menu. I have added the line to the config.php file. The plugin works if you manually put the URL in the address bar.
    Any ideas? Perhaps something has changed in 2.7. It works fine on 2.6
    Thanks in advance - a really good plugin by the way.

  • Picture of Ludovico Sassarini
    Tue, 9 Sep 2014, 6:08 PM
    Hi, just a quick info: does it work for moodle 2.7.1?
    Thanks
  • Picture of Rogier van Dongen
    Thu, 4 Feb 2016, 6:49 PM
    A new version is now available.
    It's Moodle 2.7 and onwards. I personally recommend uninstalling an older version of the plugin before installing the new one, although it shouldnt be necessary.
    Cheers!
  • Picture of David Manning
    Fri, 5 Feb 2016, 7:37 AM
    Hmm seems like something's broken in the plugin - I'm able to see the plugin in my course, choose the CSV file, but when I click "enrol them to my course", I get a 404 not found error. It appears when I click the "enrol" button, the plugin's dropping the root folder. E.g. the plugin page is at http://myserver.com/moodle/local/mass_enroll/mass_enroll.php?id=40 , and when clicking "enrol" tries to load http://myserver.com/local/mass_enroll/mass_enroll.php , which is invalid.
  • Picture of Rogier van Dongen
    Fri, 5 Feb 2016, 4:32 PM
    Sorry for the inconvenience, seems I had forgotten to process half the changes.
    All links should be fixed now. Cheers.
  • Picture of David Manning
    Sat, 6 Feb 2016, 1:54 AM
    Right on, Rogier! Thank you! This is now working great!
  • Picture of Abiramaraj JR
    Mon, 8 Feb 2016, 10:18 PM
    Hi Guys ,
    Any one can pls share the CSV format to upload bulk enroll
  • Picture of Eric Smoyer
    Mon, 29 Feb 2016, 2:01 AM
    I have the most recent plugin installed on Moodle 3.0, but am getting the 'Not Found' error. Am I missing something? I tried to download it directly from GitHub as well, but still can't seem to get it to work. Thanks for any advice!
  • Picture of Troy Fennell
    Fri, 4 Mar 2016, 11:12 PM
    Here is how you can upload a CSV which will register a new student, and enroll them in the course of your choosing.

    Using Site Administration > Users > Accounts > Upload Users

    Create a CSV with these columns:
    username firstname lastname email city country course1 enrolperiod1 type1 role1 group1

    For the course1, use the course "shortname" you want the new student to be in.
    For enrolperiod1, set it to number of days 90, 180, 365, etc.
    For type1, locate & place the roleid(numeric value only) you wish your student to have by default.
    For role1, use the SAME role's shortname.
    For group1, use the FULL name of the group you want them to belong.

    Save your CSV and then follow the path aforementioned. The configurations should not have to be manipulated for this to upload multiple new users and enroll them for a specific period of time in a course, and having a role and group appointment applied.

    Works like a charm unless you try to use anything but two characters when you set the country. The only issue I ever had with this workflow was trying to run it initially with the word India for the country, rather than IN.
  • Picture of SCS LMS
    Mon, 7 Mar 2016, 2:47 AM
    Is it possible to mass UN-enroll students with this plugin? If you make a mistake and enroll 80 students that aren't supposed to be there, it takes forevvvvvver to remove them one-by-one. Yikes!
  • Picture of D Riddel
    Tue, 19 Jul 2016, 4:22 AM
    Hi! First of all, thank you for the plugin. It's very useful. I have a question: does it only enrol users that already exist in the Moodle database? Or can it create new Moodle accounts along with enrolling them to that course. I'm asking because I can achieve the former but not the latter
1 2
Please login to post comments