Muddling in Moodle
Those of us involved with developing and teaching courses hear a lot about the desirability of consistency which sometimes seems to be interpreted as just short of uniformity. Historically that is based on student responses to a survey conducted a few years ago which was interpreted as students wanting to see the same features in the same locations in different courses. An alternative interpretation of the data I saw might be that students wanted more consistency in the availability of staff in courses. At times it has seemed as though having courses appear too similar has confused students about where they are leading to questions being directed to the wrong staff. Nevertheless, there is probably value in looking for consistency at a high level such as exists among different web browsers or word processors in respect of essential features.
Staff responsible for courses want features and consistency as much as students. My major course involves allocating students to small groups within larger cohorts or tutorial classes to facilitate some discussion. Long ago I wrote some scripts that could drive the Moodle interface to populate groups from data in a spreadsheet. More recently I have had somebody in the backroom populate groups from the spreadsheet data, although last year I was appalled to discover that somebody had to enter the data manually because of issues they had found with spreadsheet upload.
The updated Moodle (3.1) this semester allows staff to populate groups using CSV files generated from a spreadsheet. I was pleased to have that facility and last night set about getting my 190 students into the appropriate groups.
First step was to obtain a list of students in a spreadsheet. Since I wanted a list of students with email addresses and information about existing group membership so I could allocate groups within groups and for other purposes the best/only source of raw data was the Participants list. The only way to get that is to scrape it out of the webpage by selecting, copying, and pasting into the spreadsheet. When I’ve done that previously I’ve been able to remove the first columns, including user pictures, without difficulty but this time some ghost images insisted on hanging around. No matter, I was able to sort by existing groups and add my new groups without difficulty.
The documentation on the upload page suggests that either username or idnumber could be used to identify a student. I opted for idnumber since I had that in the list but was not sure about the Moodle meaning of username. Pasting in Excel had removed leading zeroes from the IDs so I had to add those back in case Moodle was literal about its matching. That was easy with concatenation. Then the fun began.
In previous years when I have had somebody upload groups from a spreadsheet I have supplied a CSV file with student IDs and group IDs. The upload process created groups. I assumed that would be the case with the new system. The upload page had UTF-8 preselected as the default file encoding but the help suggested that might not work with exports from Excel. My version of Excel offered UTF-8 as the default for CSV so I generated that and attempted an upload only to be told that the groups did not exist.
The obvious solution to that was to import the groups using the other import option. I built a sheet with the group names and exported to CSV. My upload failed, advising me that groupname, the field name suggested in the page documentation was invalid and that things needed to be separated by commas. I tried again with the same result. The help on that page suggested I could create groupings at the same time so I added the groupings for each group to ensure that each line would have a comma in case that had been the problem. That was no more successful.
A quick trip to the Moodle help linked from the foot of the page revealed that the process did not like UTF-8. I exported again from Excel in the alternate CSV format. That worked. I had groups in groupings. I was then able to go back and import students into the groups.
What’s consistent about that? Two import processes reside in the same area of Moodle. One encourages the use of UTF-8 but the other refuses it. One imports additional data (groupings) but the other doesn’t (groups have to exist). Luckily I have enough facility with this stuff to work around and find solutions but I’m not sure how many of my colleagues would be so lucky.