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);
191 $basename = ilUtil::getAsciiFilename($this->
getTitle());
192 $deliverFilename = $basename.
".zip";
193 $zipbasedir = $tmpdir.DIRECTORY_SEPARATOR.$basename;
194 $tmpzipfile = $tmpdir.DIRECTORY_SEPARATOR.$deliverFilename;
218 if ($course_ref_id = $tree->checkForParentType($this->ref_id,
'crs'))
220 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
241 static $items = null;
243 if(!is_object($items[$this->
getRefId()]))
245 if ($course_ref_id = $tree->checkForParentType($this->getRefId(),
'crs'))
247 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
248 include_once(
"./Modules/Course/classes/class.ilCourseItems.php");
253 if(is_object($items[$this->
getRefId()]))
255 $items[$this->
getRefId()]->addAdditionalSubItemInformation($a_item_data);
273 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');