mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-51375 excel output: more work to avoid invalid sheet names
This commit is contained in:
parent
35d3e8b00b
commit
55656b0c7d
@ -160,7 +160,7 @@ class MoodleExcelWorksheet {
|
||||
*/
|
||||
public function __construct($name, PHPExcel $workbook) {
|
||||
// Replace any characters in the name that Excel cannot cope with.
|
||||
$name = strtr($name, '[]*/\?:', ' ');
|
||||
$name = strtr(trim($name, "'"), '[]*/\?:', ' ');
|
||||
// Shorten the title if necessary.
|
||||
$name = core_text::substr($name, 0, 31);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user