24include_once(
'Services/Migration/DBUpdate_5069/classes/class.ilFileSystemStorage5069.php');
 
   37    public function __construct($a_container_id = 0, $a_ass_id = 0)
 
   39        $this->ass_id = $a_ass_id;
 
   40        parent::__construct(self::STORAGE_DATA, 
true, $a_container_id);
 
   49            if ($this->ass_id > 0) {
 
   50                $this->submission_path = $this->path . 
"/subm_" . $this->ass_id;
 
   51                $this->tmp_path = $this->path . 
"/tmp_" . $this->ass_id;
 
   52                $this->feedb_path = $this->path . 
"/feedb_" . $this->ass_id;
 
   53                $this->multi_feedback_upload_path = $this->path . 
"/mfb_up_" . $this->ass_id;
 
   54                $this->peer_review_upload_path = $this->path . 
"/peer_up_" . $this->ass_id;
 
   55                $this->path .= 
"/ass_" . $this->ass_id;
 
   91        return $this->submission_path;
 
   99        return $this->tmp_path;
 
  107        $path = $this->feedb_path . 
"/" . $a_user_id;
 
  108        if (!file_exists(
$path)) {
 
  116        $path = $this->feedb_path . 
"/0";
 
  117        if (!file_exists(
$path)) {
 
  129        $path = $this->multi_feedback_upload_path . 
"/" . $a_user_id;
 
  130        if (!file_exists(
$path)) {
 
  142        $path = $this->peer_review_upload_path . 
"/" . $a_peer_id . 
"/" . $a_giver_id;
 
  144        if ((
int) $a_crit_id) {
 
  145            $path .= (int) $a_crit_id . 
"/";
 
  147        if (!file_exists(
$path)) {
 
  162        if (!file_exists($this->submission_path)) {
 
  165        if (!file_exists($this->tmp_path)) {
 
  168        if (!file_exists($this->feedb_path)) {
 
  180        if (!is_dir($this->path)) {
 
  184        $dp = opendir($this->path);
 
  185        while ($file = readdir($dp)) {
 
  186            if (!is_dir($this->path . 
'/' . $file)) {
 
  189                    'size' => filesize($this->path . 
'/' . $file),
 
  190                    'ctime' => filectime($this->path . 
'/' . $file),
 
  191                    'fullpath' => $this->path . 
'/' . $file);
 
  211    public function uploadFile($a_http_post_file, $user_id, $is_unziped = 
false)
 
  219        if (isset($a_http_post_file) && $a_http_post_file[
'size']) {
 
  229            $savepath .= 
'/' . $user_id;
 
  230            if (!is_dir($savepath)) {
 
  235            if (!is_dir($savepath)) {
 
  240                "%04d%02d%02d%02d%02d%02d",
 
  251                ilUtil::moveUploadedFile(
 
  252                    $a_http_post_file[
"tmp_name"],
 
  253                    $a_http_post_file[
"name"],
 
  254                    $savepath . 
"/" . $prefix . 
"_" . 
$filename 
  258                    $a_http_post_file[
'tmp_name'],
 
  259                    $savepath . 
"/" . $prefix . 
"_" . 
$filename 
  263            require_once 
"./Services/MediaObjects/classes/class.ilObjMediaObject.php";
 
  265            if (is_file($savepath . 
"/" . $prefix . 
"_" . 
$filename)) {
 
  268                    "fullname" => $savepath . 
"/" . $prefix . 
"_" . 
$filename,
 
  286            while ($file = readdir($dp)) {
 
  287                if (!is_dir($this->path . 
'/' . $file) && substr($file, 0, 1) != 
".") {
 
  319        return $dir . 
"/" . $a_file;
 
  328        if (is_array($a_files[
"name"])) {
 
  329            foreach ($a_files[
"name"] as $k => 
$name) {
 
  331                    $type = $a_files[
"type"][$k];
 
  332                    $tmp_name = $a_files[
"tmp_name"][$k];
 
  333                    $size = $a_files[
"size"][$k];
 
  334                    ilUtil::moveUploadedFile(
 
  337                        $this->path . DIRECTORY_SEPARATOR . basename(
$name),
 
while(count($oldTaskList) > 0) foreach(array_keys( $newTaskList) as $task) init()
An exception for terminatinating execution or to throw for unit testing.
init()
Append ass_<ass_id> to path (assignment id)
getFeedbackPath($a_user_id)
Get feedback path.
getFeedbackFilePath($a_user_id, $a_file)
Get path for feedback file.
create()
Create directory.
uploadAssignmentFiles($a_files)
Upload assignment files (e.g.
uploadFile($a_http_post_file, $user_id, $is_unziped=false)
store delivered file in filesystem
countFeedbackFiles($a_user_id)
Count number of feedback files for a user.
getAssignmentFilePath($a_file)
Get path for assignment file.
getMultiFeedbackUploadPath($a_user_id)
Get multi feedback upload path (each uploader handled in a separate path)
getPeerReviewUploadPath($a_peer_id, $a_giver_id, $a_crit_id)
Get pear review upload path (each peer handled in a separate path)
getPathPrefix()
Implementation of abstract method.
getFeedbackFiles($a_user_id)
Get number of feedback files.
__construct($a_container_id=0, $a_ass_id=0)
Constructor.
getAbsoluteSubmissionPath()
Get submission path.
getPathPostfix()
Implementation of abstract method.
getTempPath()
Get submission path.
getFiles()
Get assignment files.
getAbsolutePath()
Get absolute path of storage directory.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...