Skip to content
Snippets Groups Projects
Commit 858000e3 authored by Elke Kreim's avatar Elke Kreim
Browse files

Replace comma with minus in filename

parent 94d89417
No related branches found
No related tags found
No related merge requests found
......@@ -41,12 +41,16 @@ class download {
}
$timestamp = download::get_file_timestamp();
$filename = $course_code;
if ($course_code != null) {
$filename = FILENAME_PREFIX . $course_code . '_' . $timestamp;
} else {
$filename = FILENAME_PREFIX . $course->shortname . '_' . $timestamp;
// use course shortname if no course_code is given
if ($course_code == null) {
$filename = str_replace(',', '-', $course->shortname);
}
// extend filename with prefix and date
$filename = FILENAME_PREFIX . $filename . '_' . $timestamp;
return $filename;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment