Skip to content

Commit

Permalink
MDL-37834 assign: avoid newlines in status column of csv
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danpoltawski committed Nov 20, 2015
1 parent 2b11b94 commit b58d059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/assign/gradingtable.php
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ public function col_status(stdClass $row) {
}

if ($this->is_downloading()) {
$o = strip_tags(str_replace('</div>', "\n", $o));
$o = strip_tags(rtrim(str_replace('</div>', ' - ', $o), '- '));
}

return $o;
Expand Down

0 comments on commit b58d059

Please sign in to comment.