Importing grade feedback via CSV including commas

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Andrew Chinery
Importing grade feedback via CSV including commas
Hi there, We are using Moodle (I think 2.2) to mark students' submissions for a programming unit in our computer science department. For speed, and to facilitate one of our graders who is blind and uses a Braille screen-reader (thus making using the web interface very difficult) we export the students as a csv file, add the marks in using our own script, and then re-upload. However this causes an issue if we use commas in our feedback (which is hard to avoid). If you add some feedback using the web interface, then export it, nothing is done to escape the commas. So when you import the file, all the feedback is truncated. Despite this, I was hoping that maybe Moodle does support escaping commas in csv imports? I had a quick look at the php but not being familiar found it a bit of a maze. Furthermore, it would be great to be able to insert new-lines as well via csv import. Standard new line and carriage return escape codes are just treated like text. And exporting a multi-line feedback comment from the Moodle web interface just shows up with the new-lines stripped in the csv file. Any help would be appreciated. Thanks Andy
Picture of Sharon Strauss
Re: Importing grade feedback via CSV including commas


I am seeing the same issue in Moodle 1.9.16. I was able to create a tab delimited file as a work-around; that resolved the particular situation that we had. However, I am not sure if that would always work.

I see you posted this a while ago. Did you find a solution?