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":
115 $this->tpl->setContent(
$ret);
119 case 'ilinfoscreengui':
124 case 'ilobjectcopygui':
127 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
129 $cp->setType(
'fold');
130 $this->ctrl->forwardCommand($cp);
133 case "ilobjstylesheetgui":
140 $this->tabs_gui->setTabActive(
'export');
141 include_once
'./Services/Export/classes/class.ilExportGUI.php';
143 $exp->addFormat(
'xml');
144 $this->ctrl->forwardCommand($exp);
147 case "ilcommonactiondispatchergui":
148 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
150 $this->ctrl->forwardCommand($gui);
153 case 'ildidactictemplategui':
154 $this->ctrl->setReturn($this,
'edit');
155 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
157 $this->ctrl->forwardCommand($did);
186 $this->folder_tree =& $a_tree;
197 if(parent::importFileObject())
200 $this->ctrl->returnToParent($this);
216 $sde->setTitle($this->lng->txt(
'sort_inherit_prefix').
' ('.
218 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
219 $sog->addOption($sde);
223 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
224 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
225 $sog->addOption($sma);
229 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
230 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
231 $sog->addOption($sti);
240 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
248 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
262 $this->ctrl->setCmd(
"showSummary");
263 $this->ctrl->setCmdClass(
"ilinfoscreengui");
269 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
276 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
287 $this->ctrl->setCmd(
"showSummary");
288 $this->ctrl->setCmdClass(
"ilinfoscreengui");
299 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
301 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
304 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
307 $info->enablePrivateNotes();
309 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
315 $info->enableNewsEditing(
false);
316 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
319 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
321 if ($enable_internal_rss)
323 $info->setBlockProperty(
"news",
"settings",
true);
324 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
330 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
333 $this->ctrl->forwardCommand($info);
344 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
346 $ilHelp->setScreenIdComponent(
"fold");
348 $tabs_gui->setTabActive(
"");
349 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
351 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
352 $this->ctrl->getLinkTarget($this,
""));
355 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
356 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
359 $tabs_gui->addTarget(
"info_short",
360 $this->ctrl->getLinkTargetByClass(
361 array(
"ilobjfoldergui",
"ilinfoscreengui"),
"showSummary"),
362 array(
"showSummary",
"",
"infoScreen"),
363 "",
"", $force_active);
367 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
369 $tabs_gui->addTarget(
"settings",
370 $this->ctrl->getLinkTarget($this,
"edit"),
"edit",
"",
"", ($ilCtrl->getCmd() ==
"edit"));
374 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
377 $tabs_gui->addTarget(
'learning_progress',
378 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
380 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
383 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
385 $tabs_gui->addTarget(
387 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
394 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
396 $tabs_gui->addTarget(
"perm_settings",
397 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
401 if (
$_GET[
"baseClass"] ==
"ilRepositoryGUI" and !empty(
$_SESSION[
'il_rep_clipboard']))
403 $tabs_gui->addTarget(
"clipboard",
404 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
416 if ($ilAccess->checkAccess(
"read",
"", $a_target))
420 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
427 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
429 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
431 $filename = $this->
object->downloadFolder();
443 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
445 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
446 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
450 $this->object->getRefId());
458 if(!$crs_ref = $tree->checkForParentType($this->ref_id,
'crs'))
462 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
470 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
472 $this->ctrl->setCmdClass(get_class($course_content_obj));
473 $this->ctrl->setCmd(
'editUserTimings');
474 $this->ctrl->forwardCommand($course_content_obj);
500 global $ilTabs,
$lng;
502 $ilTabs->addSubTab(
"settings",
503 $lng->txt(
"fold_settings"),
504 $this->ctrl->getLinkTarget($this,
'edit'));
507 if ($this->ilias->getSetting(
"custom_icons"))
509 $ilTabs->addSubTab(
"icons",
510 $lng->txt(
"icon_settings"),
511 $this->ctrl->getLinkTarget($this,
'editIcons'));
514 $ilTabs->activateSubTab($a_tab);
515 $ilTabs->activateTab(
"settings");
532 $this->tabs_gui->setTabActive(
'settings');
539 $tpl->setContent($a_form->getHTML());
546 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
548 $form->setFormAction($this->ctrl->getFormAction($this));
553 $form->addCommandButton(
'updateIcons', $this->lng->txt(
'save'));
566 if($form->checkInput())
569 if ($this->ilias->getSetting(
"custom_icons"))
571 if(
$_POST[
"cont_big_icon_delete"])
573 $this->
object->removeBigIcon();
575 if(
$_POST[
"cont_small_icon_delete"])
577 $this->
object->removeSmallIcon();
579 if(
$_POST[
"cont_tiny_icon_delete"])
581 $this->
object->removeTinyIcon();
583 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
584 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
588 $this->ctrl->redirect($this,
"editIcons");
591 $form->setValuesByPost();