Wednesday 25 July 2012

Adding one user to multiple groups via bulk upload

So I've got a nice women from a council buying 300 courses for nurseries in her area.  She wants to able to keep an eye on them and see how many have completed and how many are being lazy and not doin' their learnins.

I posted before about using groups for enrolment keys and creating a new role with the ability to run reports.  The trouble with using these two methods together is that the person with the special role (I called it Local Authority) needs to be in all the groups that correspond with the enrolment keys she's giving out.  This means  I have to add my council lady to three hundred groups and there isn't just an easy way of doing it in one go.

The way around it is to use the bulk user upload option.  You can upload a CSV file to create new users, enrol them on a course, put them in a group and give them a non default role.  Now my council lady already has a user account so I don't need to create that or give her a password.

I started a spread sheet with these column headings:


username firstname  lastname email course1 role1 group1


I fill in the next line with the existing accounts username, first name, last name and email address.  Then I copy and paste that line into the next 299 rows.  The three hundred enrolment keys are distributed across three courses, one hundred in each.  So in the course1 column, the first hundred rows are the short name of the first course.  I thought at first it would be the course ID but it is the short name you need.  The next hundred rows are the second course and the third hundred rows are the third course.  This will enrol her on the courses as a student.

Under role1 I put the special role short name, in may case it's LA.  Under group1 I copy and pasted the group names from the spreadsheet I used to upload groups to each course.

Then I saved this as a CSV and uploaded it under the Site Administration > Users > Accounts > Upload Users option. When you click upload you'll be taken to a page with a few options.  On this page, depending on your situation, change Upload Type to 'Add new and update existing users' This means it will update the existing account with the new courses, role and groups rather than trying to create the same account a bunch of times.

Hit Upload Users and the job should be done.  If you check enrolled uses on a course the account should have been added to it with the new role and put in all the groups.  So now my council lady can see the activity of everyone that uses one of her enrolment keys.

1 comment:

Comment