Cohorts are very useful in Moodle 2, but with the upcoming Moodle 2.2 release – cohorts become much more useful. It is not that the enrolment options have changed, so what has?
Up until now, the only way to add users to a cohort was through the user interface manually assigning them, which although it worked was quite time consuming! With the upcoming release this has been improved with the changes to the user upload.
The existing upload users options enables to you do a range of things including:
- create user accounts
- update user accounts
- add users to a course or many courses
- specify which role that the user is added to each course
- specify which group that the user is added to in each course
But with Moodle 2.2 you will be able to add the user to an existing cohort!
Currently if you had year1 with four Moodle courses, and you wanted to mass upload users you would have a csv (spreadsheet) which had four courses specified.
So you would have the fields
And for each of the course1 fields you would specify the shortname of the course involved (mathsyr1, or whatever you use).
However with Moodle2, if you have enroled a cohort called year1 into each of those courses, now all you need to do is add the user to the cohort and they will be automatically added to each course under that cohort.
So now the csv has less fields and is easier to follow
An example being:
username,password,firstname,lastname,email, cohort1 tomjones,Pass1234*,Tom,Jones,firstname.lastname@example.org, year1 marysmith,Pass1234*,Mary,Smith,email@example.com, year1 bobjones,Pass1234*,Bob,Jones,firstname.lastname@example.org, year2 alicesmith,Pass1234*,Alice,Smith,email@example.com, year2
This is going to make using cohorts much easier, and although it is a small change it is really a huge one. The one thing to remember is that you MUST have the cohort already created.
So the process is as follows:
Firstly you would define all the cohorts in the cohort management area. This is found under Settings -> Site administration -> Users -> Accounts -> Cohorts.
Secondly you would enrol the cohort into each of the courses that it would cover. Once within the course, you find it in the course administration section under Settings -> Course administration -> Users -> Enrolment methods
Once you have linked the cohort into all of the courses that you need to, you are ready to upload your users. As above, there is an example format of the csv. You upload it through the Upload users feature which is found under Settings -> Site administration -> Users -> Accounts -> Upload users. You select the file which your want to use and click Upload users.
You are then show a preview of the upload file (and it checks if the format is correct).
Once you have selected the other options on the page and chosen your default values you then click on Upload users. This processes your file fully, and creates the users and adds them to the correct cohort.
So what has happened?
The users are now synched to all the courses that the cohort was attached to. Checking the cohort page again, we see that two users have been added to each of the cohorts which is exactly what we wanted.
So now we can check the course, and here is the view of the enrolled users in one of the courses:
So it shows that the users are now enrolled, as students, and that it is part of the cohort.
So that is it, it will be in Moodle 2.2 once it is released.
Spreadsheets at the ready!
This work by Gavin Henrick is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.