MDL-36652 report_log : Including the course short name in file name
This commit is contained in:
@@ -487,6 +487,12 @@ class report_log_renderable implements renderable {
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user