5 include_once
"Modules/Exercise/classes/class.ilExcCriteria.php";
22 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
35 include_once(
"./Modules/Exercise/classes/class.ilFSStorageExercise.php");
37 $storage->
deleteDirectory($storage->getPeerReviewUploadPath($this->peer_id, $this->giver_id, $this->getId()));
48 $existing[] = basename($file);
54 $files->setValue(implode(
"<br />", $existing));
55 $files->setALlowDeletion(
true);
56 $this->form->addItem(
$files);
63 if($this->form->getItemByPostVar(
"prccc_file_".$this->getId())->getDeletionFlag())
66 $this->form->getItemByPostVar(
"prccc_file_".$this->
getId())->setValue(null);
69 $incoming = $_FILES[
"prccc_file_".$this->getId()];
70 if($incoming[
"tmp_name"])
72 $org_name = basename($incoming[
"name"]);
83 return (
bool)
sizeof($this->
getFiles());
97 $this->form->getItemByPostVar(
"prccc_file_".$this->
getId())->setAlert($lng->txt(
"msg_input_is_required"));
107 $hash = trim(
$_GET[
"fuf"]);
112 if(md5($file) == $hash)
124 $crit_id = $this->
getId()
127 $ilCtrl->setParameterByClass(
"ilExPeerReviewGUI",
"fu", $this->giver_id.
"__".$this->peer_id.
"__".$crit_id);
132 $ilCtrl->setParameterByClass(
"ilExPeerReviewGUI",
"fuf", md5($file));
133 $dl = $ilCtrl->getLinkTargetByClass(
"ilExPeerReviewGUI",
"downloadPeerReview");
134 $ilCtrl->setParameterByClass(
"ilExPeerReviewGUI",
"fuf",
"");
136 $files[] =
'<a href="'.$dl.
'">'.basename($file).
'</a>';
139 $ilCtrl->setParameterByClass(
"ilExPeerReviewGUI",
"fu",
"");
141 return implode(
"<br />",
$files);
deleteDirectory($a_abs_name)
Delete directory.
addToPeerReviewForm($a_value=null)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
getPeerReviewUploadPath($a_peer_id, $a_giver_id, $a_crit_id)
Get pear review upload path (each peer handled in a separate path)
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
importFromPeerReviewForm()