MDL-33531 backup Added format_string to course shortname

This commit is contained in:
David Monllao
2012-08-10 08:40:18 +08:00
parent 4af5c4ebf5
commit 3de32f8558
@@ -512,7 +512,8 @@ abstract class backup_cron_automated_helper {
// MDL-33531: use different filenames depending on backup_shortname option
if ( !empty($config->backup_shortname) ) {
$courseref = $course->shortname;
$context = get_context_instance(CONTEXT_COURSE, $course->id);
$courseref = format_string($course->shortname, true, array('context' => $context));
$courseref = str_replace(' ', '_', $courseref);
$courseref = textlib::strtolower(trim(clean_filename($courseref), '_'));
} else {