4 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
5 require_once
"./Services/Container/classes/class.ilContainer.php";
6 include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
29 function ilContainerGUI($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
33 $this->rbacsystem =& $rbacsystem;
35 $lng->loadLanguageModule(
"cntr");
44 $this->
ilObjectGUI($a_data, $a_id, $a_call_by_reference,
false);
55 $next_class = $this->ctrl->getNextClass();
56 $cmd = $this->ctrl->getCmd(
"render");
61 case "ilcontainerpagegui":
62 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui")
65 $tpl->setContent(
$ret);
73 case "ilobjstylesheetgui":
93 $values = parent::getEditFormValues();
95 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
96 $values[
'didactic_type'] =
97 'dtpl_'.ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
108 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
110 $this->object->getRefId()
114 if($new_tpl_id != $current_tpl_id)
119 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
120 $this->ctrl->setReturn($this,
'edit');
121 $this->ctrl->setCmdClass(
'ildidactictemplategui');
122 $this->ctrl->setCmd(
'confirmTemplateSwitch');
124 return $this->ctrl->forwardCommand($dtpl_gui);
126 parent::afterUpdate();
137 $ilTabs->clearTargets();
139 $cmd = $ilCtrl->getCmd();
140 include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
141 $this->ctrl->setReturn($this,
"editStyleProperties");
142 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
144 if (
$cmd ==
"create" ||
$_GET[
"new_type"]==
"sty")
146 $style_gui->setCreationMode(
true);
149 if (
$cmd ==
"confirmedDelete")
151 $this->
object->setStyleSheetId(0);
152 $this->
object->update();
155 $ret = $this->ctrl->forwardCommand($style_gui);
157 if (
$cmd ==
"save" ||
$cmd ==
"copyStyle" ||
$cmd ==
"importStyle")
160 $this->
object->setStyleSheetId($style_id);
161 $this->
object->update();
162 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
174 $cmd = $ilCtrl->getCmd();
176 if (in_array(
$cmd, array(
"displayMediaFullscreen",
"downloadFile",
"displayMedia")))
185 $ilTabs->clearTargets();
187 if (
$_GET[
"redirectSource"] ==
"ilinternallinkgui")
196 $ilTabs->setBackTarget($lng->txt(
"cntr_back_to_old_editor"),
197 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
"_top");
201 $ilTabs->setBackTarget($lng->txt(
"back"),
"./goto.php?target=".$this->object->getType().
"_".
202 $this->
object->getRefId(),
"_top");
206 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
207 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
209 $lng->loadLanguageModule(
"content");
211 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
212 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
214 $this->tpl->setCurrentBlock(
"SyntaxStyle");
215 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
217 $this->tpl->parseCurrentBlock();
220 $this->object->getId()))
224 $new_page_object->setParentId($this->object->getId());
225 $new_page_object->setId($this->object->getId());
226 $new_page_object->createFromXML();
230 $this->ctrl->setReturnByClass(
"ilcontainerpagegui",
"edit");
232 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
234 $this->object->getStyleSheetId(), $this->
object->getType()));
236 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
237 $page_gui->setLinkXML($link_xml);
238 $page_gui->setFileDownloadLink(
"");
239 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"showMediaFullscreen"));
241 $page_gui->setPresentationTitle(
"");
242 $page_gui->setTemplateOutput(
false);
249 $wtpl =
new ilTemplate(
"tpl.cntr_old_editor_message.html",
true,
250 true,
"Services/Container");
251 $wtpl->setVariable(
"ALT_WARNING", $lng->txt(
"warning"));
252 $wtpl->setVariable(
"IMG_WARNING",
254 $wtpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_switch_to_new_editor_message"));
255 $wtpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_switch_to_new_editor_message"));
256 $wtpl->setVariable(
"HREF_SWITCH_TO_NEW_EDITOR",
257 $ilCtrl->getLinkTarget($this,
"useNewEditor"));
258 $wtpl->setVariable(
"TXT_MIGRATION_SWITCH",
259 $lng->txt(
"cntr_switch_to_new_editor_cmd"));
260 $page_gui->setPrependingHtml($wtpl->get());
264 $page_gui->setTabHook($this,
"addPageTabs");
266 $ret = $this->ctrl->forwardCommand($page_gui);
279 $ilTabs->addTarget(
"obj_sty",
280 $ilCtrl->getLinkTarget($this,
'editStyleProperties'),
"editStyleProperties");
290 if (!$ilSetting->get(
"enable_cat_page_edit"))
300 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
302 return $xpage->getContent();
310 include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
312 $this->object->getId()))
316 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
317 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
319 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
320 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
322 $this->tpl->setCurrentBlock(
"SyntaxStyle");
323 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
325 $this->tpl->parseCurrentBlock();
328 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
330 $lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(),
"cont");
332 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
334 $this->object->getStyleSheetId(), $this->
object->getType()));
336 $page_gui->setPresentationTitle(
"");
337 $page_gui->setTemplateOutput(
false);
338 $page_gui->setHeader(
"");
339 $ret = $page_gui->showPage();
352 if (parent::prepareOutput())
357 #$this->showPossibleSubObjects(); 361 include_once
'./Services/Container/classes/class.ilMemberViewGUI.php';
372 if (
$_GET[
"obj_id"] !=
"")
377 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
383 $mode = (
$_SESSION[
"il_rep_mode"] ==
"flat")
386 $link =
"ilias.php?baseClass=ilRepositoryGUI&cmd=frameset&set_mode=".$mode.
"&ref_id=".$this->
object->getRefId();
387 $tpl->setTreeFlatIcon($link, $mode);
399 $this->tpl->setTitle($this->object->getTitle());
400 $this->tpl->setDescription($this->object->getLongDescription());
404 if ($ilias->getSetting(
"custom_icons") &&
405 in_array($this->object->getType(), array(
"cat",
"grp",
"crs",
"root")))
407 require_once(
"./Services/Container/classes/class.ilContainer.php");
413 $this->tpl->setTitleIcon($icon, $this->lng->txt(
"obj_".$this->object->getType()));
415 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
417 $lgui->initItem($this->object->getRefId(), $this->
object->getId());
418 $this->tpl->setAlertProperties($lgui->getAlertProperties());
427 include_once
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
440 switch ($this->object->getViewMode())
444 include_once(
"./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
449 include_once(
'./Services/Container/classes/class.ilContainerObjectiveGUI.php');
456 include_once(
"./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
463 include_once(
"./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
468 return $container_view;
485 $ilTabs->activateSubTab(
"manage");
489 $ilTabs->activateSubTab(
"view_content");
492 $container_view->setOutput();
494 $this->adminCommands = $container_view->adminCommands;
498 if ($ilCtrl->getNextClass() !=
"ilcolumngui")
507 if ((
int)
$_GET[
"ref_id"] > 1 && $ilSetting->get(
"rep_tree_synchronize"))
509 $ilCtrl->setParameter($this,
"active_node", (
int)
$_GET[
"ref_id"]);
533 global $ilAccess,
$lng;
535 $lng->loadLanguageModule(
'cntr');
540 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
542 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
544 $this->ctrl->setParameter($this,
"type",
"");
545 $this->ctrl->setParameter($this,
"item_ref_id",
"");
549 if ($this->object->gotItems())
551 $toolbar->setLeadingImage(
555 $toolbar->addFormButton(
556 $this->lng->txt(
'delete_selected_items'),
559 $toolbar->addFormButton(
560 $this->lng->txt(
'move_selected_items'),
563 $toolbar->addFormButton(
564 $this->lng->txt(
'copy_selected_items'),
567 $toolbar->addFormButton(
568 $this->lng->txt(
'link_selected_items'),
573 if ($folder_set->get(
"enable_multi_download") ==
true)
575 $toolbar->addSeparator();
576 $toolbar->addFormButton(
577 $this->lng->txt(
'download_selected_items'),
582 if($this->object->getType() ==
'crs' or $this->
object->getType() ==
'grp')
584 if($this->object->gotItems())
586 $toolbar->addSeparator();
590 $this->lng->txt(
'cntr_adopt_content'),
591 $this->ctrl->getLinkTargetByClass(
602 $toolbar->addFormButton(
603 $this->lng->txt(
'paste_clipboard_items'),
607 if(
$_SESSION[
"clipboard"][
"cmd"] ==
"link")
617 $toolbar->addFormButton(
618 $this->lng->txt(
'clear_clipboard'),
624 $toolbar->addSeparator();
625 $toolbar->addFormButton(
626 $this->lng->txt(
'download_selected_items'),
632 $GLOBALS[
'tpl']->addAdminPanelToolbar(
634 ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ?
true :
false,
635 ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ?
true :
false 639 if ($this->object->gotItems())
641 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
646 if ($this->edit_order)
648 if($this->object->gotItems() and $ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
650 include_once(
'./Services/Container/classes/class.ilContainer.php');
655 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
657 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
659 $this->ctrl->setParameter($this,
"type",
"");
660 $this->ctrl->setParameter($this,
"item_ref_id",
"");
662 $toolbar->addFormButton(
663 $this->lng->txt(
'sorting_save'),
667 $GLOBALS[
'tpl']->addAdminPanelToolbar($toolbar,
true,
false);
682 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
684 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
686 $this->ctrl->setParameter($this,
"type",
"");
687 $this->ctrl->setParameter($this,
"item_ref_id",
"");
689 $toolbar->addFormButton(
690 $this->lng->txt(
'download_selected_items'),
694 $GLOBALS[
'tpl']->addAdminPanelToolbar(
696 $this->object->gotItems() ? true :
false,
697 $this->
object->gotItems() ? true : false
707 if(!$tree->checkForParentType($this->object->getRefId(),
'crs'))
711 $tpl->setCurrentBlock(
"custom_button");
712 $tpl->setVariable(
"ADMIN_MODE_LINK",$this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editTimings'));
713 $tpl->setVariable(
"TXT_ADMIN_MODE",$this->lng->txt(
'timings_edit'));
714 $tpl->parseCurrentBlock();
722 $GLOBALS[
"tpl"]->setPermanentLink($this->object->getType(),
723 $this->
object->getRefId(),
"",
"_top");
734 $ilCtrl->redirect($this,
"editPageFrame");
745 $ilCtrl->redirect($this,
"editPageFrame");
755 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
757 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
774 $ilCtrl->redirect($this,
"editPageFrame");
782 include_once(
"Services/Frameset/classes/class.ilFramesetGUI.php");
785 $fs_gui->setFramesetTitle($this->object->getTitle());
786 $fs_gui->setMainFrameName(
"content");
787 $fs_gui->setSideFrameName(
"tree");
792 if ($xpage_id > 0 &&
$_SESSION[
"il_cntr_editor"] !=
"std")
794 $fs_gui->setMainFrameSource(
795 $this->ctrl->getLinkTarget(
796 $this,
"editPageContent"));
797 $fs_gui->setSideFrameSource(
798 $this->ctrl->getLinkTarget($this,
"showLinkList"));
802 $this->ctrl->redirectByClass(array(
"ilcontainerpagegui"),
"edit");
819 if (!$rbacsystem->checkAccess(
"write", $this->ref_id))
821 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_write"),$this->
ilias->error_obj->MESSAGE);
828 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
830 $content = $xpage->getContent();
834 $tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.container_edit_page_content.html",
835 "Services/Container");
837 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
838 $tpl->setVariable(
"TXT_EDIT_PAGE_CONTENT",
839 $this->lng->txt(
"edit_page_content"));
840 $tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
841 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
842 $tpl->setVariable(
"TXT_MIGRATION_INFO", $lng->txt(
"cntr_old_editor_warning"));
843 $tpl->setVariable(
"TXT_MIGRATION_OPEN_STD_EDITOR", $lng->txt(
"cntr_old_editor_open_standard_editor"));
845 $tpl->setVariable(
"HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this,
"switchToStdEditor"));
846 $tpl->setVariable(
"ALT_WARNING", $lng->txt(
"warning"));
848 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
849 include_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
854 include_once
"./Services/RTE/classes/class.ilRTE.php";
856 include_once
"./Services/RTE/classes/class.$rtestring.php";
857 $rte =
new $rtestring();
859 include_once
"./Services/Object/classes/class.ilObject.php";
862 $rte->addRTESupport(
$obj_id, $obj_type);
869 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
870 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
890 $xpage->setContent($text);
896 $xpage->setContent($text);
899 "xhtml_page", $xpage->getId());
902 include_once(
"Services/RTE/classes/class.ilRTE.php");
904 $this->
object->getId());
907 $this->ctrl->redirect($this,
"");
912 $this->ctrl->redirect($this,
"");
920 "Services/Container");
922 $type_ordering = array(
923 "cat",
"fold",
"crs",
"grp",
"chat",
"frm",
"lres",
924 "glo",
"webr",
"file",
"exc",
925 "tst",
"svy",
"mep",
"qpl",
"spl");
927 $childs = $tree->getChilds(
$_GET[
"ref_id"]);
928 foreach($childs as $child)
930 if (in_array($child[
"type"], array(
"lm",
"dbk",
"sahs",
"htlm")))
936 $cnt[$child[
"type"]]++;
941 $tpl->setVariable(
"TXT_HELP_HEADER", $lng->txt(
"help"));
942 foreach($type_ordering as $type)
944 $tpl->setCurrentBlock(
"row");
945 $tpl->setVariable(
"ROWCOL",
"tblrow".((($i++)%2)+1));
948 $tpl->setVariable(
"TYPE", $lng->txt(
"objs_".$type).
949 " (".((int)$cnt[$type]).
")");
953 $tpl->setVariable(
"TYPE", $lng->txt(
"learning_resources").
954 " (".((int)$cnt[
"lres"]).
")");
956 $tpl->setVariable(
"TXT_LINK",
"[list-".$type.
"]");
957 $tpl->parseCurrentBlock();
969 $this->adminCommands =
false;
1001 $tpl =
new ilTemplate(
"tpl.container_list_block.html",
true,
true,
1002 "Services/Container");
1003 $this->cur_row_type =
"row_type_1";
1017 $title = $this->lng->txt(
"objs_".$a_type);
1021 $a_tpl->setCurrentBlock(
"container_header_row_image");
1022 $a_tpl->setVariable(
"HEADER_IMG", $icon);
1023 $a_tpl->setVariable(
"HEADER_ALT", $title);
1027 $a_tpl->setCurrentBlock(
"container_header_row");
1030 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT", $title);
1031 $a_tpl->parseCurrentBlock();
1032 $a_tpl->touchBlock(
"container_row");
1045 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1049 $a_tpl->touchBlock($this->cur_row_type);
1052 if ($this->
ilias->getSetting(
"icon_position_in_lists") ==
"item_rows")
1055 $alt = $this->lng->txt(
"obj_".$a_image_type);
1058 if ($this->
ilias->getSetting(
"custom_icons") &&
1059 in_array($a_image_type, array(
"cat",
"grp",
"crs")))
1061 require_once(
"./Services/Container/classes/class.ilContainer.php");
1068 $a_tpl->setCurrentBlock(
"block_row_image");
1069 $a_tpl->setVariable(
"ROW_IMG", $icon);
1070 $a_tpl->setVariable(
"ROW_ALT", $alt);
1071 $a_tpl->parseCurrentBlock();
1077 $a_tpl->setCurrentBlock(
"block_row_check");
1078 $a_tpl->setVariable(
"ITEM_ID", $a_item_ref_id);
1079 $a_tpl->parseCurrentBlock();
1082 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
1086 $a_tpl->setCurrentBlock(
'block_position');
1087 $a_tpl->setVariable(
'POS_TYPE',$a_image_type);
1088 $a_tpl->setVariable(
'POS_ID',$a_item_ref_id);
1089 $a_tpl->setVariable(
'POSITION',sprintf(
'%.1f',$this->current_position++));
1090 $a_tpl->parseCurrentBlock();
1094 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1096 $a_tpl->setCurrentBlock(
"container_standard_row");
1097 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
1098 $a_tpl->parseCurrentBlock();
1099 $a_tpl->touchBlock(
"container_row");
1107 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1111 $a_tpl->touchBlock($this->cur_row_type);
1113 $type = $this->lng->txt(
"obj_".$a_type);
1114 $a_message = str_replace(
"[type]", $type, $a_message);
1116 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1118 $a_tpl->setCurrentBlock(
"container_standard_row");
1119 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT",
1121 $a_tpl->parseCurrentBlock();
1122 $a_tpl->touchBlock(
"container_row");
1127 $this->cur_row_type =
"";
1139 || strtolower($this->ctrl->getCmdClass()) !=
"ilcontainerpagegui")
1144 $lng->loadLanguageModule(
"content");
1149 $this->tabs_gui->setBackTarget($this->lng->txt(
"obj_cat"),
1150 $this->ctrl->getLinkTarget($this,
"frameset"),
1153 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view")
1154 , array(
"",
"view"),
"ilcontainerpagegui");
1166 if (!is_object($this->
object))
1171 if ($a_include_view && $ilAccess->checkAccess(
"read",
"", $this->object->getRefId()))
1175 $ilTabs->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTarget($this,
""));
1179 $ilTabs->addSubTab(
"view_content", $lng->txt(
"view"), $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel"));
1183 if ( $ilUser->getId() != ANONYMOUS_USER_ID &&
1184 ($this->adminCommands ||
1185 (is_object($this->
object) &&
1186 ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())))
1188 (is_object($this->
object) &&
1189 ($this->
object->getHiddenFilesFound())) ||
1196 $ilTabs->addSubTab(
"manage", $lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
1200 $ilTabs->addSubTab(
"manage", $lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel"));
1203 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1204 is_object($this->
object) &&
1205 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())
1209 $ilTabs->addSubTab(
"ordering", $lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
1211 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
1212 is_object($this->
object) &&
1213 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())
1216 if ($ilSetting->get(
"enable_cat_page_edit"))
1218 $ilTabs->addSubTab(
"page_editor", $lng->txt(
"cntr_text_media_editor"), $ilCtrl->getLinkTarget($this,
"editPageFrame"),
1234 if ($rbacsystem->checkAccess(
'edit_permission',$this->ref_id))
1236 $tabs_gui->addTarget(
"perm_settings",
1237 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1238 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
1239 if ($ilCtrl->getNextClass() ==
"ilpermissiongui")
1241 $tabs_gui->activateTab(
"perm_settings");
1246 if (strtolower(
$_GET[
"baseClass"]) ==
"ilrepositorygui" && !empty(
$_SESSION[
"clipboard"]))
1248 $tabs_gui->addTarget(
"clipboard",
1249 $this->ctrl->getLinkTarget($this,
"clipboard"),
"clipboard", get_class($this));
1264 $_SESSION[
"il_cont_admin_panel"] =
true;
1265 $this->ctrl->redirect($this,
"render");
1273 $_SESSION[
"il_cont_admin_panel"] =
false;
1274 $this->ctrl->redirect($this,
"render");
1284 $this->edit_order =
true;
1285 $_SESSION[
"il_cont_admin_panel"] =
false;
1288 $ilTabs->activateSubTab(
"ordering");
1297 return $this->edit_order ? true :
false;
1320 if((
int)$ilSetting->get(
'disable_my_offers'))
1325 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1338 if((
int)$ilSetting->get(
'disable_my_offers'))
1343 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1351 $this->multi_download_enabled =
true;
1365 if (!$rbacsystem->checkAccess(
"write",
$_GET[
'item_ref_id']))
1367 $this->ilErr->raiseError($this->lng->txt(
'err_no_permission'),$this->ilErr->MESSAGE);
1371 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
1374 require_once
'Services/WebDAV/classes/class.ilDAVLocks.php';
1378 $ilUser->getId(), $ilUser->getLogin(),
1379 'ref_'.$_GET[
'item_ref_id'].
'_usr_'.$ilUser->getId(),
1380 time() + 60, 0,
'exclusive' 1403 if (
$_GET[
"item_ref_id"] !=
"")
1410 if (!isset(
$_POST[
"id"]))
1412 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1419 $node_data = $this->tree->getNodeData($ref_id);
1420 $subtree_nodes = $this->tree->getSubTree($node_data);
1422 $all_node_data[] = $node_data;
1423 $all_subtree_nodes[] = $subtree_nodes;
1426 foreach ($subtree_nodes as $node)
1428 if($node[
'type'] ==
'rolf')
1433 if (!$rbacsystem->checkAccess(
'delete',$node[
"ref_id"]))
1435 $no_cut[] = $node[
"ref_id"];
1442 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_cut").
" ".implode(
',',$this->
getTitlesByRefId($no_cut)),
1443 $this->
ilias->error_obj->MESSAGE);
1446 $_SESSION[
"clipboard"][
"cmd"] = $ilCtrl->getCmd();
1465 if (
$_GET[
"item_ref_id"] !=
"")
1470 if (!isset(
$_POST[
"id"]))
1472 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1480 $node_data = $this->tree->getNodeData($ref_id);
1483 if ($objDefinition->isContainer($node_data[
"type"]))
1488 $subtree_nodes = $this->tree->getSubTree($node_data);
1490 $all_node_data[] = $node_data;
1491 $all_subtree_nodes[] = $subtree_nodes;
1494 foreach ($subtree_nodes as $node)
1496 if($node[
'type'] ==
'rolf')
1501 if (!$rbacsystem->checkAccess(
'visible,read,copy',$node[
"ref_id"]))
1503 $no_copy[] = $node[
"ref_id"];
1508 if ($containers > 0 && count(
$_POST[
"id"]) > 1)
1510 $this->
ilias->raiseError($this->lng->txt(
"cntr_container_only_on_their_own"), $this->
ilias->error_obj->MESSAGE);
1514 if (count($no_copy))
1516 $this->
ilias->raiseError(
1517 $this->lng->txt(
"msg_no_perm_copy") .
" " . implode(
',',$this->
getTitlesByRefId($no_copy)),
1518 $this->
ilias->error_obj->MESSAGE);
1522 if (count(
$_POST[
"id"]) == 1)
1524 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id",
$_POST[
"id"][0]);
1525 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1529 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
$_POST[
"id"],
"_"));
1530 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1534 $_SESSION[
"clipboard"][
"cmd"] = $ilCtrl->getCmd();
1546 if (
$_GET[
"item_ref_id"] !=
"")
1551 if (!isset(
$_POST[
"id"]))
1553 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1559 $object =& $this->
ilias->obj_factory->getInstanceByRefId($ref_id);
1560 $obj_type =
$object->getType();
1561 if (!in_array($obj_type, array(
"fold",
"file")))
1563 $no_download[] =
$object->getType();
1565 else if (!$rbacsystem->checkAccess(
'read', $ref_id))
1572 if (count($no_download))
1574 $no_download = array_unique($no_download);
1575 foreach ($no_download as $type)
1577 $txt_objs[] = $this->lng->txt(
"objs_".$type);
1579 $this->
ilias->raiseError(implode(
', ',$txt_objs).
" ".$this->lng->txt(
"msg_obj_no_download"),$this->
ilias->error_obj->MESSAGE);
1583 if (count($no_perm))
1585 $this->
ilias->raiseError(
1586 $this->lng->txt(
"msg_obj_perm_download").
" ".implode(
',',$no_perm),
1587 $this->
ilias->error_obj->MESSAGE);
1596 global
$lng, $rbacsystem, $ilAccess;
1598 include_once
"./Services/Utilities/classes/class.ilUtil.php";
1599 include_once
'Modules/Folder/classes/class.ilObjFolder.php';
1600 include_once
'Modules/File/classes/class.ilObjFile.php';
1601 include_once
'Modules/File/classes/class.ilFileException.php';
1611 foreach ($a_ref_ids as
$ref_id)
1613 if (!$ilAccess->checkAccess(
"read",
"", $ref_id))
1620 $object =& $this->
ilias->obj_factory->getInstanceByRefId($ref_id);
1621 $obj_type =
$object->getType();
1622 if ($obj_type ==
"fold")
1625 self::recurseFolder($ref_id,
$object->getTitle(), $tmpdir);
1627 else if ($obj_type ==
"file")
1635 $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) .
".zip";
1657 global $rbacsystem,
$tree, $ilAccess;
1662 $subtree = $tree->getChildsByTypeFilter($refid, array(
"fold",
"file"));
1664 foreach ($subtree as $child)
1666 if (!$ilAccess->checkAccess(
"read",
"", $child[
"ref_id"]))
1672 if ($child[
"type"] ==
"fold")
1673 self::recurseFolder($child[
"ref_id"], $child[
"title"], $tmpdir);
1675 self::copyFile($child[
"obj_id"], $child[
"title"], $tmpdir);
1685 if (!copy($oldFilename, $newFilename))
1686 throw new ilFileException(
"Could not copy ".$oldFilename.
" to ".$newFilename);
1688 touch($newFilename, filectime($oldFilename));
1699 global $clipboard, $rbacsystem, $rbacadmin,
$ilCtrl;
1701 if (
$_GET[
"item_ref_id"] !=
"")
1706 if (!isset(
$_POST[
"id"]))
1708 $this->
ilias->raiseError($this->lng->txt(
"no_checkbox"),$this->
ilias->error_obj->MESSAGE);
1714 if (!$rbacsystem->checkAccess(
'delete',$ref_id))
1719 $object =& $this->
ilias->obj_factory->getInstanceByRefId($ref_id);
1721 if (!$this->objDefinition->allowLink(
$object->getType()))
1723 $no_link[] =
$object->getType();
1730 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_link").
" ".
1731 implode(
',',$no_cut),$this->
ilias->error_obj->MESSAGE);
1734 if (count($no_link))
1737 $this->
ilias->raiseError($this->lng->txt(
"msg_obj_no_link"),$this->
ilias->error_obj->MESSAGE);
1744 $clipboard[
"parent"] =
$_GET[
"ref_id"];
1745 $clipboard[
"cmd"] = $ilCtrl->getCmd();
1747 foreach (
$_POST[
"id"] as $ref_id)
1749 $clipboard[
"ref_ids"][] =
$ref_id;
1755 if(count($clipboard[
"ref_ids"]) == 1)
1779 if (isset(
$_POST[
"cmd"][
"clear"]))
1783 $this->ctrl->redirect($this,
'render');
1789 global $rbacsystem, $rbacadmin, $rbacreview,
$log,
$tree, $ilObjDataCache,
$ilUser;
1791 $command =
$_SESSION[
'clipboard'][
'cmd'];
1792 if(!in_array($command, array(
'cut',
'link',
'copy')))
1794 $message = __METHOD__.
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1795 $this->
ilias->raiseError($message, $this->
ilias->error_obj->WARNING);
1798 if($command ==
'cut')
1801 $_POST[
'nodes'] = array($_POST[
'node']);
1804 if(!is_array(
$_POST[
'nodes']) || !count(
$_POST[
'nodes']))
1823 $folder_objects_cache = array();
1827 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1829 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1831 if(!array_key_exists($folder_ref_id, $folder_objects_cache))
1837 if(!$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType()))
1839 $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().
']');
1843 if($folder_ref_id == $current_parent_id)
1845 $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().
']');
1849 if ($tree->isGrandChild($ref_id, $folder_ref_id) ||
1850 $ref_id == $folder_ref_id)
1852 $is_child[] = sprintf($this->lng->txt(
'msg_paste_object_not_in_itself'), $obj_data->getTitle().
' ['.$obj_data->getRefId().
']');
1856 if(!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects())))
1858 $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().
']',
1859 $GLOBALS[
'lng']->txt(
'obj_'.$obj_data->getType()));
1866 if(count($exists) && $command !=
"copy")
1868 $error .= implode(
'<br />', $exists);
1871 if(count($is_child))
1873 $error .= $error !=
'' ?
'<br />' :
'';
1874 $error .= implode(
'<br />', $is_child);
1877 if(count($not_allowed_subobject))
1879 $error .= $error !=
'' ?
'<br />' :
'';
1880 $error .= implode(
'<br />', $not_allowed_subobject);
1883 if(count($no_paste))
1885 $error .= $error !=
'' ?
'<br />' :
'';
1886 $error .= implode(
'<br />', $no_paste);
1908 $log->write(__METHOD__.
", cmd: ".$command);
1914 $ref_ids =
$_SESSION[
'clipboard'][
'ref_ids'];
1915 unset(
$_SESSION[
'clipboard'][
'ref_ids']);
1918 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1922 if($command ==
'copy')
1924 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1926 foreach($ref_ids as $ref_id)
1928 $revIdMapping = array();
1930 $oldNode_data = $tree->getNodeData($ref_id);
1931 if ($oldNode_data[
'parent'] == $folder_ref_id)
1933 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
1935 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1939 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, null);
1943 $old_parent_data = $tree->getParentNodeData($ref_id);
1944 $newNode_data = $tree->getNodeData($newRef);
1946 $oldNode_data[
'obj_id'], $ilUser->getId());
1948 $ilObjDataCache->lookupObjId($folder_ref_id));
1958 if($command ==
'cut')
1960 foreach(
$_POST[
'nodes'] as $folder_ref_id)
1962 foreach($ref_ids as $ref_id)
1965 $old_parent = $tree->getParentId($ref_id);
1966 $tree->moveTree($ref_id, $folder_ref_id);
1967 $rbacadmin->adjustMovedObjectPermissions($ref_id, $old_parent);
1969 include_once(
'./Services/AccessControl/classes/class.ilConditionHandler.php');
1973 $node_data = $tree->getNodeData($ref_id);
1974 $old_parent_data = $tree->getNodeData($old_parent);
1976 $old_parent_data[
'obj_id']);
1978 $ilObjDataCache->lookupObjId($folder_ref_id));
1991 if($command ==
'link')
1993 $linked_to_folders = array();
1995 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1998 foreach(
$_POST[
'nodes'] as $folder_ref_id)
2000 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2002 foreach($ref_ids as $ref_id)
2005 $top_node = $tree->getNodeData($ref_id);
2008 $subnodes[
$ref_id] = $tree->getSubtree($top_node);
2012 foreach($subnodes as $key => $subnode)
2016 $new_ref_id = $obj_data->createReference();
2017 $obj_data->putInTree($folder_ref_id);
2018 $obj_data->setPermissions($folder_ref_id);
2021 if($rbac_log_active)
2023 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id,
false);
2029 $node_data = $tree->getNodeData($new_ref_id);
2031 $ilObjDataCache->lookupObjId($folder_ref_id));
2036 $log->write(__METHOD__.
', link finished');
2039 $linked_targets = array();
2040 if(count($linked_to_folders))
2042 require_once
'Services/Link/classes/class.ilLink.php';
2043 foreach($linked_to_folders as $ref_id => $title)
2045 $linked_targets[] =
'<a href="' .
ilLink::_getLink($ref_id) .
'">' . $title .
'</a>';
2050 if(count($ref_ids) == 1)
2054 ilUtil::sendSuccess(sprintf($this->lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix), implode(
', ', $linked_targets)),
true);
2060 $this->ctrl->returnToParent($this);
2068 $_SESSION[
'paste_linked_repexpand'] = array();
2074 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
2075 foreach((array)
$path as $node_id)
2077 if(!in_array($node_id,
$_SESSION[
'paste_linked_repexpand']))
2078 $_SESSION[
'paste_linked_repexpand'][] = $node_id;
2089 global $ilTabs, $ilToolbar;
2091 $ilTabs->setTabActive(
'view_content');
2093 if(!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'link',
'copy',
'cut')))
2095 $message = __METHOD__.
": Unknown action.";
2096 $this->
ilias->raiseError($message, $this->
ilias->error_obj->WARNING);
2102 if ($exp->handleCommand())
2106 $output = $exp->getHTML();
2108 $txt_var = (
$cmd ==
"copy")
2114 $t->setFormAction($this->ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
2116 include_once(
"./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2118 $b->setCaption($txt_var);
2119 $b->setCommand(
"performPasteIntoMultipleObjects");
2122 $t->addStickyItem($b);
2125 $this->lng->loadLanguageModule(
'obj');
2126 $t->addFormButton($this->lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
2128 $t->addFormButton($this->lng->txt(
"cancel"),
"cancelMoveLink");
2129 $t->setCloseFormTag(
false);
2131 $output =
$t->getHTML().$output;
2133 $t->setCloseFormTag(
true);
2134 $t->setOpenFormTag(
false);
2135 $output.=
"<br />".$t->getHTML();
2137 $this->tpl->setContent($output);
2198 $GLOBALS[
'ilCtrl']->returnToParent($this);
2207 $GLOBALS[
'ilCtrl']->returnToParent($this);
2216 $_SESSION[
'paste_copy_repexpand'] = array();
2222 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
2223 foreach((array)
$path as $node_id)
2225 if(!in_array($node_id,
$_SESSION[
'paste_copy_repexpand']))
2226 $_SESSION[
'paste_copy_repexpand'][] = $node_id;
2285 $_SESSION[
'paste_cut_repexpand'] = array();
2291 $path = $tree->getPathId((
int)
$_GET[
'ref_id']);
2292 foreach((array)
$path as $node_id)
2294 if(!in_array($node_id,
$_SESSION[
'paste_cut_repexpand']))
2295 $_SESSION[
'paste_cut_repexpand'][] = $node_id;
2358 global $rbacsystem, $rbacadmin, $rbacreview,
$log,
$tree;
2362 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
2366 if (!in_array(
$_SESSION[
"clipboard"][
"cmd"],array(
"cut",
"link",
"copy")))
2368 $message = get_class($this).
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2369 $this->
ilias->raiseError($message,$this->
ilias->error_obj->WARNING);
2375 $obj_data =& $this->
ilias->obj_factory->getInstanceByRefId($ref_id);
2378 if (!$rbacsystem->checkAccess(
'create',$this->object->getRefId(), $obj_data->getType()))
2381 $no_paste_titles[] = $obj_data->getTitle();
2385 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId()))
2392 if ($this->tree->isGrandChild($ref_id,$this->object->getRefId()))
2397 if ($ref_id == $this->object->getRefId())
2403 $obj_type = $obj_data->getType();
2405 if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects())))
2407 $not_allowed_subobject[] = $obj_data->getType();
2414 if (count($exists) &&
$_SESSION[
"clipboard"][
"cmd"] !=
"copy")
2417 $this->
ilias->raiseError($this->lng->txt(
"msg_obj_exists"),$this->
ilias->error_obj->MESSAGE);
2420 if (count($is_child))
2422 $this->
ilias->raiseError($this->lng->txt(
"msg_not_in_itself").
" ".implode(
',',$is_child),
2423 $this->
ilias->error_obj->MESSAGE);
2426 if (count($not_allowed_subobject))
2428 $this->
ilias->raiseError($this->lng->txt(
"msg_may_not_contain").
" ".implode(
',',$not_allowed_subobject),
2429 $this->
ilias->error_obj->MESSAGE);
2432 if (count($no_paste))
2434 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_paste").
" ".
2435 implode(
',',$no_paste),$this->
ilias->error_obj->MESSAGE);
2439 $log->write(
"ilObjectGUI::pasteObject(), cmd: ".
$_SESSION[
"clipboard"][
"cmd"]);
2445 $ref_ids =
$_SESSION[
"clipboard"][
"ref_ids"];
2446 unset(
$_SESSION[
"clipboard"][
"ref_ids"]);
2450 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"copy")
2455 if (count($ref_ids) == 1)
2457 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->object->getRefId());
2458 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
2459 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
2463 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->object->getRefId());
2464 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode($ref_ids,
"_"));
2465 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
2499 $log->write(
"ilObjectGUI::pasteObject(), copy finished");
2504 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut")
2507 foreach($ref_ids as $ref_id)
2510 $old_parent = $tree->getParentId($ref_id);
2511 $this->tree->moveTree($ref_id,$this->object->getRefId());
2512 $rbacadmin->adjustMovedObjectPermissions($ref_id,$old_parent);
2514 include_once(
'./Services/AccessControl/classes/class.ilConditionHandler.php');
2518 $node_data = $tree->getNodeData($ref_id);
2519 $old_parent_data = $tree->getNodeData($old_parent);
2521 $old_parent_data[
'obj_id']);
2523 $this->
object->getId());
2530 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"link")
2532 foreach ($ref_ids as $ref_id)
2535 $top_node = $this->tree->getNodeData($ref_id);
2538 $subnodes[
$ref_id] = $this->tree->getSubtree($top_node);
2542 foreach ($subnodes as $key => $subnode)
2545 $obj_data =& $this->
ilias->obj_factory->getInstanceByRefId($key);
2546 $new_ref_id = $obj_data->createReference();
2547 $obj_data->putInTree(
$_GET[
"ref_id"]);
2548 $obj_data->setPermissions(
$_GET[
"ref_id"]);
2551 $node_data = $tree->getNodeData($new_ref_id);
2553 $this->
object->getId());
2558 $log->write(
"ilObjectGUI::pasteObject(), link finished");
2565 $last_cmd =
$_SESSION[
"clipboard"][
"cmd"];
2571 if ($last_cmd ==
"cut")
2576 else if ($last_cmd ==
"copy")
2580 else if ($last_cmd ==
'link')
2586 $this->ctrl->returnToParent($this);
2679 $ilTabs->activateTab(
"clipboard");
2684 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2685 $ilLog->write($message,$ilLog->FATAL);
2686 $ilErr->raiseError($this->lng->txt(
"permission_denied"),$ilErr->WARNING);
2698 "type" => $tmp_obj->getType(),
2699 "type_txt" => $this->lng->txt(
"obj_".$tmp_obj->getType()),
2700 "title" => $tmp_obj->getTitle(),
2701 "cmd" => (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") ? $this->lng->txt(
"move") :$this->lng->txt(
$_SESSION[
"clipboard"][
"cmd"]),
2703 "obj_id" => $tmp_obj->getId()
2709 include_once(
"./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2712 $tpl->setContent(
$tab->getHTML());
2714 if (count(
$data) > 0)
2716 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
2717 $ilToolbar->addFormButton($lng->txt(
"insert_object_here"),
2719 $ilToolbar->addFormButton($lng->txt(
"clear_clipboard"),
2733 if ($this->
ilias->getSetting(
"custom_icons"))
2788 $custom_icon = $this->
object->getCustomIconPath();
2794 $title->setTitle($this->lng->txt(
"icon_settings"));
2800 $a_form->addItem($title);
2824 $caption = $this->lng->txt(
"cont_custom_icon");
2826 $icon->setSuffixes(array(
"svg"));
2827 $icon->setImage($custom_icon);
2830 $a_form->addItem($icon);
2834 $title->addSubItem($icon);
2864 $this->object->getRefId() &&
2865 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
2870 return $_SESSION[
"il_cont_admin_panel"];
2879 parent::setColumnSettings($column_gui);
2881 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
2885 $column_gui->setEnableMovement(
true);
2888 $column_gui->setRepositoryItems(
2889 $this->object->getSubItems($this->isActiveAdministrationPanel(),
true));
2893 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
2895 $column_gui->setBlockProperty(
"news",
"settings",
true);
2897 $column_gui->setBlockProperty(
"news",
"default_visibility_option",
true);
2898 $column_gui->setBlockProperty(
"news",
"hide_news_block_option",
true);
2903 $column_gui->setAdminCommands(
true);
2955 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2957 global $ilObjDataCache,
$tree;
2962 if(isset(
$_SESSION[
'wizard_search_title']))
2964 $this->searchCloneSourceObject();
2974 $this->ctrl->setParameter($this,
'clone_source',(
int)
$_REQUEST[
'clone_source']);
2975 $this->ctrl->setParameter($this,
'new_type',$new_type);
2979 $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
2980 $this->tpl->setVariable(
'BODY_ATTRIBUTES',
'onload="ilDisableChilds(\'cmd\');"');
2983 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.container_wizard_page.html',
2984 "Services/Container");
2985 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
2987 $this->tpl->setVariable(
'ALT_IMG',$this->lng->txt(
'obj_'.$new_type));
2988 $this->tpl->setVariable(
'TXT_DUPLICATE',$this->lng->txt($new_type.
'_wizard_page'));
2989 $this->tpl->setVariable(
'INFO_DUPLICATE',$this->lng->txt($new_type.
'_copy_threads_info'));
2990 $this->tpl->setVariable(
'BTN_COPY',$this->lng->txt(
'obj_'.$new_type.
'_duplicate'));
2991 $this->tpl->setVariable(
'BTN_BACK',$this->lng->txt(
'btn_back'));
2992 if(isset(
$_SESSION[
'wizard_search_title']))
2994 $this->tpl->setVariable(
'CMD_BACK',
'searchCloneSource');
2998 $this->tpl->setVariable(
'CMD_BACK',
'create');
3001 $this->tpl->setVariable(
'BTN_TREE',$this->lng->txt(
'treeview'));
3002 $this->tpl->setVariable(
'BTN_LIST',$this->lng->txt(
'flatview'));
3010 foreach($subnodes = $tree->getSubtree($source_node = $tree->getNodeData($source_id),
true) as $node)
3018 if($node[
'type'] ==
'rolf')
3025 for($i = $source_node[
'depth'];$i < $node[
'depth']; $i++)
3027 $this->tpl->touchBlock(
'padding');
3028 $this->tpl->touchBlock(
'end_padding');
3032 $copy_wizard_page->fillTreeSelection($node[
'ref_id'],$node[
'type'],$node[
'depth']);
3034 $this->tpl->setCurrentBlock(
'tree_row');
3036 $this->tpl->setVariable(
'TREE_ALT_IMG',$this->lng->txt(
'obj_'.$node[
'type']));
3037 $this->tpl->setVariable(
'TREE_TITLE',$node[
'title']);
3038 $this->tpl->parseCurrentBlock();
3042 $this->tpl->setCurrentBlock(
'no_content');
3043 $this->tpl->setVariable(
'TXT_NO_CONTENT',$this->lng->txt(
'container_no_items'));
3044 $this->tpl->parseCurrentBlock();
3048 $this->tpl->setCurrentBlock(
'tree_footer');
3049 $this->tpl->setVariable(
'TXT_COPY_ALL',$this->lng->txt(
'copy_all'));
3050 $this->tpl->setVariable(
'TXT_LINK_ALL',$this->lng->txt(
'link_all'));
3051 $this->tpl->setVariable(
'TXT_OMIT_ALL',$this->lng->txt(
'omit_all'));
3052 $this->tpl->parseCurrentBlock();
3058 foreach($tree->getSubTreeTypes($source_id,array(
'rolf',
'crs')) as $type)
3061 if(strlen(
$html = $copy_wizard_page->getWizardPageBlockHTML()))
3063 $this->tpl->setCurrentBlock(
'obj_row');
3064 $this->tpl->setVariable(
'ITEM_BLOCK',
$html);
3065 $this->tpl->parseCurrentBlock();
3082 include_once(
'./Services/Link/classes/class.ilLink.php');
3083 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
3089 $clone_source = (int)
$_REQUEST[
'clone_source'];
3091 if(!$rbacsystem->checkAccess(
'create',
$ref_id,$new_type))
3093 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
3101 if(!$ilAccess->checkAccess(
'write',
'', $clone_source,$new_type))
3103 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
3110 include_once
'./Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
3114 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$result[
'ref_id']);
3115 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
3120 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
3121 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
3135 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
3139 $positions = str_replace(
',',
'.',
$_POST[
'position']);
3141 $sorting->savePost($positions);
3143 $this->ctrl->redirect($this,
"editOrder");
3163 $srcObj =& $ilias->obj_factory->getInstanceByRefId($srcRef);
3164 error_log(__METHOD__.
' cloning srcRef='.$srcRef.
' dstRef='.$dstRef.
'...');
3165 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
3166 error_log(__METHOD__.
' ...cloning... newRef='.$newRef.
'...');
3171 if (! is_null($newName))
3173 $newObj =& $ilias->obj_factory->getInstanceByRefId($newRef);
3174 $newObj->setTitle($newName);
3179 $mapping[$newRef] = $srcRef;
3182 $children = $tree->getChilds($srcRef);
3183 foreach ($tree->getChilds($srcRef) as $child)
3187 if ($child[
"type"] !=
'rolf')
3189 $this->
cloneNodes($child[
"ref_id"],$newRef,$mapping);
3193 if (count($rolf = $tree->getChildsByType($newRef,
"rolf")))
3195 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
3199 error_log(__METHOD__.
' ...cloned srcRef='.$srcRef.
' dstRef='.$dstRef.
' newRef='.$newRef);
3213 $a_item_list_gui->addCustomProperty($lng->txt(
'path'),
3214 ilContainer::buildPath($a_item_data[
'ref_id'], $this->object->getRefId()),
3226 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
3228 foreach($path_arr as
$data)
3234 $path .= $data[
'title'];
3249 global $ilTabs,
$tpl;
3254 $tpl->setContent($this->form->getHTML());
3256 $ilTabs->activateTab(
"obj_sty");
3266 $tpl->setTreeFlatIcon(
"",
"");
3267 $ilTabs->clearTargets();
3272 $ilTabs->setBackTarget($lng->txt(
"cntr_back_to_old_editor"),
3273 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
"_top");
3277 $ilTabs->setBackTarget($lng->txt(
"back"),
"./goto.php?target=".$this->object->getType().
"_".
3278 $this->
object->getRefId(),
"_top");
3281 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
3283 $style_id = $this->
object->getStyleSheetId();
3293 $ilCtrl->getHTML($page_gui);
3294 $ilTabs->setTabActive(
"obj_sty");
3296 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3297 $lng->loadLanguageModule(
"style");
3299 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3302 $fixed_style = $ilSetting->get(
"fixed_content_style_id");
3305 if ($fixed_style > 0)
3309 $this->lng->txt(
"global_fixed").
")");
3310 $this->form->addItem($st);
3317 $st_styles[0] = $this->lng->txt(
"default");
3327 $this->form->addItem($st);
3332 $this->form->addCommandButton(
"editStyle",
3333 $lng->txt(
"style_edit_style"));
3334 $this->form->addCommandButton(
"deleteStyle",
3335 $lng->txt(
"style_delete_style"));
3343 $st_styles,
false,
true);
3344 $style_sel =
new ilSelectInputGUI($lng->txt(
"style_current_style"),
"style_id");
3346 $style_sel->setValue($style_id);
3347 $this->form->addItem($style_sel);
3349 $this->form->addCommandButton(
"saveStyleSettings",
3351 $this->form->addCommandButton(
"createStyle",
3352 $lng->txt(
"sty_create_ind_style"));
3355 $this->form->setTitle($lng->txt(
"obj_sty"));
3356 $this->form->setFormAction($ilCtrl->getFormAction($this));
3366 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
3376 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
3386 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
3396 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3397 if ($ilSetting->get(
"fixed_content_style_id") <= 0 &&
3399 || $this->object->getStyleSheetId() == 0))
3402 $this->
object->update();
3405 $this->ctrl->redirect($this,
"editStyleProperties");
3422 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
3424 $item_list_gui->setContainerObject($this);
3426 $item_list_gui->enableComments(
true);
3427 $item_list_gui->enableNotes(
true);
3428 $item_list_gui->enableTags(
true);
3435 global $ilPluginAdmin;
3436 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
3437 foreach ($pl_names as $pl)
3440 $gui_class = $ui_plugin->getUIClassInstance();
3441 $resp = $gui_class->getHTML(
"Services/Container",
"async_item_list", array(
"html" =>
$html));
3444 $html = $gui_class->modifyHTML(
$html, $resp);
3458 global
$tpl,$ilToolbar;
3466 include_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
3468 $ilToolbar->addButton(
3469 $this->lng->txt(
'mount_webfolder'),
3470 $davServer->getMountURI($this->object->getRefId()),
3473 $davServer->getFolderURI($this->object->getRefId())
3476 $tpl->setContent($this->form->getHTML());
3485 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3487 $this->form->setFormAction($this->ctrl->getFormAction($this));
3490 $ipass =
new ilPasswordInputGUI($this->lng->txt(
"desired_password"),
"new_password");
3493 $this->form->addItem($ipass);
3494 $this->form->addCommandButton(
"savePassword", $this->lng->txt(
"save"));
3495 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
3497 $this->form->setTitle($this->lng->txt(
"chg_ilias_and_webfolder_password"));
3498 $this->form->setFormAction($this->ctrl->getFormAction($this));
3512 if($form->checkInput())
3514 $ilUser->resetPassword($this->form->getInput(
'new_password'),$this->form->getInput(
'new_password'));
3519 $form->setValuesByPost();
3535 $item_data = $this->
object->getSubItems(
false,
false, (
int)
$_GET[
"child_ref_id"]);
3539 include_once
'./Modules/Session/classes/class.ilEventItems.php';
3541 if(in_array((
int)$_GET[
"child_ref_id"], $event_items))
3543 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
3544 foreach ($this->object->items[
"sess"] as $id)
3547 foreach($items as $event_item)
3549 if ($event_item[
"child"] == (
int)$_GET[
"child_ref_id"])
3552 if((
int)$_GET[
"parent_ref_id"])
3554 $event_item[
"parent"] = (int)$_GET[
"parent_ref_id"];
3556 $html = $container_view->renderItem($event_item);
3565 foreach ($this->object->items[
"_all"] as $id)
3567 if ($id[
"child"] == (
int) $_GET[
"child_ref_id"])
3569 $html = $container_view->renderItem($id);
3579 echo $tpl->getOnLoadCodeForAsynch();
3594 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3597 include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3602 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
'fileManagerLaunch'),
'fm_start',
'_blank');
3616 $tpl =
new ilTemplate(
'tpl.fm_launch_ws.html',
false,
false,
'Services/WebServices/FileManager');
3617 $tpl->setVariable(
'JNLP_URL',ILIAS_HTTP_PATH.
'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3618 $tpl->setVariable(
'SESSION_ID',
$_COOKIE[
'PHPSESSID'].
'::'.CLIENT_ID);
3619 $tpl->setVariable(
'UID',$ilUser->getId());
3620 $tpl->setVariable(
'REF_ID', $this->object->getRefId());
3621 $tpl->setVariable(
'WSDL_URI', ILIAS_HTTP_PATH.
'/webservice/soap/server.php?wsdl');
3623 $tpl->setVariable(
'REST_URI',ILIAS_HTTP_PATH.
'/Services/WebServices/Rest/server.php');
3624 $tpl->setVariable(
'FILE_LOCKS',0);
3627 include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3628 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3629 $tpl->setVariable(
'HEADER_TITLE',$header_top_title ? $header_top_title :
'');
3643 if (!empty(
$_GET[
"set_mode"]))
3646 if ($ilUser->getId() != ANONYMOUS_USER_ID)
3648 $ilUser->writePref(
"il_rep_mode",
$_GET[
"set_mode"]);
3655 if ($ilUser->getId() != ANONYMOUS_USER_ID)
3657 $_SESSION[
"il_rep_mode"] = $ilUser->getPref(
"il_rep_mode");
3664 $_SESSION[
"il_rep_mode"] = $ilSetting->get(
"default_repository_view");
3667 $mode = (
$_SESSION[
"il_rep_mode"] !=
"")
3672 if ($mode ==
"tree" && (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui"))
3674 include_once(
"./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3676 if (!$exp->handleCommand())
3678 $tpl->setLeftNavContent($exp->getHTML());
3690 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
3691 include_once
'./Services/Container/classes/class.ilContainer.php';
3699 $sort_inherit->setTitle(
3700 $this->lng->txt(
'sort_inherit_prefix').
3701 ' ('.ilContainerSortingSettings::sortModeToString(
3703 $this->object->getId())).
') ' 3706 $sort_inherit->setInfo($this->lng->txt(
'sorting_info_inherit'));
3707 $sort->addOption($sort_inherit);
3712 $this->lng->txt(
'sorting_title_header'),
3715 $sort_title->
setInfo($this->lng->txt(
'sorting_info_title'));
3718 $sort->addOption($sort_title);
3723 $sort_activation->
setInfo($this->lng->txt(
'sorting_creation_info'));
3725 $sort->addOption($sort_activation);
3730 $sort_activation->
setInfo($this->lng->txt(
'crs_sort_timing_info'));
3732 $sort->addOption($sort_activation);
3737 $this->lng->txt(
'sorting_manual_header'),
3740 $sort_manual->
setInfo($this->lng->txt(
'sorting_info_manual'));
3742 $sort->addOption($sort_manual);
3746 if(in_array($settings->getSortMode(), $a_sorting_settings))
3748 $sort->setValue($settings->getSortMode());
3765 if($a_prefix ==
'manual')
3767 $txt = $this->lng->txt(
'sorting_new_items_direction');
3771 $txt = $this->lng->txt(
'sorting_direction');
3776 $direction->setRequired(TRUE);
3780 $this->lng->txt(
'sorting_asc'),
3783 $direction->addOption($asc);
3787 $this->lng->txt(
'sorting_desc'),
3790 $direction->addOption($desc);
3802 $a_sorting_settings)
3804 $position =
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_position'),$a_prefix.
'_new_items_position');
3806 $position->setRequired(TRUE);
3810 $this->lng->txt(
'sorting_new_items_at_top'),
3814 $position->addOption($new_top);
3818 $this->lng->txt(
'sorting_new_items_at_bottom'),
3822 $position->addOption($new_bottom);
3826 $order =
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_order'),$a_prefix.
'_new_items_order');
3828 $order->setRequired(TRUE);
3834 $this->lng->txt(
'sorting_title_header'),
3838 $order->addOption($new_title);
3845 $this->lng->txt(
'sorting_creation_header'),
3849 $order->addOption($new_creation);
3857 $this->lng->txt(
'crs_sort_activation'),
3861 $order->addOption($new_activation);
3877 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
3884 $settings->setSortDirection($form->
getInput(
'title_sorting_direction'));
3887 $settings->setSortDirection($form->
getInput(
'activation_sorting_direction'));
3890 $settings->setSortDirection($form->
getInput(
'creation_sorting_direction'));
3893 $settings->setSortNewItemsPosition($form->
getInput(
'manual_new_items_position'));
3894 $settings->setSortNewItemsOrder($form->
getInput(
'manual_new_items_order'));
3895 $settings->setSortDirection($form->
getInput(
'manual_sorting_direction'));
3899 $settings->update();
3911 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3913 $ru->showTrashTable(
$_GET[
"ref_id"]);
3923 global
$log, $ilAppEventHandler,
$lng;
3925 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3927 $ru->removeObjectsFromSystem(
$_POST[
"trash_id"]);
3928 $this->ctrl->redirect($this,
"trash");
3936 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3938 $ru->restoreObjects(
$_GET[
"ref_id"],
$_POST[
"trash_id"]);
3939 $this->ctrl->redirect($this,
"trash");
3948 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3950 if(!isset(
$_POST[
"trash_id"]))
3953 $this->ctrl->redirect($this,
"trash");
3957 $ru->confirmRemoveFromSystemObject(
$_POST[
"trash_id"]);
3966 include_once(
"./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3972 $exp->setTypeWhiteList(array(
"root",
"cat",
"grp",
"crs",
"fold"));
3973 if (
$cmd ==
"link") {
3974 $exp->setSelectMode(
"nodes",
true);
3977 $exp->setSelectMode(
"nodes[]",
false);
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
static _getRTEClassname()
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _isActionsVisible()
Static getter.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
initManualSortingOptionForm(ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
Add manual sorting options.
getContentGUI()
Get content gui object.
getAsynchItemListObject()
Get item list command drop down asynchronously.
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.
saveSortingObject()
Save Sorting.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
This class represents an option in a radio group.
deleteStyleObject()
Delete Style.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
addMessageRow(&$a_tpl, $a_message, $a_type)
add message row
redrawListItemObject()
Redraw a list item (ajax)
initAndDisplayMoveIntoObjectObject()
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add file manager link.
enableAdministrationPanelObject()
enable administration panel
removeFromSystemObject()
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
clearObject()
clear clipboard and go back to last object
addStandardRow(&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
adds a standard row to a block template
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.
setValue($a_value)
Set Value.
setSortMode($a_mode)
set sort mode
const SORT_NEW_ITEMS_POSITION_TOP
static getItemsByEvent($a_event_id)
Get session material / event items.
Shows all items grouped by type.
getTitlesByRefId($a_ref_ids)
get Titles of objects this method is used for error messages in methods cut/copy/paste ...
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
cloneWizardPageTreeObject()
public
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
Explorer for selecting repository items.
fileManagerLaunchObject()
Launch jnlp.
& newBlockTemplate()
determin admin commands
renderObject()
render the object
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null, $a_handle_extension=false)
Appends the text " - Copy" to a filename in the language of the current user.
& _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
Container page GUI class.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static copyFile($obj_id, $title, $tmpdir)
getEditFormValues()
Get values for edit form.
createStyleObject()
Create Style.
& executeCommand()
execute command note: this method is overwritten in all container objects
setTitleAndDescription()
called by prepare output
initAndDisplayCopyIntoMultipleObjectsObject()
cloneAllObject()
Clone all object Overwritten method for copying container objects.
allowBlocksMoving()
Standard is to allow blocks moving.
trashObject()
Show trash content of object.
_getItemsOfContainer($a_ref_id)
editPageContentObject()
edit page content (for repository root node and categories)
editOrderObject()
Edit order.
_writeContainerSetting($a_id, $a_keyword, $a_value)
static _isActive()
Static getter.
switchToStdEditorObject()
Switch to standard page editor.
prepareOutput($a_show_subobjects=true)
prepare output
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
static _lookupTitle($a_id)
lookup object title
confirmRemoveFromSystemObject()
confirmation screen remove from system
createObject()
create new object form
isActiveOrdering()
Check if ordering is enabled.
enableMultiDownloadObject()
_cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
synchronises appearances of media objects in $a_text with media object usage table ...
static addToDesktop()
Add desktop item public.
setInfo($a_info)
Set Info.
setPageEditorTabs()
Add page editor tabs.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
initAndDisplayLinkIntoMultipleObjectsObject()
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
getSyntaxStylePath()
get syntax style path
isActiveAdministrationPanel()
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
Add sorting direction.
_lookupIconPath($a_id, $a_size="big")
lookup icon path
static _lookupObjectId($a_ref_id)
lookup object id
getSortNewItemsOrder()
GET new item order.
initFormPasswordInstruction()
Init password form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static _isFinished($a_copy_id)
check if copy is finished
addHeaderRow(&$a_tpl, $a_type, $a_show_image=true)
adds a header row to a block template
_existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages) ...
getTabs(&$tabs_gui)
common tabs for all container objects (should be called at the end of child getTabs() method ...
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
editStyleObject()
Edit Style.
useNewEditorObject()
Use new editor (-> delete xhtml content page)
editStylePropertiesObject()
Edit style properties.
static showMemberViewSwitch($a_ref_id)
Show member view switch.
const SORT_NEW_ITEMS_POSITION_BOTTOM
GUI class for didactic template settings inside repository objects.
showPermanentLink(&$tpl)
show permanent link
savePasswordObject()
Save password.
undeleteObject()
Get objects back from trash.
if(!is_array($argv)) $options
setColumnSettings($column_gui)
May be overwritten in subclasses.
static _buildPath($a_ref_id, $a_course_ref_id)
build path
addSubItem($a_item)
Add Subitem.
modifyItemGUI(&$a_item_list_gui, $a_item_data, $a_show_path)
Modify Item ListGUI for presentation in container.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
linkObject()
create an new reference of an object in tree it's like a hard link of unix
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
clearAdminCommandsDetermination()
cleaer administration commands determination
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
const SORT_NEW_ITEMS_ORDER_CREATION
allowBlocksConfigure()
Standard is to allow blocks configuration.
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
Repository explorer GUI class.
special template class to simplify handling of ITX/PEAR
omitLocator($a_omit=true)
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
Repository GUI Utilities.
static lookupSortModeFromParentContainer($a_obj_id)
Lookup sort mode from parent container.
showPasteTreeObject()
Show paste tree.
saveStyleSettingsObject()
Save style settings.
addPageTabs()
Add page tabs.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
Class to report exception.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
redirection script todo: (a better solution should control the processing via a xml file) ...
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static getInstance()
Get singelton iunstance.
__showTimingsButton(&$tpl)
showPossibleSubObjects()
show possible sub objects selection list
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
_isInTrash($a_ref_id)
checks wether object is in trash
copyObject()
Copy object(s) out from a container and write the information to clipboard It is not possible to copy...
prepareOutput()
prepare output
static _lookupType($a_id, $a_reference=false)
lookup object type
disableAdministrationPanelObject()
enable administration panel
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
cloneWizardPageListObject()
public
const SORT_NEW_ITEMS_ORDER_ACTIVATION
& _getListGUIByType($a_type)
_recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
Shows all items in one block.
static ilTempnam($a_temp_path=null)
Create a temporary file in an ILIAS writable directory.
setContentSubTabs()
Set content sub tabs.
static removeFromDesktop()
Remove item from personal desktop public.
downloadMultipleObjects($a_ref_ids)
_lookupStandard($a_id)
Lookup standard flag.
static getInstance()
Get singleton instance.
setStyleId($a_styleid)
Set Style Id.
getSortNewItemsPosition()
GET new item position.
performPasteIntoMultipleObjectsObject()
This class represents a non editable value in a property form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
getContentStylePath($a_style_id)
get content style path
Shows all items in one block.
Render add new item selector.
Class ilObjStyleSheetGUI.
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
static getInstance()
Get instance.
const SORT_DIRECTION_DESC
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static getInstance($a_obj_id)
Get instance.
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
setTabHook($a_object, $a_function)
Set tab hook.
static _lookupAbsolutePath($obj_id, $a_version=null)
return absolute path for version
getCreationMode()
get creation mode
cutObject()
cut object(s) out from a container and write the information to clipboard
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
initStylePropertiesForm()
Init style properties form.
render()
Add new item selection to current page incl.
static _lookupSortMode($a_obj_id)
lookup sort mode
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
static _getInstance($a_obj_id)
get instance by obj_id
showAdministrationPanel(&$tpl)
show administration panel
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
isActiveItemOrdering()
Check if item ordering is enabled.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static recurseFolder($refid, $title, $tmpdir)
private functions which iterates through all folders and files and create an according file structure...
editPageFrameObject()
show page editor frameset
getContainerPageHTML()
Get container page HTML.
const SORT_NEW_ITEMS_ORDER_TITLE
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.
cloneWizardPageObject($a_tree_view=true)
Show clone wizard page for container objects.
getSortDirection()
Get sort direction.
keepObjectsInClipboardObject()
Keep objects in the clipboard.
clipboardObject()
Copy object(s) out from a container and write the information to clipboard It is not possible to copy...
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
GUI class for course objective view.
switchToOldEditorObject()
Switch to old page editor.
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
cancelPageContentObject()