MDL-37834 assign: avoid newlines in status column of csv
Previously we were generating a CSV file with newlines in it, which seems to cause problems importing into some versions of MS Excel. Instead seperate status lines by '-' - this column is only used to provide context to the teacher in the spreadsheet.
This commit is contained in:
@@ -972,7 +972,7 @@ class assign_grading_table extends table_sql implements renderable {
|
||||
}
|
||||
|
||||
if ($this->is_downloading()) {
|
||||
$o = strip_tags(str_replace('</div>', "\n", $o));
|
||||
$o = strip_tags(rtrim(str_replace('</div>', ' - ', $o), '- '));
|
||||
}
|
||||
|
||||
return $o;
|
||||
|
||||
Reference in New Issue
Block a user