openwebwork/webwork2-dev — pull request #75 by ionparticle (2013-01-05 01:17:48+00:00)
Title: Enable comma escaping, unicode chars in classlists

Classlists files as processed by the addcourse script can't deal with users who, for some reason, has a comma in either their first or last name. Using the Text::CSV module for CSV parsing instead of split() enables comma escaping values by putting them in double quotes.

Users who have non-ASCII characters in their name gets their name (e.g.: Frøystein) mangled after going through addcourse. This commit forces Perl to open the the classlist file with UTF8 encoding. This way the unicode characters survive intact into the database.

Note that this commit does add a new dependency on Text::CSV

Sample classlists file to test this:
# studentid, lastname, firstname, status, comment, section, recitation, email, loginid, password, permission
1,"red,01","shirt,01",C,,,,,redshirt01,,0
2,"redø2","shirtø2",C,,,,,redshirt02,,0
admin,admin,admin,P,,,,,admin,,10