From f4162effebc82759c755854ac50b8d48b3331e8c Mon Sep 17 00:00:00 2001 From: David Monllao Date: Mon, 16 Jul 2012 10:20:20 +0800 Subject: [PATCH] MDL-33531 backup Added format_string to course shortname --- backup/util/helper/backup_cron_helper.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backup/util/helper/backup_cron_helper.class.php b/backup/util/helper/backup_cron_helper.class.php index a584b441211..68e92987f49 100644 --- a/backup/util/helper/backup_cron_helper.class.php +++ b/backup/util/helper/backup_cron_helper.class.php @@ -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 { -- 2.43.0