41 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
51 function ilObjFolderGUI($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
false)
54 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output,
false);
65 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
71 $this->tabs_gui->setTabActive(
'view_content');
82 $ilTabs->activateTab(
"view_content");
91 $next_class = $this->ctrl->getNextClass($this);
92 $cmd = $this->ctrl->getCmd();
96 case "ilconditionhandlerinterface":
98 include_once
'./classes/class.ilConditionHandlerInterface.php';
102 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
104 $this->tabs_gui->setTabActive(
'view_content');
107 $this->ctrl->forwardCommand($new_gui);
112 $this->ctrl->forwardCommand($new_gui);
116 case 'ilpermissiongui':
118 $this->tabs_gui->setTabActive(
'perm_settings');
119 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
121 $ret =& $this->ctrl->forwardCommand($perm_gui);
124 case 'ilcoursecontentgui':
126 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
128 $this->ctrl->forwardCommand($course_content_obj);
131 case 'ilcourseitemadministrationgui':
133 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
134 $this->tabs_gui->clearSubTabs();
135 $this->ctrl->setReturn($this,
'view');
137 $this->ctrl->forwardCommand($item_adm_gui);
140 case "illearningprogressgui":
142 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
145 $this->object->getRefId(),
146 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
147 $this->ctrl->forwardCommand($new_gui);
148 $this->tabs_gui->setTabActive(
'learning_progress');
152 case "ilpageobjectgui":
158 $this->tpl->setContent(
$ret);
162 case 'ilinfoscreengui':
167 case 'ilobjectcopygui':
170 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
172 $cp->setType(
'fold');
173 $this->ctrl->forwardCommand($cp);
176 case "ilobjstylesheetgui":
183 $this->tabs_gui->setTabActive(
'export');
184 include_once
'./Services/Export/classes/class.ilExportGUI.php';
186 $exp->addFormat(
'xml');
187 $this->ctrl->forwardCommand($exp);
214 $this->folder_tree =& $a_tree;
223 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.fold_create.html',
'Modules/Folder');
224 $this->ctrl->setParameter($this,
'new_type',$this->type);
228 $this->tpl->setVariable(
'NEW_FOLDER',$this->form->getHTML());
232 $this->tpl->setVariable(
"IMPORT_FORM", $this->form->getHTML());
245 $lng->loadLanguageModule(
"fold");
247 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
249 $this->form->setTableWidth(
'600px');
250 $this->form->setTarget(
"_top");
253 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
256 $fi->setRequired(
true);
257 $this->form->addItem($fi);
259 $this->form->addCommandButton(
"importFile", $lng->txt(
"import"));
260 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
261 $this->form->setTitle($lng->txt($a_new_type.
"_import"));
263 $this->form->setFormAction($ilCtrl->getFormAction($this));
276 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
277 $this->form =
new ilPropertyFormGUI();
278 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
279 $this->form->setTableWidth(
'600px');
280 $this->form->setTitle($this->lng->txt($this->type.
'_new'));
285 $tit->setMaxLength(128);
286 $this->form->addItem($tit);
290 $this->form->addItem($des);
292 $this->form->addCommandButton(
'save', $this->lng->txt(
'save'));
293 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
304 if(parent::importFileObject())
307 $this->ctrl->returnToParent($this);
321 if($this->form->checkInput())
324 $fold->setTitle($this->form->getInput(
'tit'));
325 $fold->setDescription($this->form->getInput(
'des'));
329 include_once
'Services/Tracking/classes/class.ilChangeEvent.php';
335 include_once
'./classes/class.ilLink.php';
339 $this->form->setValuesByPost();
350 $this->tabs_gui->setTabActive(
'settings');
353 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
354 $this->form->getItemByPostVar(
'tit')->setValue($this->object->getTitle());
355 $this->form->getItemByPostVar(
'des')->setValue($this->object->getDescription());
356 $this->form->getItemByPostVar(
'sor')->setValue($this->object->getOrderType());
357 # ilContainerSortingSettings::_readSortMode($this->object->getId())
360 $this->tpl->setContent($this->form->getHTML());
370 if($this->form->checkInput())
372 $this->
object->setTitle($this->form->getInput(
'tit'));
373 $this->
object->setDescription($this->form->getInput(
'des'));
374 $this->
object->update();
377 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
382 include_once
'Services/Tracking/classes/class.ilChangeEvent.php';
390 $this->ctrl->redirect($this,
'edit');
392 $this->form->setValuesByPost();
393 $this->tabs_gui->setTabActive(
'settings');
394 $this->tpl->setContent($this->form->getHTML());
406 if (!$ilAccess->checkAccess(
"write",
"", $this->ref_id))
408 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
415 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
416 $this->form =
new ilPropertyFormGUI();
417 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
418 $this->form->setTitle($this->lng->txt($this->type.
'_edit'));
423 $tit->setMaxLength(128);
424 $this->form->addItem($tit);
428 $this->form->addItem($des);
438 $title = $this->lng->txt(
'sort_inherit_prefix');
441 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
442 $sog->addOption($sde);
446 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
447 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
448 $sog->addOption($sma);
452 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
453 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
454 $sog->addOption($sti);
456 $this->form->addItem($sog);
458 $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
459 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
474 $this->update = $this->
object->update();
477 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
488 if ($a_return_to_parent)
490 $this->ctrl->returnToParent($this);
494 $this->ctrl->redirect($this);
506 $this->ctrl->setCmd(
"showSummary");
507 $this->ctrl->setCmdClass(
"ilinfoscreengui");
518 $this->ctrl->setCmd(
"showSummary");
519 $this->ctrl->setCmdClass(
"ilinfoscreengui");
530 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
532 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
535 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
538 $info->enablePrivateNotes();
540 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
546 $info->enableNewsEditing(
false);
547 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
550 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
552 if ($enable_internal_rss)
554 $info->setBlockProperty(
"news",
"settings",
true);
555 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
561 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
564 $this->ctrl->forwardCommand($info);
573 global $rbacsystem, $ilUser,
$lng,
$ilCtrl,$ilAccess;
575 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
577 $tabs_gui->setTabActive(
"");
578 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
580 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
581 $this->ctrl->getLinkTarget($this,
""));
584 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
585 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
588 $tabs_gui->addTarget(
"info_short",
589 $this->ctrl->getLinkTargetByClass(
590 array(
"ilobjfoldergui",
"ilinfoscreengui"),
"showSummary"),
591 array(
"showSummary",
"",
"infoScreen"),
592 "",
"", $force_active);
596 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
598 $tabs_gui->addTarget(
"settings",
599 $this->ctrl->getLinkTarget($this,
"edit"),
"edit",
"",
"", ($ilCtrl->getCmd() ==
"edit"));
603 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
606 $tabs_gui->addTarget(
'learning_progress',
607 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
609 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
612 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
614 $tabs_gui->addTarget(
616 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
623 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
625 $tabs_gui->addTarget(
"perm_settings",
626 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
630 if ($this->ctrl->getTargetScript() ==
"repository.php" and !empty(
$_SESSION[
'il_rep_clipboard']))
632 $tabs_gui->addTarget(
"clipboard",
633 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
641 include_once
'./classes/class.ilConditionHandlerInterface.php';
643 if(!is_object($this->chi_obj))
648 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
663 global $rbacsystem,$ilUser;
670 $this->tabs_gui->addSubTabTarget(
"activation",
671 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
672 "edit", get_class($this));
673 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
674 $this->tabs_gui->addSubTabTarget(
"preconditions",
675 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
676 "",
"ilConditionHandlerInterface");
688 if ($ilAccess->checkAccess(
"read",
"", $a_target))
690 $_GET[
"cmd"] =
"frameset";
691 $_GET[
"ref_id"] = $a_target;
692 include(
"repository.php");
724 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
731 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
733 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
735 $filename = $this->
object->downloadFolder();
747 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
749 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
750 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
754 $this->object->getRefId());
762 if(!$crs_ref = $tree->checkForParentType($this->ref_id,
'crs'))
766 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
774 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
776 $this->ctrl->setCmdClass(get_class($course_content_obj));
777 $this->ctrl->setCmd(
'editUserTimings');
778 $this->ctrl->forwardCommand($course_content_obj);