4 require_once(
'./Services/FileSystem/classes/class.ilFileSystemStorage.php');
22 public function __construct($a_container_id = 0, $a_ass_id = 0)
24 $this->ass_id = $a_ass_id;
26 $this->log->debug(
"ilFSWebStorageExercise construct with a_container_id = " . $a_container_id .
" and ass_id =" . $a_ass_id);
27 parent::__construct(self::STORAGE_WEB,
true, $a_container_id);
36 if ($this->ass_id > 0) {
37 $this->log->debug(
"parent init() with ass_id =" . $this->ass_id);
41 $this->log->debug(
"no parent init() without ass_id");
78 $this->log->debug(
"parent create");
90 require_once
"./Modules/Exercise/classes/class.ilExAssignment.php";
93 $files_order = $ass->getInstructionFilesOrder();
96 if (!is_dir($this->path)) {
100 $dp = opendir($this->path);
101 while ($file = readdir($dp)) {
102 if (!is_dir($this->path .
'/' . $file)) {
105 'size' => filesize($this->path .
'/' . $file),
106 'ctime' => filectime($this->path .
'/' . $file),
107 'fullpath' => $this->path .
'/' . $file,
108 'order' => $files_order[$file][
"order_nr"] ? $files_order[$file][
"order_nr"] : 0
132 if (is_array($a_files[
"name"])) {
133 foreach ($a_files[
"name"] as $k =>
$name) {
135 $type = $a_files[
"type"][$k];
136 $tmp_name = $a_files[
"tmp_name"][$k];
137 $size = $a_files[
"size"][$k];
138 ilUtil::moveUploadedFile(
141 $this->path . DIRECTORY_SEPARATOR . basename(
$name),
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
getFiles()
Get assignment files.
getAssignmentFilePath($a_file)
Get path for assignment file.
init()
Append ass_<ass_id> to path (assignment id)
__construct($a_container_id=0, $a_ass_id=0)
Constructor.
getPathPostfix()
Implementation of abstract method.
create()
Create directory.
getAbsolutePath()
Get absolute path of storage directory.
uploadAssignmentFiles($a_files)
Upload assignment files (e.g.
static getLogger($a_component_id)
Get component logger.
while(count($oldTaskList) > 0) foreach(array_keys($newTaskList) as $task) init()
getPathPrefix()
Implementation of abstract method.