30 int $a_container_id = 0,
33 $this->ass_id = $a_ass_id;
35 $this->log->debug(
"ilFSWebStorageExercise construct with a_container_id = " . $a_container_id .
" and ass_id =" . $a_ass_id);
39 protected function init(): bool
42 if ($this->ass_id > 0) {
43 $this->submissions_path = $this->path .
"/subm_" .
$this->ass_id;
45 $this->log->debug(
"parent init() with ass_id =" . $this->ass_id);
49 $this->log->debug(
"no parent init() without ass_id");
69 $internal_dir = $this->submissions_path .
"/" . $user_id;
72 $internal_dir_without_dot = substr($internal_dir, 1);
74 $absolute_path = ILIAS_ABSOLUTE_PATH . $internal_dir_without_dot;
76 if (is_dir($absolute_path)) {
77 parent::deleteDirectory($absolute_path);
78 $this->log->debug(
"Removed = " . $absolute_path);
89 $files_order = $ass->getInstructionFilesOrder();
99 while ($file = readdir($dp)) {
100 if (!is_dir(
$path .
'/' . $file)) {
103 'size' => filesize(
$path .
'/' . $file),
104 'ctime' => filectime(
$path .
'/' . $file),
105 'fullpath' =>
$path .
'/' . $file,
106 'order' => $files_order[$file][
"order_nr"] ?? 0
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getFiles()
Get assignment files.
static getLogger(string $a_component_id)
Get component logger.
deleteUserSubmissionDirectory(int $user_id)
getAbsolutePath()
Calculates the full path on the filesystem.
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
__construct(int $a_container_id=0, int $a_ass_id=0)
getAssignmentFilePath(string $a_file)