20 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
30 function ilObjFolderGUI($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
false)
33 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output,
false);
46 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
52 $this->tabs_gui->setTabActive(
'view_content');
65 $ilTabs->activateTab(
"view_content");
74 $next_class = $this->ctrl->getNextClass($this);
75 $cmd = $this->ctrl->getCmd();
82 case 'ilpermissiongui':
84 $this->tabs_gui->setTabActive(
'perm_settings');
85 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
87 $ret =& $this->ctrl->forwardCommand($perm_gui);
90 case 'ilcoursecontentgui':
92 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
94 $this->ctrl->forwardCommand($course_content_obj);
97 case "illearningprogressgui":
99 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
102 $this->object->getRefId(),
103 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
104 $this->ctrl->forwardCommand($new_gui);
105 $this->tabs_gui->setTabActive(
'learning_progress');
109 case "ilcontainerpagegui":
114 $this->tpl->setContent(
$ret);
118 case 'ilinfoscreengui':
123 case 'ilobjectcopygui':
126 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
128 $cp->setType(
'fold');
129 $this->ctrl->forwardCommand($cp);
132 case "ilobjstylesheetgui":
139 $this->tabs_gui->setTabActive(
'export');
140 include_once
'./Services/Export/classes/class.ilExportGUI.php';
142 $exp->addFormat(
'xml');
143 $this->ctrl->forwardCommand($exp);
146 case "ilcommonactiondispatchergui":
147 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
149 $this->ctrl->forwardCommand($gui);
152 case 'ildidactictemplategui':
153 $this->ctrl->setReturn($this,
'edit');
154 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
156 $this->ctrl->forwardCommand($did);
159 $this->tabs_gui->setTabActive(
'none');
190 $this->folder_tree =& $a_tree;
201 if(parent::importFileObject())
204 $this->ctrl->returnToParent($this);
230 #include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
231 #$sort = new ilContainerSortingSettings($this->object->getId());
232 #$a_values["sor"] = $sort->getSortMode();
248 $this->ctrl->setCmd(
"showSummary");
249 $this->ctrl->setCmdClass(
"ilinfoscreengui");
255 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
262 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
273 $this->ctrl->setCmd(
"showSummary");
274 $this->ctrl->setCmdClass(
"ilinfoscreengui");
285 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
287 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
290 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
293 $info->enablePrivateNotes();
295 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
301 $info->enableNewsEditing(
false);
302 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
305 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
307 if ($enable_internal_rss)
309 $info->setBlockProperty(
"news",
"settings",
true);
310 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
316 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
319 $this->ctrl->forwardCommand($info);
330 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
332 $ilHelp->setScreenIdComponent(
"fold");
334 $tabs_gui->setTabActive(
"");
335 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
337 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
338 $this->ctrl->getLinkTarget($this,
""));
341 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
342 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
345 $tabs_gui->addTarget(
"info_short",
346 $this->ctrl->getLinkTargetByClass(
347 array(
"ilobjfoldergui",
"ilinfoscreengui"),
"showSummary"),
348 array(
"showSummary",
"",
"infoScreen"),
349 "",
"", $force_active);
353 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
355 $tabs_gui->addTarget(
"settings",
356 $this->ctrl->getLinkTarget($this,
"edit"),
"edit",
"",
"", ($ilCtrl->getCmd() ==
"edit"));
360 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
363 $tabs_gui->addTarget(
'learning_progress',
364 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
366 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
369 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
371 $tabs_gui->addTarget(
373 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
380 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
382 $tabs_gui->addTarget(
"perm_settings",
383 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
387 if (
$_GET[
"baseClass"] ==
"ilRepositoryGUI" and !empty(
$_SESSION[
'il_rep_clipboard']))
389 $tabs_gui->addTarget(
"clipboard",
390 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
398 public static function _goto($a_target)
402 if ($ilAccess->checkAccess(
"read",
"", $a_target))
406 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
413 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
415 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
417 $filename = $this->
object->downloadFolder();
429 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
431 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
432 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
436 $this->object->getRefId());
444 if(!$crs_ref = $tree->checkForParentType($this->ref_id,
'crs'))
448 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
456 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
458 $this->ctrl->setCmdClass(get_class($course_content_obj));
459 $this->ctrl->setCmd(
'editUserTimings');
460 $this->ctrl->forwardCommand($course_content_obj);
479 $ilTabs->activateTab(
"settings");
483 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),$ilErr->MESSAGE);
490 $form->setValuesByArray($values,TRUE);
492 $GLOBALS[
'tpl']->setContent($form->getHTML());
501 global $ilTabs,
$lng;
503 $ilTabs->addSubTab(
"settings",
504 $lng->txt(
"fold_settings"),
505 $this->ctrl->getLinkTarget($this,
'edit'));
508 if ($this->ilias->getSetting(
"custom_icons"))
510 $ilTabs->addSubTab(
"icons",
511 $lng->txt(
"icon_settings"),
512 $this->ctrl->getLinkTarget($this,
'editIcons'));
515 $ilTabs->activateSubTab($a_tab);
516 $ilTabs->activateTab(
"settings");
533 $this->tabs_gui->setTabActive(
'settings');
540 $tpl->setContent($a_form->getHTML());
547 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
549 $form->setFormAction($this->ctrl->getFormAction($this));
554 $form->addCommandButton(
'updateIcons', $this->lng->txt(
'save'));
569 if($form->checkInput())
572 if ($ilSetting->get(
"custom_icons"))
574 if(
$_POST[
"cont_icon_delete"])
576 $this->
object->removeCustomIcon();
578 $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
580 if ($_FILES[
"cont_icon"][
'tmp_name'] ||
$_POST[
"cont_icon_delete"])
584 $this->ctrl->redirect($this,
"editIcons");
587 $form->setValuesByPost();