Saturday, August 13, 2011

MoodleTip - Mass Assignation of Group Enrolment Keys

Source: http://i1.bibtopia.com/b/090m/41893090-0-m.jpg

I recently shared this upcoming adventure with using Moodle to facilitate 3000+ user completion of a Digital Citizenship course and assessment. While it wasn't difficult to add 3000+ users to Moodle and assign them to specific groups, I didn't see an easy way to bulk upload the enrolment keys for each group. In short, group enrolment keys were coming up blank.

So, the question in my head was, "how do you mass upload enrolment keys for groups?"
The answer involved using PHPMyAdmin and taking a look at the Moodle SQL tables, in particular, mdl_groups. The path ahead might be described in this way:
One possibility is to export the MySQL table for groups, modify it in a dbase program (FMP) or spreadsheet (LibreOffice/Excel) add the enrolment keys, then reimport into MySQL dbase for the Moodle.
First, I exported the mdl_groups as a SQL text file for backup purposes.



 Then, I exported the mdl_groups table as a CSV file I could open in LibreOffice (or MS Excel for those of you still using that). First, I imported it:


 It looked like this in LibreOffice:


I modified the files manually (if I'd had Filemaker Pro handy, I could have done it more automated fashion but...I was doing this on Peppermint ICE Linux). I saved the modified CSV file so that it looked like this:


Notice that 5th column in the spreadsheet has the list of enrolment keys for each group. 

The next step involved EMPTYING the MySQL table entitled "mdl_groups" as shown below:


You'll be asked the following...click OK.




Once the mdl_groups table has been emptied, I was ready to import the modified CSV file.



Once you're done, you're ready to see the results...

And, in the Moodle, it shows up like this:

Is there an easy way to get this done that doesn't involve all these steps? If there is, I'll feel foolish...but it was fun.

Back to watching IronMan 2...



Get Blog Updates via Email!
Enter your email address:
Delivered by FeedBurner
PingIt!

Everything posted on Miguel Guhlin's blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure

1 comment:

Anonymous said...

UPDATE mytable set fieldname=enrollmentkey

Subscribe via email

Enter your email address:

Delivered by FeedBurner

Disclaimer

Disclaimer

Everything posted on Miguel Guhlin's blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure