$user->id]); $result = []; foreach ($folders as $folder) { $folderType = $folder->getTypedFolder(); if ($folderType->isVisible($user->id) && ($folderType->end_time > 0)) { $files = $folderType->getFiles(); $result[] = new \RunningProcess( $folder->range_id, $folderType->getIcon(), _('Zeitgesteuerter Ordner'), \URLHelper::getURL('dispatch.php/course/files/index/'.$folder->id, ['cid' => $folder->range_id]), $folderType->start_time, $folderType->end_time, false, $folder->name, $folderType->isReadable($user->id) && (count($files) > 0) ? sprintf(ngettext('%d Datei', '%d Dateien', count($files)), count($files)) : '' ); } } return $result; } }