24 require_once
"./Services/Container/classes/class.ilContainer.php";
47 parent::__construct($a_id,$a_call_by_reference);
48 $this->lng->loadLanguageModule(
'fold');
53 $this->folder_tree =& $a_tree;
69 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
71 $obj_settings->cloneSettings($new_obj->getId());
85 if (!is_object($this->folder_tree))
87 $this->folder_tree =& $tree;
93 $this->folder_tree->insertNode($this->
getRefId(), $a_parent);
98 $this->folder_tree->insertNode($this->
getId(), $a_parent);
114 include_once(
'Services/Object/classes/class.ilObjectActivation.php');
117 include_once(
'Services/Tracking/classes/class.ilLPCollections.php');
119 $lp_collection->cloneCollections($a_target_id,$a_copy_id);
133 global $rbacsystem, $tree, $ilAccess;
135 $tmpdir = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename(
$title);
138 $subtree = $tree->getChildsByTypeFilter($refid, array(
"fold",
"file"));
140 foreach ($subtree as $child)
142 if (!$ilAccess->checkAccess(
"read",
"", $child[
"ref_id"]))
150 if ($child[
"type"] ==
"fold")
154 $newFilename = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename($child[
"title"]);
157 if (!copy ($oldFilename, $newFilename))
159 throw new ilFileException(
"Could not copy ".$oldFilename.
" to ".$newFilename);
161 touch($newFilename, filectime($oldFilename));
168 global
$lng, $rbacsystem, $ilAccess;
169 include_once
"./Services/Utilities/classes/class.ilUtil.php";
170 include_once
'Modules/File/classes/class.ilObjFile.php';
171 include_once
'Modules/File/classes/class.ilFileException.php';
172 if (!$ilAccess->checkAccess(
"read",
"", $this->getRefId()))
174 $this->ilErr->raiseError(get_class($this).
"::downloadFolder(): missing read permission!",$this->ilErr->WARNING);
178 $this->ilErr->raiseError(get_class($this).
"::downloadFolder(): object is trashed!",$this->ilErr->WARNING);
184 $basename = ilUtil::getAsciiFilename($this->
getTitle());
185 $deliverFilename = $basename.
".zip";
186 $zipbasedir = $tmpdir.DIRECTORY_SEPARATOR.$basename;
187 $tmpzipfile = $tmpdir.DIRECTORY_SEPARATOR.$deliverFilename;
211 $container_ref_id = $tree->checkForParentType($this->ref_id,
'grp');
212 if(!$container_ref_id)
214 $container_ref_id = $tree->checkForParentType($this->ref_id,
'crs');
216 if($container_ref_id)
218 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
237 include_once
'./Services/Object/classes/class.ilObjectActivation.php';
255 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');