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());
410 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
411 $this->form =
new ilPropertyFormGUI();
412 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
413 $this->form->setTitle($this->lng->txt($this->type.
'_edit'));
418 $tit->setMaxLength(128);
419 $this->form->addItem($tit);
423 $this->form->addItem($des);
433 $title = $this->lng->txt(
'sort_inherit_prefix');
436 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
437 $sog->addOption($sde);
441 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
442 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
443 $sog->addOption($sma);
447 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
448 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
449 $sog->addOption($sti);
451 $this->form->addItem($sog);
453 $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
454 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
469 $this->update = $this->
object->update();
472 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
483 if ($a_return_to_parent)
485 $this->ctrl->returnToParent($this);
489 $this->ctrl->redirect($this);
501 $this->ctrl->setCmd(
"showSummary");
502 $this->ctrl->setCmdClass(
"ilinfoscreengui");
513 $this->ctrl->setCmd(
"showSummary");
514 $this->ctrl->setCmdClass(
"ilinfoscreengui");
525 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
527 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
530 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
533 $info->enablePrivateNotes();
535 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
541 $info->enableNewsEditing(
false);
542 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
545 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
547 if ($enable_internal_rss)
549 $info->setBlockProperty(
"news",
"settings",
true);
550 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
556 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
559 $this->ctrl->forwardCommand($info);
568 global $rbacsystem, $ilUser,
$lng,
$ilCtrl,$ilAccess;
570 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
572 $tabs_gui->setTabActive(
"");
573 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
575 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
576 $this->ctrl->getLinkTarget($this,
""));
579 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
580 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
583 $tabs_gui->addTarget(
"info_short",
584 $this->ctrl->getLinkTargetByClass(
585 array(
"ilobjfoldergui",
"ilinfoscreengui"),
"showSummary"),
586 array(
"showSummary",
"",
"infoScreen"),
587 "",
"", $force_active);
591 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
593 $tabs_gui->addTarget(
"settings",
594 $this->ctrl->getLinkTarget($this,
"edit"),
"edit",
"",
"", ($ilCtrl->getCmd() ==
"edit"));
598 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
601 $tabs_gui->addTarget(
'learning_progress',
602 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
604 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
607 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
609 $tabs_gui->addTarget(
611 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
618 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
620 $tabs_gui->addTarget(
"perm_settings",
621 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
625 if ($this->ctrl->getTargetScript() ==
"repository.php" and !empty(
$_SESSION[
'il_rep_clipboard']))
627 $tabs_gui->addTarget(
"clipboard",
628 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
636 include_once
'./classes/class.ilConditionHandlerInterface.php';
638 if(!is_object($this->chi_obj))
643 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
658 global $rbacsystem,$ilUser;
665 $this->tabs_gui->addSubTabTarget(
"activation",
666 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
667 "edit", get_class($this));
668 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
669 $this->tabs_gui->addSubTabTarget(
"preconditions",
670 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
671 "",
"ilConditionHandlerInterface");
683 if ($ilAccess->checkAccess(
"read",
"", $a_target))
685 $_GET[
"cmd"] =
"frameset";
686 $_GET[
"ref_id"] = $a_target;
687 include(
"repository.php");
719 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
726 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
728 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
730 $filename = $this->
object->downloadFolder();
742 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
744 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
745 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
749 $this->object->getRefId());
757 if(!$crs_ref = $tree->checkForParentType($this->ref_id,
'crs'))
761 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
769 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
771 $this->ctrl->setCmdClass(get_class($course_content_obj));
772 $this->ctrl->setCmd(
'editUserTimings');
773 $this->ctrl->forwardCommand($course_content_obj);