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);
61 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
87 $this->tabs_gui->setTabActive(
'view_content');
97 $next_class = $this->ctrl->getNextClass($this);
98 $cmd = $this->ctrl->getCmd();
102 case "ilconditionhandlerinterface":
104 include_once
'./classes/class.ilConditionHandlerInterface.php';
108 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
110 $this->tabs_gui->setTabActive(
'view_content');
113 $this->ctrl->forwardCommand($new_gui);
118 $this->ctrl->forwardCommand($new_gui);
122 case 'ilpermissiongui':
124 include_once(
"./classes/class.ilPermissionGUI.php");
126 $ret =& $this->ctrl->forwardCommand($perm_gui);
129 case 'ilcoursecontentgui':
131 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
133 $this->ctrl->forwardCommand($course_content_obj);
136 case 'ilcourseitemadministrationgui':
138 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
139 $this->tabs_gui->clearSubTabs();
140 $this->ctrl->setReturn($this,
'view');
142 $this->ctrl->forwardCommand($item_adm_gui);
145 case "illearningprogressgui":
147 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
150 $this->object->getRefId(),
151 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
152 $this->ctrl->forwardCommand($new_gui);
153 $this->tabs_gui->setTabActive(
'learning_progress');
157 case "ilpageobjectgui":
163 $this->tpl->setContent(
$ret);
167 case 'ilinfoscreengui':
196 $this->folder_tree =& $a_tree;
210 $new_type = $_POST[
"new_type"] ? $_POST[
"new_type"] :
$_GET[
"new_type"];
214 $data[
"fields"] = array();
221 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
'obj_fold'));
223 foreach (
$data[
"fields"] as $key => $val)
225 $this->tpl->setVariable(
"TXT_".strtoupper($key), $this->lng->txt($key));
226 $this->tpl->setVariable(strtoupper($key), $val);
229 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"save",$this->ctrl->getFormAction($this,
"save").
"&new_type=".$new_type));
230 $this->tpl->setVariable(
"TXT_HEADER", $this->lng->txt($this->type.
"_new"));
231 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
232 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt($this->type.
"_add"));
233 $this->tpl->setVariable(
"CMD_SUBMIT",
"save");
235 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
257 $a_parent =
$_GET[
"ref_id"];
261 include_once(
"./Modules/Folder/classes/class.ilObjFolder.php");
263 $folderObj->setType($this->type);
266 $folderObj->create();
267 $this->
object =& $folderObj;
269 if (is_object($this->folder_tree))
271 $folderObj->setFolderTree($this->folder_tree);
275 $folderObj->setFolderTree($this->tree);
280 $folderObj->createReference();
281 $folderObj->setPermissions($a_parent);
284 $folderObj->putInTree($a_parent);
287 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
296 $this->ctrl->returnToParent($this);
309 $this->update = $this->
object->update();
312 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
323 if ($a_return_to_parent)
325 $this->ctrl->returnToParent($this);
329 $this->ctrl->redirect($this);
341 $this->ctrl->setCmd(
"showSummary");
342 $this->ctrl->setCmdClass(
"ilinfoscreengui");
353 $this->ctrl->setCmd(
"showSummary");
354 $this->ctrl->setCmdClass(
"ilinfoscreengui");
365 if (!$ilAccess->checkAccess(
"visible",
"", $this->ref_id))
367 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
370 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
373 $info->enablePrivateNotes();
375 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
381 $info->enableNewsEditing(
false);
382 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
385 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
387 if ($enable_internal_rss)
389 $info->setBlockProperty(
"news",
"settings",
true);
390 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
396 $info->addMetaDataSections($this->object->getId(),0, $this->
object->getType());
399 $this->ctrl->forwardCommand($info);
406 global $rbacsystem,$ilUser;
408 $this->ctrl->setParameter($this,
"ref_id",$this->ref_id);
410 $tabs_gui->setTabActive(
"");
411 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
413 $tabs_gui->addTarget(
"view_content",
414 $this->ctrl->getLinkTarget($this,
""),
415 array(
"",
"view",
"cciMove",
"enableAdministrationPanel",
416 "disableAdministrationPanel",
"render"),
420 $force_active = ($this->ctrl->getNextClass() ==
"ilinfoscreengui"
421 || strtolower(
$_GET[
"cmdClass"]) ==
"ilnotegui")
424 $tabs_gui->addTarget(
"info_short",
425 $this->ctrl->getLinkTargetByClass(
426 array(
"ilobjfoldergui",
"ilinfoscreengui"),
"showSummary"),
427 array(
"showSummary",
"",
"infoScreen"),
428 "",
"", $force_active);
432 if ($rbacsystem->checkAccess(
'write',$this->ref_id))
434 $tabs_gui->addTarget(
"edit_properties",
435 $this->ctrl->getLinkTarget($this,
"edit"),
"edit", get_class($this));
439 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
442 $tabs_gui->addTarget(
'learning_progress',
443 $this->ctrl->getLinkTargetByClass(array(
'ilobjfoldergui',
'illearningprogressgui'),
''),
445 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
448 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
450 $tabs_gui->addTarget(
"perm_settings",
451 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');
455 if ($this->ctrl->getTargetScript() ==
"repository.php" and !empty(
$_SESSION[
'il_rep_clipboard']))
457 $tabs_gui->addTarget(
"clipboard",
458 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
466 include_once
'./classes/class.ilConditionHandlerInterface.php';
468 if(!is_object($this->chi_obj))
473 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
488 global $rbacsystem,$ilUser;
495 $this->tabs_gui->addSubTabTarget(
"activation",
496 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
497 "edit", get_class($this));
498 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
499 $this->tabs_gui->addSubTabTarget(
"preconditions",
500 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
501 "",
"ilConditionHandlerInterface");
513 if ($ilAccess->checkAccess(
"read",
"", $a_target))
515 $_GET[
"cmd"] =
"frameset";
516 $_GET[
"ref_id"] = $a_target;
517 include(
"repository.php");
549 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
556 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id))
558 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
560 $filename = $this->
object->downloadFolder();
572 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
574 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
575 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
579 $this->object->getRefId());
587 if(!$crs_ref = $tree->checkForParentType($this->ref_id,
'crs'))
591 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
599 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
601 $this->ctrl->setCmdClass(get_class($course_content_obj));
602 $this->ctrl->setCmd(
'editUserTimings');
603 $this->ctrl->forwardCommand($course_content_obj);