Moodle plugins directory: Mass enrolments
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
(the downloadable version works with Moodle 3.5.x)
To answer: 1: I presume you mean the user field names that mass_enroll will use to identify a Moodle user. For now; the only allowed values (as can be indicated in the form when enrolling your users): the fields are idnumber, username and email. The main limiting reason is that these would normally be the only "unique" fields (end even the email field is Moodle settings dependent). However, if you'd wish for more indicative fields, you can always file a request in the issue tracker (see the github link).
2: I've never really looked into this (I've taken over this plugin since the original author has passed away), but if you'd select "create groupings" as well in the form where you upload your CSV, the groupings should be automtically inserted (although a grouping with the same name as the group will be inserted; I can imagine this behaviour to be a little too assumptious and would be a good candidate for some more options). Please do note: for this to work you must have your CSV as well as the form settings configured in such a way that groups are made as well.
If this behaviour doesn't perform the way you'd expect (or when you maybe wish for more options), again I'd like to ask you to file an issue in the github issuetracker. When you do so, please keep watch of the issue and try to be as explanatory in your request as possible. Clarity makes life easier for everyone ;)
@everyone else: please report any bugs and/or requests for additional features in the github tracker as this helps me to keep track of everything. I maintain this plugin in my spare time so it really helps me to keep issues/requests where they belong ;)
I am not the plug-in maintainer. That would be Rogier van Dongen! However, I'll reply to your questions with what I know.
You can use this plug-in to enroll users in a course and to put them into groups and groupings all at the same time. If users are already enrolled in a course you can still use this plug-in to put them into groups and groupings. No need to create groups and groupings before mass-enrolling the students, the plug-in will do it for you. I use just a simple .csv file to enroll the students and to create groups and groupings and the entire process is flawless. The best way to see how the plug-in works is to create a mock-up course and do a few trials.
I hope I have answered your questions.
Dear Massimiliano, I know this is very late, but I didn't see your reply. Thank you, this is extremely helpful and answered my questions fully. Does anyone know, is this plugin still being actively maintained (I appreciate you are not the developer)? We are currently on version 3.9 but will be moving to 3.11 soon and wondering if it will be supported or need to look for alternative? Many thanks
I'll see if I can make some time soon to check the plugin and make sure it should be compatible up to Moodle 4.x
I really don't expect any breaking functionality unless core Moodle system calls that have been around for a long time have changed.
Having said that, it's about time for an update and making sure we're up to standards.
If it would be ok to you, you could also delete the old fork https://github.com/rogiervandongen/moodle_local_mass_enroll or change it's description to reflect that it shouldn't probably be used...or you could change the README.md to reflect that.