diff --git a/report/log/classes/renderable.php b/report/log/classes/renderable.php index 6fe3fead81a17..2dd164652e664 100644 --- a/report/log/classes/renderable.php +++ b/report/log/classes/renderable.php @@ -487,6 +487,12 @@ public function setup_table() { */ public function download() { $filename = 'logs_' . userdate(time(), get_string('backupnameformat', 'langconfig'), 99, false); + if ($this->course->id !== SITEID) { + $courseshortname = format_string($this->course->shortname, true, + array('context' => context_course::instance($this->course->id))); + $filename = clean_filename('logs_' . $courseshortname . '_' . userdate(time(), + get_string('backupnameformat', 'langconfig'), 99, false)); + } $this->tablelog->is_downloading($this->logformat, $filename); $this->tablelog->out($this->perpage, false); }