40 require_once
"./Services/Container/classes/class.ilContainerGUI.php";
50 function ilObjFolderGUI($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
false)
53 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output,
false);
64 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
70 $this->tabs_gui->setTabActive(
'view_content');
81 $ilTabs->activateTab(
"view_content");
90 $next_class = $this->ctrl->getNextClass($this);
91 $cmd = $this->ctrl->getCmd();
95 case "ilconditionhandlerinterface":
97 include_once
'./classes/class.ilConditionHandlerInterface.php';
101 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
103 $this->tabs_gui->setTabActive(
'view_content');
106 $this->ctrl->forwardCommand($new_gui);
111 $this->ctrl->forwardCommand($new_gui);
115 case 'ilpermissiongui':
117 $this->tabs_gui->setTabActive(
'perm_settings');
118 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
120 $ret =& $this->ctrl->forwardCommand($perm_gui);
123 case 'ilcoursecontentgui':
125 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
127 $this->ctrl->forwardCommand($course_content_obj);
130 case 'ilcourseitemadministrationgui':
132 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
133 $this->tabs_gui->clearSubTabs();
134 $this->ctrl->setReturn($this,
'view');
136 $this->ctrl->forwardCommand($item_adm_gui);
139 case "illearningprogressgui":
141 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
144 $this->object->getRefId(),
145 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
146 $this->ctrl->forwardCommand($new_gui);
147 $this->tabs_gui->setTabActive(
'learning_progress');
151 case "ilpageobjectgui":
157 $this->tpl->setContent(
$ret);
161 case 'ilinfoscreengui':
166 case 'ilobjectcopygui':
169 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
171 $cp->setType(
'fold');
172 $this->ctrl->forwardCommand($cp);
175 case "ilobjstylesheetgui":
203 $this->folder_tree =& $a_tree;
221 $data[
"fields"] = array();
228 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
'obj_fold'));
230 foreach (
$data[
"fields"] as
$key => $val)
232 $this->tpl->setVariable(
"TXT_".strtoupper(
$key), $this->lng->txt(
$key));
233 $this->tpl->setVariable(strtoupper(
$key), $val);
236 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"save",$this->ctrl->getFormAction($this,
"save").
"&new_type=".$new_type));
237 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->type.
"_new"));
238 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
239 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt($this->type.
"_add"));
240 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
242 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
264 $a_parent =
$_GET[
"ref_id"];
268 if (
$_POST[
"Fobject"][
"title"] ==
"")
270 $ilErr->raiseError($this->lng->txt(
"please_enter_title"), $ilErr->MESSAGE);
274 include_once(
"./Modules/Folder/classes/class.ilObjFolder.php");
276 $folderObj->setType($this->type);
279 $folderObj->create();
280 $this->
object =& $folderObj;
282 if (is_object($this->folder_tree))
284 $folderObj->setFolderTree($this->folder_tree);
288 $folderObj->setFolderTree($this->tree);
293 $folderObj->createReference();
294 $folderObj->setPermissions($a_parent);
297 $folderObj->putInTree($a_parent);
300 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
309 $this->ctrl->returnToParent($this);
322 $this->update = $this->
object->update();
325 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
336 if ($a_return_to_parent)
338 $this->ctrl->returnToParent($this);
342 $this->ctrl->redirect($this);
354 $this->ctrl->setCmd(
"showSummary");
355 $this->ctrl->setCmdClass(
"ilinfoscreengui");
366 $this->ctrl->setCmd(
"showSummary");
367 $this->ctrl->setCmdClass(
"ilinfoscreengui");
378 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
380 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
383 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
386 $info->enablePrivateNotes();
388 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
394 $info->enableNewsEditing(
false);
395 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
398 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
400 if ($enable_internal_rss)
402 $info->setBlockProperty(
"news",
"settings",
true);
403 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
409 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
412 $this->ctrl->forwardCommand($info);
421 global $rbacsystem, $ilUser,
$lng;
423 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
425 $tabs_gui->setTabActive(
"");
426 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
428 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
429 $this->ctrl->getLinkTarget($this,
""));
432 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
433 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
436 $tabs_gui->addTarget(
"info_short",
437 $this->ctrl->getLinkTargetByClass(
438 array(
"ilobjfoldergui",
"ilinfoscreengui"),
"showSummary"),
439 array(
"showSummary",
"",
"infoScreen"),
440 "",
"", $force_active);
444 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
446 $tabs_gui->addTarget(
"edit_properties",
447 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this));
451 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
454 $tabs_gui->addTarget(
'learning_progress',
455 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
457 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
460 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
462 $tabs_gui->addTarget(
"perm_settings",
463 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
467 if ($this->ctrl->getTargetScript() ==
"repository.php" and !empty(
$_SESSION[
'il_rep_clipboard']))
469 $tabs_gui->addTarget(
"clipboard",
470 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
478 include_once
'./classes/class.ilConditionHandlerInterface.php';
480 if(!is_object($this->chi_obj))
485 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
500 global $rbacsystem,$ilUser;
507 $this->tabs_gui->addSubTabTarget(
"activation",
508 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
509 "edit", get_class($this));
510 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
511 $this->tabs_gui->addSubTabTarget(
"preconditions",
512 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
513 "",
"ilConditionHandlerInterface");
525 if ($ilAccess->checkAccess(
"read",
"", $a_target))
527 $_GET[
"cmd"] =
"frameset";
528 $_GET[
"ref_id"] = $a_target;
529 include(
"repository.php");
561 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
568 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
570 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
572 $filename = $this->
object->downloadFolder();
584 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
586 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
587 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
591 $this->object->getRefId());
599 if(!$crs_ref = $tree->checkForParentType($this->ref_id,
'crs'))
603 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
611 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
613 $this->ctrl->setCmdClass(get_class($course_content_obj));
614 $this->ctrl->setCmd(
'editUserTimings');
615 $this->ctrl->forwardCommand($course_content_obj);