Permalink
Browse files

MDL-33531 backup Added format_string to course shortname

  • Loading branch information...
1 parent b5ce7c4 commit cfcb4304c5b91382da0e8d75ad1753615992fab0 @dmonllao dmonllao committed Jul 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 backup/util/helper/backup_cron_helper.class.php
@@ -511,7 +511,8 @@ public static function remove_excess_backups($course) {
// 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 = moodle_strtolower(trim(clean_filename($courseref), '_'));
} else {

0 comments on commit cfcb430

Please sign in to comment.