4require_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),
 
An exception for terminatinating execution or to throw for unit testing.
getFiles()
Get assignment files.
__construct($a_container_id=0, $a_ass_id=0)
Constructor.
init()
Append ass_<ass_id> to path (assignment id)
getPathPrefix()
Implementation of abstract method.
uploadAssignmentFiles($a_files)
Upload assignment files (e.g.
getAssignmentFilePath($a_file)
Get path for assignment file.
getPathPostfix()
Implementation of abstract method.
create()
Create directory.
getAbsolutePath()
Get absolute path of storage directory.
static getLogger($a_component_id)
Get component logger.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file