moodle-tool_uploadcoursecategory icon indicating copy to clipboard operation
moodle-tool_uploadcoursecategory copied to clipboard

doesn't handle commas within category names

Open plukethep opened this issue 11 years ago • 1 comments

For example:

name,idnumber,description CTK College/Business,(AQ) Business,- "CTK College/Science, Maths and H&SC","(AQ) Science, Maths and H&SC",-

The second course breaks it, it seems to have no difficulty with the ampersands. I'll dig into the code and see if I can find a fix.

The error seems to come from a core moodle file: moodle\lib\csvlib.class.php (1 hit) Line 81: function load_csv_content(&$content, $encoding, $delimiter_name, $column_validation=null) {

You can get around it by using &#44 for the comma. Not sure if the core needs updating on this one.

Also trying to add the ascii code for a slash into a category name seems to not come through:

CTK College/Humanities&#44 Art and English/Fine Art (AS&#44A2)

Comes out as

CTK College/Humanities, Art and English/Fine Art (AS&#44A2)

plukethep avatar Jun 14 '13 11:06 plukethep