Merge branch MDL-29189-master of git://github.com/samhemelryk/moodle
[moodle.git] / grade / export / xml / grade_export_xml.php
index 38cb353..b349b89 100644 (file)
@@ -38,7 +38,8 @@ class grade_export_xml extends grade_export {
         $strgrades = get_string('grades');
 
         /// Calculate file name
-        $downloadfilename = clean_filename("{$this->course->shortname} $strgrades.xml");
+        $shortname = format_string($this->course->shortname, true, array('context' => get_context_instance(CONTEXT_COURSE, $this->course->id)));
+        $downloadfilename = clean_filename("$shortname $strgrades.xml");
 
         make_temp_directory('gradeexport');
         $tempfilename = $CFG->tempdir .'/gradeexport/'. md5(sesskey().microtime().$downloadfilename);