24 require_once
"./Services/Container/classes/class.ilContainer.php";
47 parent::__construct($a_id,$a_call_by_reference);
52 $this->folder_tree =& $a_tree;
68 include_once(
'Services/Tracking/classes/class.ilLPObjSettings.php');
70 $obj_settings->cloneSettings($new_obj->getId());
84 if (!is_object($this->folder_tree))
86 $this->folder_tree =& $tree;
92 $this->folder_tree->insertNode($this->
getRefId(), $a_parent);
97 $this->folder_tree->insertNode($this->
getId(), $a_parent);
115 if($course_ref_id = $tree->checkForParentType($this->getRefId(),
'crs') and
116 $new_course_ref_id = $tree->checkForParentType($a_target_id,
'crs'))
118 include_once(
'Modules/Course/classes/class.ilCourseItems.php');
121 $course_items->cloneDependencies($a_target_id,$a_copy_id);
124 include_once(
'Services/Tracking/classes/class.ilLPCollections.php');
126 $lp_collection->cloneCollections($a_target_id,$a_copy_id);
140 global $rbacsystem, $tree, $ilAccess;
142 $tmpdir = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename(
$title);
145 $subtree = $tree->getChildsByTypeFilter($refid, array(
"fold",
"file"));
147 foreach ($subtree as $child)
149 if (!$ilAccess->checkAccess(
"read",
"", $child[
"ref_id"]))
157 if ($child[
"type"] ==
"fold")
161 $newFilename = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename($child[
"title"]);
164 if (!copy ($oldFilename, $newFilename))
166 throw new ilFileException(
"Could not copy ".$oldFilename.
" to ".$newFilename);
168 touch($newFilename, filectime($oldFilename));
175 global
$lng, $rbacsystem, $ilAccess;
176 include_once
"Services/Utilities/classes/class.ilUtil.php";
177 include_once
'Modules/File/classes/class.ilObjFile.php';
178 include_once
'Modules/File/classes/class.ilFileException.php';
179 if (!$ilAccess->checkAccess(
"read",
"", $this->getRefId()))
181 $this->ilErr->raiseError(get_class($this).
"::downloadFolder(): missing read permission!",$this->ilErr->WARNING);
185 $this->ilErr->raiseError(get_class($this).
"::downloadFolder(): object is trashed!",$this->ilErr->WARNING);
190 $basename = ilUtil::getAsciiFilename($this->
getTitle());
191 $deliverFilename = $basename.
".zip";
192 $zipbasedir = $tmpdir.DIRECTORY_SEPARATOR.$basename;
193 $tmpzipfile = $tmpdir.DIRECTORY_SEPARATOR.$deliverFilename;
216 if ($course_ref_id = $tree->checkForParentType($this->ref_id,
'crs'))
218 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
239 static $items = null;
241 if(!is_object($items[$this->
getRefId()]))
243 if ($course_ref_id = $tree->checkForParentType($this->getRefId(),
'crs'))
245 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
246 include_once(
"./Modules/Course/classes/class.ilCourseItems.php");
251 if(is_object($items[$this->
getRefId()]))
253 $items[$this->
getRefId()]->addAdditionalSubItemInformation($a_item_data);
271 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');