27 $rbacsystem = $DIC[
'rbacsystem'];
34 $upload_dir =
$lm_set->get(
"cont_upload_dir");
42 return $scorm_import_directory->getAbsolutePath();
50 if ($upload_dir = self::_getUploadDirectory() ===
'' || $upload_dir = self::_getUploadDirectory() ===
'0') {
55 $handle = opendir($upload_dir);
57 while (
false !== ($file = readdir($handle))) {
58 $full_path = $upload_dir .
"/" . $file;
59 if (is_file($full_path) && is_readable($full_path)) {
71 $files = self::_getUploadFiles();
73 return in_array($a_file, $files);
76 public static function _copyUploadFile(
string $a_file,
string $a_target,
bool $a_raise_errors =
true): bool
79 $main_tpl = $DIC->ui()->mainTemplate();
81 $ilias = $DIC[
'ilias'];
83 $file = self::_getUploadDirectory() .
"/" . $a_file;
86 if (!is_file($file)) {
87 if ($a_raise_errors) {
88 $ilias->raiseError(
$lng->txt(
"upload_error_file_not_found"), $ilias->error_obj->MESSAGE);
90 $main_tpl->setOnScreenMessage(
'failure',
$lng->txt(
"upload_error_file_not_found"),
true);
98 if ($a_raise_errors) {
100 $lng->txt(
"file_is_infected") .
"<br />" .
102 $ilias->error_obj->MESSAGE
105 $main_tpl->setOnScreenMessage(
'failure',
$lng->txt(
"file_is_infected") .
"<br />" .
111 $main_tpl->setOnScreenMessage(
'info', $vir[1],
true);
113 return copy($file, $a_target);
static _copyUploadFile(string $a_file, string $a_target, bool $a_raise_errors=true)
static virusHandling(string $a_file, string $a_orig_name='', bool $a_clean=true)
static _getUploadDirectory()
sort()
description: > Example for rendering a Sort Glyph.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _checkUploadFile(string $a_file)