4 require_once
"./classes/class.ilObjectGUI.php";
5 require_once
"./Services/Container/classes/class.ilContainer.php";
6 include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
27 function ilContainerGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
31 $this->rbacsystem =& $rbacsystem;
33 $lng->loadLanguageModule(
"cntr");
42 $this->
ilObjectGUI($a_data, $a_id, $a_call_by_reference,
false);
53 $next_class = $this->ctrl->getNextClass();
54 $cmd = $this->ctrl->getCmd(
"render");
59 case "ilpageobjectgui":
60 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui")
63 $tpl->setContent(
$ret);
71 case "ilobjstylesheetgui":
91 $ilTabs->clearTargets();
93 $cmd = $ilCtrl->getCmd();
94 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
95 $this->ctrl->setReturn($this,
"editStyleProperties");
96 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
98 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
100 $style_gui->setCreationMode(
true);
103 if (
$cmd ==
"confirmedDelete")
105 $this->
object->setStyleSheetId(0);
106 $this->
object->update();
109 $ret = $this->ctrl->forwardCommand($style_gui);
111 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
114 $this->
object->setStyleSheetId($style_id);
115 $this->
object->update();
116 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
128 $cmd = $ilCtrl->getCmd();
130 if (in_array(
$cmd, array(
"displayMediaFullscreen")))
139 $ilTabs->clearTargets();
141 if (
$_GET[
"redirectSource"] ==
"ilinternallinkgui")
150 $ilTabs->setBackTarget($lng->txt(
"cntr_back_to_old_editor"),
151 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
"_top");
155 $ilTabs->setBackTarget($lng->txt(
"back"),
"./goto.php?target=".$this->object->getType().
"_".
156 $this->
object->getRefId(),
"_top");
160 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
161 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
163 $lng->loadLanguageModule(
"content");
165 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
166 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
169 $this->tpl->setCurrentBlock(
"SyntaxStyle");
170 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
172 $this->tpl->parseCurrentBlock();
175 $this->
object->getId()))
178 $new_page_object =
new ilPageObject($this->object->getType());
179 $new_page_object->
setParentId($this->object->getId());
180 $new_page_object->setId($this->object->getId());
181 $new_page_object->createFromXML();
187 $this->ctrl->setReturnByClass(
"ilpageobjectgui",
"edit");
194 $this->
object->getId());
195 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
197 $this->object->getStyleSheetId(), $this->
object->getType()));
203 $page_gui->setIntLinkHelpDefault(
"RepositoryItem",
$_GET[
"ref_id"]);
204 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
205 $page_gui->setLinkXML($link_xml);
207 $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this,
"downloadFile"));
208 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"showMediaFullscreen"));
211 $page_gui->setPresentationTitle(
"");
212 $page_gui->setTemplateOutput(
false);
214 $page_gui->setHeader(
"");
215 $page_gui->setEnabledRepositoryObjects(
true);
216 $page_gui->setEnabledFileLists(
false);
217 $page_gui->setEnabledMaps(
true);
218 $page_gui->setEnabledPCTabs(
true);
219 $page_gui->setEnabledInternalLinks(
true);
226 $wtpl =
new ilTemplate(
"tpl.cntr_old_editor_message.html",
true,
227 true,
"Services/Container");
228 $wtpl->setVariable(
"ALT_WARNING", $lng->txt(
"warning"));
229 $wtpl->setVariable(
"IMG_WARNING",
231 $wtpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_switch_to_new_editor_message"));
232 $wtpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_switch_to_new_editor_message"));
233 $wtpl->setVariable(
"HREF_SWITCH_TO_NEW_EDITOR",
234 $ilCtrl->getLinkTarget($this,
"useNewEditor"));
235 $wtpl->setVariable(
"TXT_MIGRATION_SWITCH",
236 $lng->txt(
"cntr_switch_to_new_editor_cmd"));
237 $page_gui->setPrependingHtml($wtpl->get());
241 $page_gui->setTabHook($this,
"addPageTabs");
243 $ret =& $this->ctrl->forwardCommand($page_gui);
256 $ilTabs->addTarget(
"obj_sty",
257 $ilCtrl->getLinkTarget($this,
'editStyleProperties'),
"editStyleProperties");
267 if (!$ilSetting->get(
"enable_cat_page_edit"))
277 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
279 return $xpage->getContent();
287 include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
289 $this->
object->getId()))
293 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
294 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
296 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
297 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
299 $this->tpl->setCurrentBlock(
"SyntaxStyle");
300 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
302 $this->tpl->parseCurrentBlock();
306 $this->
object->getId());
307 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
309 $this->object->getStyleSheetId(), $this->
object->getType()));
311 $page_gui->setIntLinkHelpDefault(
"StructureObject",
$_GET[
"ref_id"]);
312 $page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this,
"downloadFile"));
316 $page_gui->setPresentationTitle(
"");
317 $page_gui->setTemplateOutput(
false);
319 $page_gui->setHeader(
"");
320 $page_gui->setEnabledRepositoryObjects(
true);
321 $page_gui->setEnabledFileLists(
false);
322 $page_gui->setEnabledPCTabs(
true);
323 $page_gui->setEnabledMaps(
true);
324 $ret = $page_gui->showPage();
335 if (parent::prepareOutput())
340 #$this->showPossibleSubObjects();
344 include_once
'./Services/Container/classes/class.ilMemberViewGUI.php';
355 if (
$_GET[
"obj_id"] !=
"")
360 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
366 $mode = (
$_SESSION[
"il_rep_mode"] ==
"flat")
369 $link =
"repository.php?cmd=frameset&set_mode=".$mode.
"&ref_id=".$this->
object->getRefId();
370 $tpl->setTreeFlatIcon($link, $mode);
382 $this->tpl->setTitle($this->object->getTitle());
383 $this->tpl->setDescription($this->object->getLongDescription());
387 if ($ilias->getSetting(
"custom_icons") &&
388 in_array($this->object->getType(), array(
"cat",
"grp",
"crs",
"root")))
390 require_once(
"./Services/Container/classes/class.ilContainer.php");
396 $this->tpl->setTitleIcon($icon, $this->lng->txt(
"obj_".$this->object->getType()));
409 $cmd = ($this->cmd !=
"")
411 : $this->ctrl->getCmd();
413 $type = $this->
object->getType();
415 $d = $this->objDefinition->getCreatableSubObjects(
$type);
416 include_once(
"./Services/Repository/classes/class.ilRepositoryObjectPluginSlot.php");
428 if ($row[
"max"] ==
"" || $count < $row[
"max"])
430 if (!in_array($row[
"name"], array(
"rolf")))
432 if ($this->rbacsystem->checkAccess(
"create", $this->object->getRefId(), $row[
"name"]))
436 $subobj[] = array(
"value" => $row[
"name"],
437 "title" => $lng->txt(
"obj_".$row[
"name"]),
439 "alt" => $lng->txt(
"obj_".$row[
"name"]));
443 include_once(
"./Services/Component/classes/class.ilPlugin.php");
444 $subobj[] = array(
"value" => $row[
"name"],
447 "alt" => $lng->txt(
"obj_".$row[
"name"]));
455 if (is_array($subobj))
457 $formaction =
"repository.php?ref_id=".$this->object->getRefId().
"&cmd=post";
462 $subobj,
"create", $this->lng->txt(
"add"));
473 switch ($this->object->getViewMode())
477 include_once(
"./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
482 include_once(
'./Services/Container/classes/class.ilContainerObjectiveGUI.php');
489 include_once(
"./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
495 include_once
'Services/Container/classes/class.ilContainerILincContentGUI.php';
502 include_once(
"./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
510 $ilTabs->activateSubTab(
"manage");
514 $ilTabs->activateSubTab(
"view_content");
517 $container_view->setOutput();
519 $this->adminCommands = $container_view->adminCommands;
523 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
532 if ((
int)
$_GET[
"ref_id"] > 1 && $ilSetting->get(
"rep_tree_synchronize"))
534 $ilCtrl->setParameter($this,
"active_node", (
int)
$_GET[
"ref_id"]);
535 $tpl->addOnloadCode(
"
536 if (parent && parent.tree && parent.tree.updater)
538 parent.tree.updater('tree_div', '".
539 $ilCtrl->getLinkTarget($this,
"showTree",
"",
true,
false)
559 global $ilUser,
$lng;
566 if ($this->object->gotItems())
568 $GLOBALS[
"tpl"]->addAdminPanelCommand(
"delete",
569 $this->lng->txt(
"delete_selected_items"),
true);
570 $GLOBALS[
"tpl"]->addAdminPanelCommand(
"cut",
571 $this->lng->txt(
"move_selected_items"));
572 $GLOBALS[
"tpl"]->addAdminPanelCommand(
"link",
573 $this->lng->txt(
"link_selected_items"));
587 $GLOBALS[
"tpl"]->addAdminPanelCommand(
"clear",
588 $this->lng->txt(
"clear_clipboard"));
591 $this->ctrl->setParameter($this,
"type",
"");
592 $this->ctrl->setParameter($this,
"item_ref_id",
"");
593 $GLOBALS[
"tpl"]->setPageFormAction($this->ctrl->getFormAction($this));
595 if ($this->edit_order)
597 if($this->object->gotItems() and $ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
599 include_once(
'./Services/Container/classes/class.ilContainer.php');
603 $GLOBALS[
"tpl"]->addAdminPanelCommand(
"saveSorting",
604 $this->lng->txt(
'sorting_save'));
614 if(!$tree->checkForParentType($this->object->getRefId(),
'crs'))
618 $tpl->setCurrentBlock(
"custom_button");
619 $tpl->setVariable(
"ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editTimings'));
620 $tpl->setVariable(
"TXT_ADMIN_MODE",$this->lng->txt(
'timings_edit'));
621 $tpl->parseCurrentBlock();
629 $GLOBALS[
"tpl"]->setPermanentLink($this->object->getType(),
630 $this->
object->getRefId(),
"",
"_top");
641 $ilCtrl->redirect($this,
"editPageFrame");
652 $ilCtrl->redirect($this,
"editPageFrame");
662 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
664 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
681 $ilCtrl->redirect($this,
"editPageFrame");
689 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
692 $fs_gui->setFramesetTitle($this->object->getTitle());
693 $fs_gui->setMainFrameName(
"content");
694 $fs_gui->setSideFrameName(
"tree");
699 if ($xpage_id > 0 &&
$_SESSION[
"il_cntr_editor"] !=
"std")
701 $fs_gui->setMainFrameSource(
702 $this->ctrl->getLinkTarget(
703 $this,
"editPageContent"));
704 $fs_gui->setSideFrameSource(
705 $this->ctrl->getLinkTarget($this,
"showLinkList"));
713 $fs_gui->setSideFrameSource(
"");
716 $fs_gui->setMainFrameSource(
717 $this->ctrl->getLinkTargetByClass(
718 array(
"ilpageobjectgui"),
"edit"));
734 if (!$rbacsystem->checkAccess(
"write", $this->ref_id))
736 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
743 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
745 $content = $xpage->getContent();
749 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.container_edit_page_content.html",
750 "Services/Container");
752 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
753 $tpl->setVariable(
"TXT_EDIT_PAGE_CONTENT",
754 $this->lng->txt(
"edit_page_content"));
755 $tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
756 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
757 $tpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_old_editor_warning"));
758 $tpl->setVariable(
"TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt(
"cntr_old_editor_open_standard_editor"));
760 $tpl->setVariable(
"HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this,
"switchToStdEditor"));
761 $tpl->setVariable(
"ALT_WARNING", $lng->txt(
"warning"));
763 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
764 include_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
769 include_once
"./Services/RTE/classes/class.ilRTE.php";
771 include_once
"./Services/RTE/classes/class.$rtestring.php";
772 $rte =
new $rtestring();
774 include_once
"./classes/class.ilObject.php";
777 $rte->addRTESupport(
$obj_id, $obj_type);
784 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
785 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
805 $xpage->setContent($text);
811 $xpage->setContent($text);
814 "xhtml_page", $xpage->getId());
817 include_once(
"Services/RTE/classes/class.ilRTE.php");
819 $this->
object->getId());
822 $this->ctrl->redirect($this,
"");
827 $this->ctrl->redirect($this,
"");
834 include_once(
"Services/Object/classes/class.ilObjectListGUIFactory.php");
839 $type_grps = $this->
object->getGroupedObjTypes();
858 $this->type_template = array();
862 foreach ($type_grps as
$type => $v)
865 if (is_int(strpos($output_html,
"[list-".
$type.
"]")))
872 $tpl =& $overall_tpl;
876 if (is_array($this->items[
$type]))
879 $item_html = array();
881 foreach($this->items[$type] as $key => $item)
884 if ($cur_obj_type != $item[
"type"])
887 $item_list_gui->setContainerObject($this);
890 $ilBench->start(
"ilContainerGUI",
"0210_getListHTML");
895 $item_list_gui->enableDelete(
false);
896 $item_list_gui->enableLink(
false);
897 $item_list_gui->enableCut(
false);
898 $item_list_gui->enableCopy(
false);
901 $html = $item_list_gui->getListItemHTML($item[
"ref_id"],
902 $item[
"obj_id"], $item[
"title"], $item[
"description"]);
906 $this->determineAdminCommands($item[
"ref_id"],
907 $item_list_gui->adminCommandsIncluded());
908 $ilBench->stop(
"ilContainerGUI",
"0210_getListHTML");
912 $item_html[] = array(
914 "item_ref_id" => $item[
"ref_id"],
915 "item_obj_id" => $item[
"obj_id"],
916 'item_icon_image_type' => (method_exists($item_list_gui,
'getIconImageType')) ?
917 $item_list_gui->getIconImageType() :
925 if (count($item_html) > 0)
928 if (!$first && $overall)
930 $this->addSeparatorRow(
$tpl);
939 if ($this->ilias->getSetting(
"icon_position_in_lists") ==
"item_rows")
950 $this->current_position = 1;
951 foreach($item_html as $item)
954 $this->
addStandardRow(
$tpl, $item[
"html"], $item[
"item_ref_id"], $item[
"item_obj_id"], $item[
'item_icon_image_type']);
959 if (is_int(strpos($output_html,
"[list-".$type.
"]")))
972 $this->lng->txt(
"msg_no_type_accessible"),
$type);
985 $this->lng->txt(
"msg_no_type_available"),
$type);
995 if ($output_html !=
"")
999 $output_html.= $overall_tpl->get();
1004 foreach ($this->type_template as
$type =>
$tpl)
1006 $output_html = eregi_replace(
"\[list-".
$type.
"\]",
1007 "</p>".$tpl->get().
"<p class=\"ilc_Standard\">",
1015 $page_block =
new ilTemplate(
"tpl.container_page_block.html",
false,
false,
1016 "Services/Container");
1017 $page_block->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
1018 $output_html = $page_block->get();
1027 return $output_html;
1034 $tpl =
new ilTemplate(
"tpl.container_link_help.html",
true,
true);
1036 $type_ordering = array(
1037 "cat",
"fold",
"crs",
"icrs",
"icla",
"grp",
"lres",
1038 "glo",
"webr",
"file",
"exc",
1039 "tst",
"svy",
"mep",
"qpl",
"spl");
1041 $childs = $tree->getChilds(
$_GET[
"ref_id"]);
1042 foreach($childs as $child)
1044 if (in_array($child[
"type"], array(
"lm",
"dbk",
"sahs",
"htlm")))
1050 $cnt[$child[
"type"]]++;
1055 $tpl->setVariable(
"TXT_HELP_HEADER", $lng->txt(
"help"));
1056 foreach($type_ordering as
$type)
1058 $tpl->setCurrentBlock(
"row");
1059 $tpl->setVariable(
"ROWCOL",
"tblrow".((($i++)%2)+1));
1060 if ($type !=
"lres")
1062 $tpl->setVariable(
"TYPE", $lng->txt(
"objs_".$type).
1063 " (".((int)$cnt[$type]).
")");
1067 $tpl->setVariable(
"TYPE", $lng->txt(
"learning_resources").
1068 " (".((int)$cnt[
"lres"]).
")");
1070 $tpl->setVariable(
"TXT_LINK",
"[list-".$type.
"]");
1071 $tpl->parseCurrentBlock();
1083 $this->adminCommands =
false;
1115 $tpl =
new ilTemplate (
"tpl.container_list_block.html",
true,
true,
1116 "Services/Container");
1117 $this->cur_row_type =
"row_type_1";
1131 $title = $this->lng->txt(
"objs_".$a_type);
1135 $a_tpl->setCurrentBlock(
"container_header_row_image");
1136 $a_tpl->setVariable(
"HEADER_IMG", $icon);
1137 $a_tpl->setVariable(
"HEADER_ALT",
$title);
1141 $a_tpl->setCurrentBlock(
"container_header_row");
1144 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT",
$title);
1145 $a_tpl->parseCurrentBlock();
1146 $a_tpl->touchBlock(
"container_row");
1159 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1163 $a_tpl->touchBlock($this->cur_row_type);
1166 if ($this->ilias->getSetting(
"icon_position_in_lists") ==
"item_rows")
1169 $alt = $this->lng->txt(
"obj_".$a_image_type);
1172 if ($this->ilias->getSetting(
"custom_icons") &&
1173 in_array($a_image_type, array(
"cat",
"grp",
"crs")))
1175 require_once(
"./Services/Container/classes/class.ilContainer.php");
1182 $a_tpl->setCurrentBlock(
"block_row_image");
1183 $a_tpl->setVariable(
"ROW_IMG", $icon);
1184 $a_tpl->setVariable(
"ROW_ALT", $alt);
1185 $a_tpl->parseCurrentBlock();
1191 $a_tpl->setCurrentBlock(
"block_row_check");
1192 $a_tpl->setVariable(
"ITEM_ID", $a_item_ref_id);
1193 $a_tpl->parseCurrentBlock();
1196 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
1200 $a_tpl->setCurrentBlock(
'block_position');
1201 $a_tpl->setVariable(
'POS_TYPE',$a_image_type);
1202 $a_tpl->setVariable(
'POS_ID',$a_item_ref_id);
1203 $a_tpl->setVariable(
'POSITION',sprintf(
'%.1f',$this->current_position++));
1204 $a_tpl->parseCurrentBlock();
1208 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1210 $a_tpl->setCurrentBlock(
"container_standard_row");
1211 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
1212 $a_tpl->parseCurrentBlock();
1213 $a_tpl->touchBlock(
"container_row");
1221 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1225 $a_tpl->touchBlock($this->cur_row_type);
1227 $type = $this->lng->txt(
"obj_".$a_type);
1228 $a_message = str_replace(
"[type]",
$type, $a_message);
1230 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1232 $a_tpl->setCurrentBlock(
"container_standard_row");
1233 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT",
1235 $a_tpl->parseCurrentBlock();
1236 $a_tpl->touchBlock(
"container_row");
1241 $this->cur_row_type =
"";
1253 || strtolower($this->ctrl->getCmdClass()) !=
"ilpageobjectgui")
1258 $lng->loadLanguageModule(
"content");
1263 $this->tabs_gui->setBackTarget($this->lng->txt(
"obj_cat"),
1264 $this->ctrl->getLinkTarget($this,
"frameset"),
1267 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTargetByClass(
"ilpageobjectgui",
"view")
1268 , array(
"",
"view"),
"ilpageobjectgui");
1280 if (!is_object($this->
object))
1285 if ($a_include_view && $ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
1289 $ilTabs->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTarget($this,
""));
1293 $ilTabs->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel"));
1297 if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
1298 ($this->adminCommands ||
1299 (is_object($this->
object) &&
1300 ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())))
1302 (is_object($this->
object) &&
1303 ($this->
object->getHiddenFilesFound())) ||
1310 $ilTabs->addSubTab(
"manage", $lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
1314 $ilTabs->addSubTab(
"manage", $lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel"));
1317 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1318 is_object($this->
object) &&
1319 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
1323 $ilTabs->addSubTab(
"ordering", $lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
1325 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1326 is_object($this->
object) &&
1327 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())
1330 if ($ilSetting->get(
"enable_cat_page_edit"))
1332 $ilTabs->addSubTab(
"page_editor", $lng->txt(
"cntr_text_media_editor"), $ilCtrl->getLinkTarget($this,
"editPageFrame"),
1348 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
1350 $tabs_gui->addTarget(
"perm_settings",
1351 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1352 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1353 if ($ilCtrl->getNextClass() ==
"ilpermissiongui")
1355 $tabs_gui->activateTab(
"perm_settings");
1360 if ($this->ctrl->getTargetScript() ==
"repository.php" and !empty(
$_SESSION[
"clipboard"]))
1362 $tabs_gui->addTarget(
"clipboard",
1363 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
1378 $_SESSION[
"il_cont_admin_panel"] =
true;
1379 $this->ctrl->redirect($this,
"render");
1387 $_SESSION[
"il_cont_admin_panel"] =
false;
1388 $this->ctrl->redirect($this,
"render");
1398 $this->edit_order =
true;
1399 $_SESSION[
"il_cont_admin_panel"] =
false;
1402 $ilTabs->activateSubTab(
"ordering");
1411 return $this->edit_order ?
true :
false;
1423 if((
int)$ilSetting->get(
'disable_my_offers'))
1428 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1440 if((
int)$ilSetting->get(
'disable_my_offers'))
1445 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1453 global
$tree, $ilUser, $rbacsystem;
1455 if (!$rbacsystem->checkAccess(
"write",
$_GET[
'item_ref_id']))
1457 $this->ilErr->raiseError($this->lng->txt(
'err_no_permission'),$this->ilErr->MESSAGE);
1461 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
1464 require_once
'Services/WebDAV/classes/class.ilDAVLocks.php';
1467 $result = $locks->lockRef(
$_GET[
'item_ref_id'],
1468 $ilUser->getId(), $ilUser->getLogin(),
1469 'ref_'.$_GET[
'item_ref_id'].
'_usr_'.$ilUser->getId(),
1470 time() + 60, 0,
'exclusive'
1475 ($result ===
true) ?
'object_locked' : $result
1493 if (
$_GET[
"item_ref_id"] !=
"")
1502 if (!isset(
$_POST[
"id"]))
1504 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1511 $node_data = $this->tree->getNodeData($ref_id);
1512 $subtree_nodes = $this->tree->getSubTree($node_data);
1514 $all_node_data[] = $node_data;
1515 $all_subtree_nodes[] = $subtree_nodes;
1518 foreach ($subtree_nodes as $node)
1520 if($node[
'type'] ==
'rolf')
1525 if (!$rbacsystem->checkAccess(
'delete',$node[
"ref_id"]))
1527 $no_cut[] = $node[
"ref_id"];
1534 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_cut").
" ".implode(
',',$this->
getTitlesByRefId($no_cut)),
1535 $this->ilias->error_obj->MESSAGE);
1539 $_SESSION[
"clipboard"][
"cmd"] = $ilCtrl->getCmd();
1558 global $clipboard, $rbacsystem, $rbacadmin,
$ilCtrl;
1560 if (
$_GET[
"item_ref_id"] !=
"")
1565 if (!isset(
$_POST[
"id"]))
1567 $this->ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->ilias->error_obj->MESSAGE);
1573 if (!$rbacsystem->checkAccess(
'delete',$ref_id))
1578 $object =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
1580 if (!$this->objDefinition->allowLink(
$object->getType()))
1582 $no_link[] =
$object->getType();
1589 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_link").
" ".
1590 implode(
',',$no_cut),$this->ilias->error_obj->MESSAGE);
1593 if (count($no_link))
1595 $no_link = array_unique($no_link);
1597 foreach ($no_link as
$type)
1599 $txt_objs[] = $this->lng->txt(
"objs_".$type);
1602 $this->ilias->raiseError(implode(
', ',$txt_objs).
" ".$this->lng->txt(
"msg_obj_no_link"),$this->ilias->error_obj->MESSAGE);
1609 $clipboard[
"parent"] =
$_GET[
"ref_id"];
1610 $clipboard[
"cmd"] = $ilCtrl->getCmd();
1612 foreach (
$_POST[
"id"] as $ref_id)
1614 $clipboard[
"ref_ids"][] =
$ref_id;
1638 if (isset(
$_POST[
"cmd"][
"clear"]))
1642 $this->ctrl->returnToParent($this);
1649 global $rbacsystem, $rbacadmin, $rbacreview,
$log,
$tree, $ilObjDataCache, $ilUser;
1651 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'cut',
'link')))
1653 $message = __METHOD__.
": cmd was neither 'cut' nor 'link'; may be a hack attempt!";
1654 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1657 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1660 $_POST[
'nodes'] = array($_POST[
'node']);
1663 if(!is_array(
$_POST[
'nodes']) || !count(
$_POST[
'nodes']))
1666 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1674 $folder_objects_cache = array();
1678 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1680 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1682 if(!array_key_exists($folder_ref_id, $folder_objects_cache))
1688 if(!$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType()))
1690 $no_paste[] = sprintf($this->lng->txt(
'msg_no_perm_paste_object_in_folder'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']', $folder_objects_cache[$folder_ref_id]->getTitle().
' ['.$folder_objects_cache[$folder_ref_id]->getRefId().
']');
1694 if($folder_ref_id == $current_parent_id)
1696 $exists[] = sprintf($this->lng->txt(
'msg_obj_exists_in_folder'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']', $folder_objects_cache[$folder_ref_id]->getTitle().
' ['.$folder_objects_cache[$folder_ref_id]->getRefId().
']');
1700 if($tree->isGrandChild($ref_id, $folder_ref_id))
1702 $is_child[] = sprintf($this->lng->txt(
'msg_paste_object_not_in_itself'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']');
1706 if(!in_array($obj_data->getType(), array_keys($this->objDefinition->getSubObjects($folder_objects_cache[$folder_ref_id]->getType()))))
1708 $not_allowed_subobject[] = sprintf($this->lng->txt(
'msg_obj_may_not_contain_objects_of_type'), $folder_objects_cache[$folder_ref_id]->getTitle().
' ['.$folder_objects_cache[$folder_ref_id]->getRefId().
']', $obj_data->getType());
1717 $error .= implode(
'<br />', $exists);
1720 if(count($is_child))
1723 $error .= implode(
'<br />', $is_child);
1726 if(count($not_allowed_subobject))
1729 $error .= implode(
'<br />', $not_allowed_subobject);
1732 if(count($no_paste))
1735 $error .= implode(
'<br />', $no_paste);
1741 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1749 $log->write(__METHOD__.
", cmd: ".
$_SESSION[
"clipboard"][
"cmd"]);
1755 $ref_ids =
$_SESSION[
'clipboard'][
'ref_ids'];
1756 unset(
$_SESSION[
'clipboard'][
'ref_ids']);
1759 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1763 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'cut')
1765 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1767 foreach($ref_ids as $ref_id)
1770 $old_parent = $tree->getParentId($ref_id);
1771 $tree->moveTree($ref_id, $folder_ref_id);
1772 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1774 include_once(
'classes/class.ilConditionHandler.php');
1780 $node_data = $tree->getNodeData($ref_id);
1781 $old_parent_data = $tree->getNodeData($old_parent);
1783 $old_parent_data[
'obj_id']);
1785 $ilObjDataCache->lookupObjId($folder_ref_id));
1799 if(
$_SESSION[
'clipboard'][
'cmd'] ==
'link')
1801 $linked_to_folders = array();
1803 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1806 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1808 $linked_to_folders[] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
1810 foreach($ref_ids as $ref_id)
1813 $top_node = $tree->getNodeData($ref_id);
1816 $subnodes[
$ref_id] = $tree->getSubtree($top_node);
1820 foreach($subnodes as $key => $subnode)
1824 $new_ref_id = $obj_data->createReference();
1825 $obj_data->putInTree($folder_ref_id);
1826 $obj_data->setPermissions($folder_ref_id);
1829 if($rbac_log_active)
1831 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id,
false);
1839 $node_data = $tree->getNodeData($new_ref_id);
1841 $ilObjDataCache->lookupObjId($folder_ref_id));
1847 $log->write(__METHOD__.
', link finished');
1850 ilUtil::sendSuccess(sprintf($this->lng->txt(
'mgs_objects_linked_to_the_following_folders'), implode(
', ', $linked_to_folders)),
true);
1856 $this->ctrl->returnToParent($this);
1864 $_SESSION[
'paste_linked_repexpand'] = array();
1870 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
1871 foreach((array)
$path as $node_id)
1873 if(!in_array($node_id,
$_SESSION[
'paste_linked_repexpand']))
1874 $_SESSION[
'paste_linked_repexpand'][] = $node_id;
1882 global $ilTabs, $ilToolbar;
1884 $ilTabs->setTabActive(
'view_content');
1886 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'link')))
1888 $message = __METHOD__.
": cmd was not 'link'; may be a hack attempt!";
1889 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1892 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paste_into_multiple_objects.html');
1894 require_once
'classes/class.ilPasteIntoMultipleItemsExplorer.php';
1896 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showLinkIntoMultipleObjectsTree'));
1897 $exp->setTargetGet(
'ref_id');
1898 $exp->setPostVar(
'nodes[]');
1899 is_array(
$_POST[
'nodes']) ? $exp->setCheckedItems((array)
$_POST[
'nodes']) : $exp->setCheckedItems(array());
1901 if(
$_GET[
'paste_linked_repexpand'] ==
'')
1903 $expanded = $this->tree->readRootId();
1907 $expanded =
$_GET[
'paste_linked_repexpand'];
1910 $this->tpl->setVariable(
'FORM_TARGET',
'_top');
1911 $this->tpl->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this,
'performPasteIntoMultipleObjects'));
1913 $exp->setExpand($expanded);
1916 $output = $exp->getOutput();
1918 $this->tpl->setVariable(
'OBJECT_TREE', $output);
1920 $this->tpl->setVariable(
'CMD_SUBMIT',
'performPasteIntoMultipleObjects');
1921 $this->tpl->setVariable(
'TXT_SUBMIT', $this->lng->txt(
'paste'));
1923 $ilToolbar->addButton($this->lng->txt(
'back'), $this->ctrl->getParentReturnByClass(get_class($this)));
1931 $_SESSION[
'paste_cut_repexpand'] = array();
1937 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
1938 foreach((array)
$path as $node_id)
1940 if(!in_array($node_id,
$_SESSION[
'paste_cut_repexpand']))
1941 $_SESSION[
'paste_cut_repexpand'][] = $node_id;
1949 global $ilTabs, $ilToolbar;
1951 $ilTabs->setTabActive(
'view_content');
1953 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'cut')))
1955 $message = __METHOD__.
": cmd was not 'cut'; may be a hack attempt!";
1956 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
1959 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paste_into_multiple_objects.html');
1961 require_once
'classes/class.ilPasteIntoMultipleItemsExplorer.php';
1963 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showMoveIntoObjectTree'));
1964 $exp->setTargetGet(
'ref_id');
1965 $exp->setPostVar(
'node');
1966 $exp->setCheckedItems(array((
int)
$_POST[
'node']));
1968 if(
$_GET[
'paste_cut_repexpand'] ==
'')
1970 $expanded = $this->tree->readRootId();
1974 $expanded =
$_GET[
'paste_cut_repexpand'];
1977 $this->tpl->setVariable(
'FORM_TARGET',
'_top');
1978 $this->tpl->setVariable(
'FORM_ACTION', $this->ctrl->getFormAction($this,
'performPasteIntoMultipleObjects'));
1980 $exp->setExpand($expanded);
1983 $output = $exp->getOutput();
1985 $this->tpl->setVariable(
'OBJECT_TREE', $output);
1987 $this->tpl->setVariable(
'CMD_SUBMIT',
'performPasteIntoMultipleObjects');
1988 $this->tpl->setVariable(
'TXT_SUBMIT', $this->lng->txt(
'paste'));
1990 $ilToolbar->addButton($this->lng->txt(
'back'), $this->ctrl->getParentReturnByClass(get_class($this)));
2001 global $rbacsystem, $rbacadmin, $rbacreview,
$log,
$tree;
2002 global $ilUser,
$lng;
2005 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
2009 if (!in_array(
$_SESSION[
"clipboard"][
"cmd"],array(
"cut",
"link",
"copy")))
2011 $message = get_class($this).
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2012 $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
2018 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($ref_id);
2021 if (!$rbacsystem->checkAccess(
'create',$this->object->getRefId(), $obj_data->getType()))
2024 $no_paste_titles[] = $obj_data->getTitle();
2028 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
2035 if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
2041 $obj_type = $obj_data->getType();
2043 if (!in_array($obj_type, array_keys($this->objDefinition->getSubObjects($this->object->getType()))))
2045 $not_allowed_subobject[] = $obj_data->getType();
2052 if (count($exists) &&
$_SESSION[
"clipboard"][
"cmd"] !=
"copy")
2055 $this->ilias->raiseError($this->lng->txt(
"msg_obj_exists"),$this->ilias->error_obj->MESSAGE);
2058 if (count($is_child))
2060 $this->ilias->raiseError($this->lng->txt(
"msg_not_in_itself").
" ".implode(
',',$is_child),
2061 $this->ilias->error_obj->MESSAGE);
2064 if (count($not_allowed_subobject))
2066 $this->ilias->raiseError($this->lng->txt(
"msg_may_not_contain").
" ".implode(
',',$not_allowed_subobject),
2067 $this->ilias->error_obj->MESSAGE);
2070 if (count($no_paste))
2072 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_paste").
" ".
2073 implode(
',',$no_paste),$this->ilias->error_obj->MESSAGE);
2077 $log->write(
"ilObjectGUI::pasteObject(), cmd: ".
$_SESSION[
"clipboard"][
"cmd"]);
2083 $ref_ids =
$_SESSION[
"clipboard"][
"ref_ids"];
2084 unset(
$_SESSION[
"clipboard"][
"ref_ids"]);
2088 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"copy")
2090 foreach($ref_ids as $ref_id)
2092 $revIdMapping = array();
2094 $oldNode_data = $tree->getNodeData($ref_id);
2095 if ($oldNode_data[
'parent'] == $this->object->getRefId())
2097 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
2099 $newRef = $this->
cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, $newTitle);
2103 $newRef = $this->
cloneNodes($ref_id, $this->object->getRefId(), $refIdMapping, null);
2110 $old_parent_data = $tree->getParentNodeData($ref_id);
2111 $newNode_data = $tree->getNodeData($newRef);
2113 $oldNode_data[
'obj_id'], $ilUser->getId());
2115 $this->
object->getId());
2120 $log->write(
"ilObjectGUI::pasteObject(), copy finished");
2125 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut")
2128 foreach($ref_ids as $ref_id)
2131 $old_parent = $tree->getParentId($ref_id);
2132 $this->tree->moveTree($ref_id,$this->object->getRefId());
2133 $rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
2135 include_once(
'classes/class.ilConditionHandler.php');
2141 $node_data = $tree->getNodeData($ref_id);
2142 $old_parent_data = $tree->getNodeData($old_parent);
2144 $old_parent_data[
'obj_id']);
2146 $this->
object->getId());
2154 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"link")
2156 foreach ($ref_ids as $ref_id)
2159 $top_node = $this->tree->getNodeData($ref_id);
2162 $subnodes[
$ref_id] = $this->tree->getSubtree($top_node);
2166 foreach ($subnodes as $key => $subnode)
2169 $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($key);
2170 $new_ref_id = $obj_data->createReference();
2171 $obj_data->putInTree(
$_GET[
"ref_id"]);
2172 $obj_data->setPermissions(
$_GET[
"ref_id"]);
2177 $node_data = $tree->getNodeData($new_ref_id);
2179 $this->
object->getId());
2185 $log->write(
"ilObjectGUI::pasteObject(), link finished");
2192 $last_cmd =
$_SESSION[
"clipboard"][
"cmd"];
2198 if ($last_cmd ==
"cut")
2203 else if ($last_cmd ==
"copy")
2207 else if ($last_command ==
'link')
2213 $this->ctrl->returnToParent($this);
2229 global $ilAccess,$ilObjDefinition;
2231 if(!$ilAccess->checkAccess(
'copy',
'',
$_GET[
'item_ref_id']))
2236 $this->ctrl->returnToParent($this);
2243 return $this->initAndDisplayCopyIntoObjectObject();
2254 $node_data = $this->tree->getNodeData($ref_id);
2255 $subtree_nodes = $this->tree->getSubTree($node_data);
2257 $all_node_data[] = $node_data;
2258 $all_subtree_nodes[] = $subtree_nodes;
2261 foreach ($subtree_nodes as $node)
2263 if($node[
'type'] ==
'rolf')
2268 if (!$rbacsystem->checkAccess(
'visible,read,copy',$node[
"ref_id"]))
2270 $no_copy[] = $node[
"ref_id"];
2275 if (count($no_copy))
2277 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_copy").
" ".implode(
',',$this->
getTitlesByRefId($no_copy)),
2278 $this->ilias->error_obj->MESSAGE);
2288 $this->ctrl->returnToParent($this);
2304 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2305 $ilLog->write($message,$ilLog->FATAL);
2306 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->WARNING);
2309 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.rep_clipboard.html");
2313 $f_result = array();
2323 $f_result[$counter][] = $this->lng->txt(
"obj_".$tmp_obj->getType());
2324 $f_result[$counter][] = $tmp_obj->getTitle();
2326 $f_result[$counter][] = (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") ? $this->lng->txt(
"move") :$this->lng->txt(
$_SESSION[
"clipboard"][
"cmd"]);
2344 if ($this->ilias->getSetting(
"custom_icons"))
2346 $this->tpl->addBlockFile(
"CONTAINER_ICONS",
"container_icon_settings",
2347 "tpl.container_icon_settings.html");
2349 if (($big_icon = $this->object->getBigIconPath()) !=
"")
2351 $this->tpl->setCurrentBlock(
"big_icon");
2352 $this->tpl->setVariable(
"SRC_BIG_ICON", $big_icon);
2353 $this->tpl->parseCurrentBlock();
2355 if ($this->object->getType() !=
"root")
2357 if (($small_icon = $this->object->getSmallIconPath()) !=
"")
2359 $this->tpl->setCurrentBlock(
"small_icon");
2360 $this->tpl->setVariable(
"SRC_SMALL_ICON", $small_icon);
2361 $this->tpl->parseCurrentBlock();
2363 $this->tpl->setCurrentBlock(
"small_icon_row");
2364 $this->tpl->setVariable(
"SMALL_ICON", $this->lng->txt(
"standard_icon"));
2365 $this->tpl->setVariable(
"SMALL_SIZE",
"(".
2366 $this->ilias->getSetting(
"custom_icon_small_width").
"x".
2367 $this->ilias->getSetting(
"custom_icon_small_height").
")");
2368 $this->tpl->setVariable(
"TXT_REMOVE_S", $this->lng->txt(
"remove"));
2369 $this->tpl->parseCurrentBlock();
2371 if (($tiny_icon = $this->object->getTinyIconPath()) !=
"")
2373 $this->tpl->setCurrentBlock(
"tiny_icon");
2374 $this->tpl->setVariable(
"SRC_TINY_ICON", $tiny_icon);
2375 $this->tpl->parseCurrentBlock();
2377 $this->tpl->setCurrentBlock(
"container_icon_settings");
2378 $this->tpl->setVariable(
"SPAN_TITLE", $a_input_colspan + 1);
2379 $this->tpl->setVariable(
"SPAN_INPUT", $a_input_colspan);
2380 $this->tpl->setVariable(
"ICON_SETTINGS", $this->lng->txt(
"icon_settings"));
2381 $this->tpl->setVariable(
"BIG_ICON", $this->lng->txt(
"big_icon"));
2382 $this->tpl->setVariable(
"TINY_ICON", $this->lng->txt(
"tiny_icon"));
2383 $this->tpl->setVariable(
"BIG_SIZE",
"(".
2384 $this->ilias->getSetting(
"custom_icon_big_width").
"x".
2385 $this->ilias->getSetting(
"custom_icon_big_height").
")");
2386 $this->tpl->setVariable(
"TINY_SIZE",
"(".
2387 $this->ilias->getSetting(
"custom_icon_tiny_width").
"x".
2388 $this->ilias->getSetting(
"custom_icon_tiny_height").
")");
2389 $this->tpl->setVariable(
"TXT_REMOVE", $this->lng->txt(
"remove"));
2390 $this->tpl->parseCurrentBlock();
2396 return $_SESSION[
"il_cont_admin_panel"];
2407 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
2411 $column_gui->setEnableMovement(
true);
2414 $column_gui->setRepositoryItems(
2415 $this->object->getSubItems($this->isActiveAdministrationPanel(),
true));
2419 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
2421 $column_gui->setBlockProperty(
"news",
"settings",
true);
2423 $column_gui->setBlockProperty(
"news",
"default_visibility_option",
true);
2424 $column_gui->setBlockProperty(
"news",
"hide_news_block_option",
true);
2429 $column_gui->setAdminCommands(
true);
2481 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2483 global $ilObjDataCache,
$tree;
2488 if(isset(
$_SESSION[
'wizard_search_title']))
2490 $this->searchCloneSourceObject();
2500 $this->ctrl->setParameter($this,
'clone_source',(
int)
$_REQUEST[
'clone_source']);
2501 $this->ctrl->setParameter($this,
'new_type',$new_type);
2505 $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
2506 $this->tpl->setVariable(
'BODY_ATTRIBUTES',
'onload="ilDisableChilds(\'cmd\');"');
2509 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.container_wizard_page.html');
2510 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
2512 $this->tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$new_type));
2513 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt($new_type.
'_wizard_page'));
2514 $this->tpl->setVariable(
'INFO_DUPLICATE',$this->lng->txt($new_type.
'_copy_threads_info'));
2515 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'obj_'.$new_type.
'_duplicate'));
2516 $this->tpl->setVariable(
'BTN_BACK',$this->lng->txt(
'btn_back'));
2517 if(isset(
$_SESSION[
'wizard_search_title']))
2519 $this->tpl->setVariable(
'CMD_BACK',
'searchCloneSource');
2523 $this->tpl->setVariable(
'CMD_BACK',
'create');
2526 $this->tpl->setVariable(
'BTN_TREE',$this->lng->txt(
'treeview'));
2527 $this->tpl->setVariable(
'BTN_LIST',$this->lng->txt(
'flatview'));
2535 foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),
true) as $node)
2543 if($node[
'type'] ==
'rolf')
2550 for($i = $source_node[
'depth'];$i < $node[
'depth']; $i++)
2552 $this->tpl->touchBlock(
'padding');
2553 $this->tpl->touchBlock(
'end_padding');
2557 $copy_wizard_page->fillTreeSelection($node[
'ref_id'],$node[
'type'],$node[
'depth']);
2559 $this->tpl->setCurrentBlock(
'tree_row');
2561 $this->tpl->setVariable(
'TREE_ALT_IMG',$this->lng->txt(
'obj_'.$node[
'type']));
2562 $this->tpl->setVariable(
'TREE_TITLE',$node[
'title']);
2563 $this->tpl->parseCurrentBlock();
2567 $this->tpl->setCurrentBlock(
'no_content');
2568 $this->tpl->setVariable(
'TXT_NO_CONTENT',$this->lng->txt(
'container_no_items'));
2569 $this->tpl->parseCurrentBlock();
2573 $this->tpl->setCurrentBlock(
'tree_footer');
2574 $this->tpl->setVariable(
'TXT_COPY_ALL',$this->lng->txt(
'copy_all'));
2575 $this->tpl->setVariable(
'TXT_LINK_ALL',$this->lng->txt(
'link_all'));
2576 $this->tpl->setVariable(
'TXT_OMIT_ALL',$this->lng->txt(
'omit_all'));
2577 $this->tpl->parseCurrentBlock();
2583 foreach($tree->getSubTreeTypes($source_id,array(
'rolf',
'crs')) as
$type)
2586 if(strlen($html = $copy_wizard_page->getWizardPageBlockHTML()))
2588 $this->tpl->setCurrentBlock(
'obj_row');
2589 $this->tpl->setVariable(
'ITEM_BLOCK',$html);
2590 $this->tpl->parseCurrentBlock();
2607 include_once(
'classes/class.ilLink.php');
2608 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2610 global $ilAccess,
$ilErr,$rbacsystem,
$tree,$ilUser;
2614 $clone_source = (int)
$_REQUEST[
'clone_source'];
2616 if(!$rbacsystem->checkAccess(
'create',
$ref_id,$new_type))
2618 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2626 if(!$ilAccess->checkAccess(
'write',
'', $clone_source,$new_type))
2628 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2631 $options =
$_POST[
'cp_options'] ?
$_POST[
'cp_options'] : array();
2633 $result = $orig->cloneAllObject(
$_COOKIE[
'PHPSESSID'],
$_COOKIE[
'ilClientId'], $new_type,
$ref_id, $clone_source, $options);
2659 case self::COPY_WIZARD_NEEDS_PAGE:
2676 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
2678 $sorting->savePost(
$_POST[
'position']);
2680 $this->ctrl->redirect($this,
"editOrder");
2700 $srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
2701 error_log(__METHOD__.
' cloning srcRef='.$srcRef.
' dstRef='.$dstRef.
'...');
2702 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2703 error_log(__METHOD__.
' ...cloning... newRef='.$newRef.
'...');
2708 if (! is_null($newName))
2710 $newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
2711 $newObj->setTitle($newName);
2716 $mapping[$newRef] = $srcRef;
2719 $children = $tree->getChilds($srcRef);
2720 foreach ($tree->getChilds($srcRef) as $child)
2724 if ($child[
"type"] !=
'rolf')
2726 $this->
cloneNodes($child[
"ref_id"],$newRef,$mapping);
2730 if (count($rolf = $tree->getChildsByType($newRef,
"rolf")))
2732 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2736 error_log(__METHOD__.
' ...cloned srcRef='.$srcRef.
' dstRef='.$dstRef.
' newRef='.$newRef);
2750 $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
2751 ilContainer_buildPath($a_item_data[
'ref_id'], $this->object->getRefId()),
2763 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2765 foreach($path_arr as
$data)
2771 $path .= $data[
'title'];
2786 global $ilTabs,
$tpl;
2791 $tpl->setContent($this->form->getHTML());
2793 $ilTabs->activateTab(
"obj_sty");
2803 $tpl->setTreeFlatIcon(
"",
"");
2804 $ilTabs->clearTargets();
2809 $ilTabs->setBackTarget($lng->txt(
"cntr_back_to_old_editor"),
2810 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
"_top");
2814 $ilTabs->setBackTarget($lng->txt(
"back"),
"./goto.php?target=".$this->object->getType().
"_".
2815 $this->
object->getRefId(),
"_top");
2818 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
2820 $this->
object->getId());
2821 $page_gui->
setStyleId($this->object->getStyleSheetId());
2822 $page_gui->setTabHook($this,
"addPageTabs");
2825 $ilCtrl->getHTML($page_gui);
2826 $ilTabs->setTabActive(
"obj_sty");
2828 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
2829 $lng->loadLanguageModule(
"style");
2831 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2834 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
2835 $style_id = $this->
object->getStyleSheetId();
2837 if ($fixed_style > 0)
2841 $this->lng->txt(
"global_fixed").
")");
2842 $this->form->addItem($st);
2849 $st_styles[0] = $this->lng->txt(
"default");
2859 $this->form->addItem($st);
2864 $this->form->addCommandButton(
"editStyle",
2865 $lng->txt(
"style_edit_style"));
2866 $this->form->addCommandButton(
"deleteStyle",
2867 $lng->txt(
"style_delete_style"));
2875 $st_styles,
false,
true);
2876 $style_sel =
new ilSelectInputGUI($lng->txt(
"style_current_style"),
"style_id");
2878 $style_sel->setValue($style_id);
2879 $this->form->addItem($style_sel);
2881 $this->form->addCommandButton(
"saveStyleSettings",
2883 $this->form->addCommandButton(
"createStyle",
2884 $lng->txt(
"sty_create_ind_style"));
2887 $this->form->setTitle($lng->txt(
"obj_sty"));
2888 $this->form->setFormAction($ilCtrl->getFormAction($this));
2898 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
2908 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
2918 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
2928 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
2929 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
2931 || $this->object->getStyleSheetId() == 0))
2934 $this->
object->update();
2937 $this->ctrl->redirect($this,
"editStyleProperties");
2954 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
2956 $item_list_gui->setContainerObject($this);
2958 $html = $item_list_gui->getListItemHTML(
$ref_id,
2976 if (!$rbacsystem->checkAccess(
"create",
$_GET[
'ref_id'], $new_type))
2978 $ilErr->raiseError($this->lng->txt(
'no_create_permission'),$ilErr->MESSAGE);
2980 $this->ctrl->setParameter($this,
"new_type", $new_type);
2981 $this->initImportForm($new_type);
2982 if ($this->form->checkInput())
2984 include_once
'./Services/Export/classes/class.ilImportContainer.php';
2986 $new_id = $imp->importObject(null, $_FILES[
"importfile"][
"tmp_name"],$_FILES[
"importfile"][
"name"], $new_type);
2996 $this->form->setValuesByPost();
2997 $tpl->setContent($this->form->getHtml());
3007 global
$tpl,$ilToolbar;
3015 include_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
3017 $ilToolbar->addButton(
3018 $this->lng->txt(
'mount_webfolder'),
3019 $davServer->getMountURI($this->object->getRefId()),
3022 $davServer->getFolderURI($this->object->getRefId())
3025 $tpl->setContent($this->form->getHTML());
3034 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3036 $this->form->setFormAction($this->ctrl->getFormAction($this));
3039 $ipass =
new ilPasswordInputGUI($this->lng->txt(
"desired_password"),
"new_password");
3042 $this->form->addItem($ipass);
3043 $this->form->addCommandButton(
"savePassword", $this->lng->txt(
"save"));
3044 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
3046 $this->form->setTitle($this->lng->txt(
"chg_ilias_and_webfolder_password"));
3047 $this->form->setFormAction($this->ctrl->getFormAction($this));
3061 if($form->checkInput())
3063 $ilUser->resetPassword($this->form->getInput(
'new_password'),$this->form->getInput(
'new_password'));
3068 $form->setValuesByPost();