Merge branch 'MDL-52983' of git://github.com/aolley/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2016-02-08 13:05:30 +01:00
commit ba8491ae3f

View file

@ -163,6 +163,8 @@ class MoodleExcelWorksheet {
$name = strtr(trim($name, "'"), '[]*/\?:', ' ');
// Shorten the title if necessary.
$name = core_text::substr($name, 0, 31);
// After the substr, we might now have a single quote on the end.
$name = trim($name, "'");
if ($name === '') {
// Name is required!