Skip to content

Commit

Permalink
Fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
nexterday committed Sep 10, 2024
1 parent 8fa8836 commit db8efa6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion report.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ protected function filedownloader_process_files($course, $quiz, $cmid, $attempts
$filename = preg_replace('/[^a-zA-Z0-9.]/', '_', $file->get_filename());
$filename = preg_replace('/_+/', '_', $filename);
if (strlen($filename) > 30) {
$filename = substr($filename, 0, 30) . '.zip';
$fileext = '.' . substr($filename, strrpos($filename, '.') + 1);
$filename = substr($filename, 0, 30) . $fileext;
}
$pathname = clean_param($path[0] . $path[1] . $path[2] . $path[3] . $filename, PARAM_PATH);
$zipcontent[$pathname] = $file;
Expand Down

0 comments on commit db8efa6

Please sign in to comment.