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);
116 if($course_ref_id = $tree->checkForParentType($this->getRefId(),
'crs') and
117 $new_course_ref_id = $tree->checkForParentType($a_target_id,
'crs'))
119 include_once(
'Modules/Course/classes/class.ilCourseItems.php');
125 include_once(
'Services/Tracking/classes/class.ilLPCollections.php');
127 $lp_collection->cloneCollections($a_target_id,$a_copy_id);
141 global $rbacsystem, $tree, $ilAccess;
143 $tmpdir = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename(
$title);
146 $subtree = $tree->getChildsByTypeFilter($refid, array(
"fold",
"file"));
148 foreach ($subtree as $child)
150 if (!$ilAccess->checkAccess(
"read",
"", $child[
"ref_id"]))
158 if ($child[
"type"] ==
"fold")
162 $newFilename = $tmpdir.DIRECTORY_SEPARATOR.ilUtil::getASCIIFilename($child[
"title"]);
165 if (!copy ($oldFilename, $newFilename))
167 throw new ilFileException(
"Could not copy ".$oldFilename.
" to ".$newFilename);
169 touch($newFilename, filectime($oldFilename));
176 global
$lng, $rbacsystem, $ilAccess;
177 include_once
"./Services/Utilities/classes/class.ilUtil.php";
178 include_once
'Modules/File/classes/class.ilObjFile.php';
179 include_once
'Modules/File/classes/class.ilFileException.php';
180 if (!$ilAccess->checkAccess(
"read",
"", $this->getRefId()))
182 $this->ilErr->raiseError(get_class($this).
"::downloadFolder(): missing read permission!",$this->ilErr->WARNING);
186 $this->ilErr->raiseError(get_class($this).
"::downloadFolder(): object is trashed!",$this->ilErr->WARNING);
192 $basename = ilUtil::getAsciiFilename($this->
getTitle());
193 $deliverFilename = $basename.
".zip";
194 $zipbasedir = $tmpdir.DIRECTORY_SEPARATOR.$basename;
195 $tmpzipfile = $tmpdir.DIRECTORY_SEPARATOR.$deliverFilename;
219 if ($course_ref_id = $tree->checkForParentType($this->ref_id,
'crs'))
221 include_once(
"./Modules/Course/classes/class.ilObjCourseAccess.php");
242 static $items = null;
244 if(!is_object($items[$this->
getRefId()]))
246 if ($course_ref_id = $tree->checkForParentType($this->getRefId(),
'crs'))
248 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
249 include_once(
"./Modules/Course/classes/class.ilCourseItems.php");
254 if(is_object($items[$this->
getRefId()]))
274 include_once(
'./Services/Container/classes/class.ilContainerSortingSettings.php');