6require_once
"./Services/Object/classes/class.ilObjectGUI.php";
7require_once
"./Services/Container/classes/class.ilContainer.php";
8include_once
'./Services/PersonalDesktop/interfaces/interface.ilDesktopItemHandling.php';
111 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
115 $this->lng =
$DIC->language();
116 $this->tpl =
$DIC[
"tpl"];
117 $this->ctrl =
$DIC->ctrl();
118 $this->tabs =
$DIC->tabs();
120 $this->
user = $DIC->user();
121 $this->db =
$DIC->database();
122 $this->access =
$DIC->access();
123 $this->tree =
$DIC->repositoryTree();
124 $this->
error = $DIC[
"ilErr"];
125 $this->obj_definition =
$DIC[
"objDefinition"];
126 $this->rbacadmin =
$DIC->rbac()->admin();
127 $this->rbacreview =
$DIC->rbac()->review();
128 $this->log =
$DIC[
"ilLog"];
129 $this->obj_data_cache =
$DIC[
"ilObjDataCache"];
130 $this->toolbar =
$DIC->toolbar();
131 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
132 $this->app_event_handler =
$DIC[
"ilAppEventHandler"];
133 $this->ui =
$DIC->ui();
139 $lng->loadLanguageModule(
"cntr");
140 $lng->loadLanguageModule(
'cont');
144 parent::__construct($a_data, $a_id, $a_call_by_reference,
false);
155 $next_class = $this->ctrl->getNextClass();
156 $cmd = $this->ctrl->getCmd(
"render");
159 switch ($next_class) {
161 case "ilcontainerpagegui":
162 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui") {
170 case "ilobjstylesheetgui":
190 $values = parent::getEditFormValues();
192 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
205 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
207 $this->object->getRefId()
211 if ($new_tpl_id != $current_tpl_id) {
212 $_REQUEST[
'tplid'] = $new_tpl_id;
215 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
216 $this->ctrl->setReturn($this,
'edit');
217 $this->ctrl->setCmdClass(
'ildidactictemplategui');
218 $this->ctrl->setCmd(
'confirmTemplateSwitch');
220 return $this->ctrl->forwardCommand($dtpl_gui);
222 parent::afterUpdate();
234 $ilTabs->clearTargets();
237 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
238 $this->ctrl->setReturn($this,
"editStyleProperties");
239 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
240 $style_gui->omitLocator();
241 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
242 $style_gui->setCreationMode(
true);
245 if ($cmd ==
"confirmedDelete") {
246 $this->
object->setStyleSheetId(0);
247 $this->
object->update();
250 $ret = $this->ctrl->forwardCommand($style_gui);
252 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
254 $this->
object->setStyleSheetId($style_id);
255 $this->
object->update();
256 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
272 if (in_array($cmd, array(
"displayMediaFullscreen",
"downloadFile",
"displayMedia"))) {
278 $ilTabs->clearTargets();
280 if (
$_GET[
"redirectSource"] ==
"ilinternallinkgui") {
285 $this->object->getId(),
289 $ilTabs->setBackTarget(
290 $lng->txt(
"cntr_back_to_old_editor"),
291 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
295 $ilTabs->setBackTarget(
$lng->txt(
"back"),
"./goto.php?target=" . $this->object->getType() .
"_" .
296 $this->object->getRefId(),
"_top");
300 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
301 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
303 $lng->loadLanguageModule(
"content");
305 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
306 $this->tpl->setVariable(
307 "LOCATION_CONTENT_STYLESHEET",
310 $this->tpl->setCurrentBlock(
"SyntaxStyle");
311 $this->tpl->setVariable(
312 "LOCATION_SYNTAX_STYLESHEET",
315 $this->tpl->parseCurrentBlock();
319 $this->object->getId()
323 $new_page_object->setParentId($this->object->getId());
324 $new_page_object->setId($this->object->getId());
325 $new_page_object->createFromXML();
329 $this->ctrl->setReturnByClass(
"ilcontainerpagegui",
"edit");
331 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
333 $this->object->getStyleSheetId(),
334 $this->object->getType()
337 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
338 $page_gui->setFileDownloadLink(
"");
339 $page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this,
"showMediaFullscreen"));
341 $page_gui->setPresentationTitle(
"");
342 $page_gui->setTemplateOutput(
false);
346 $this->object->getId(),
351 "tpl.cntr_old_editor_message.html",
356 $wtpl->setVariable(
"ALT_WARNING",
$lng->txt(
"warning"));
361 $wtpl->setVariable(
"TXT_MIGRATION_INFO",
$lng->txt(
"cntr_switch_to_new_editor_message"));
362 $wtpl->setVariable(
"TXT_MIGRATION_INFO",
$lng->txt(
"cntr_switch_to_new_editor_message"));
364 "HREF_SWITCH_TO_NEW_EDITOR",
365 $ilCtrl->getLinkTarget($this,
"useNewEditor")
368 "TXT_MIGRATION_SWITCH",
369 $lng->txt(
"cntr_switch_to_new_editor_cmd")
371 $page_gui->setPrependingHtml($wtpl->get());
375 $page_gui->setTabHook($this,
"addPageTabs");
377 $ret = $this->ctrl->forwardCommand($page_gui);
393 $ilCtrl->getLinkTarget($this,
'editStyleProperties'),
394 "editStyleProperties"
406 if (!
$ilSetting->get(
"enable_cat_page_edit")) {
412 $this->object->getId(),
416 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
418 return $xpage->getContent();
426 include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
429 $this->object->getId()
433 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
434 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
436 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
437 $this->tpl->setVariable(
438 "LOCATION_CONTENT_STYLESHEET",
441 $this->tpl->setCurrentBlock(
"SyntaxStyle");
442 $this->tpl->setVariable(
443 "LOCATION_SYNTAX_STYLESHEET",
446 $this->tpl->parseCurrentBlock();
449 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
451 $lang = $ot->getEffectiveContentLang(
$ilUser->getCurrentLanguage(),
"cont");
453 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
455 $this->object->getStyleSheetId(),
456 $this->object->getType()
459 $page_gui->setPresentationTitle(
"");
460 $page_gui->setTemplateOutput(
false);
461 $page_gui->setHeader(
"");
462 $ret = $page_gui->showPage();
475 if (parent::prepareOutput($a_show_subobjects)) {
478 #$this->showPossibleSubObjects();
482 include_once
'./Services/Container/classes/class.ilMemberViewGUI.php';
493 if (
$_GET[
"obj_id"] !=
"") {
497 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
502 $mode = (
$_SESSION[
"il_rep_mode"] ==
"flat")
505 $link =
"ilias.php?baseClass=ilRepositoryGUI&cmd=frameset&set_mode=" . $mode .
"&ref_id=" . $this->
object->getRefId();
506 $tpl->setTreeFlatIcon($link, $mode);
515 $this->tpl->setTitle($this->object->getTitle());
516 $this->tpl->setDescription($this->object->getLongDescription());
519 $icon = ilObject::_getIcon($this->object->getId(),
"big", $this->object->getType());
520 $this->tpl->setTitleIcon($icon, $this->lng->txt(
"obj_" . $this->object->getType()));
522 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
524 $lgui->initItem($this->object->getRefId(), $this->object->getId());
525 $this->tpl->setAlertProperties($lgui->getAlertProperties());
534 include_once
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
547 switch ($this->object->getViewMode()) {
550 include_once(
"./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
555 include_once(
'./Services/Container/classes/class.ilContainerObjectiveGUI.php');
562 include_once(
"./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
569 include_once(
"./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
574 return $container_view;
594 $ilTabs->activateSubTab(
"manage");
596 $ilTabs->activateSubTab(
"view_content");
599 $container_view->setOutput();
601 $this->adminCommands = $container_view->adminCommands;
605 if (
$ilCtrl->getNextClass() !=
"ilcolumngui") {
613 if ((
int)
$_GET[
"ref_id"] > 1 &&
$ilSetting->get(
"rep_tree_synchronize")) {
614 $ilCtrl->setParameter($this,
"active_node", (
int)
$_GET[
"ref_id"]);
624 echo $container_view->getSingleTypeBlockAsynch(
$_GET[
"type"]);
647 $main_tpl =
$DIC->ui()->mainTemplate();
649 $lng->loadLanguageModule(
'cntr');
653 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
655 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
657 $this->ctrl->setParameter($this,
"type",
"");
658 $this->ctrl->setParameter($this,
"item_ref_id",
"");
661 $this->lng->txt(
'paste_clipboard_items'),
666 $this->lng->txt(
'clear_clipboard'),
670 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
673 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
675 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
677 $this->ctrl->setParameter($this,
"type",
"");
678 $this->ctrl->setParameter($this,
"item_ref_id",
"");
682 if ($this->object->gotItems()) {
688 $this->lng->txt(
'delete_selected_items'),
692 $this->lng->txt(
'move_selected_items'),
696 $this->lng->txt(
'copy_selected_items'),
700 $this->lng->txt(
'link_selected_items'),
705 if ($folder_set->get(
"enable_multi_download") ==
true) {
710 if ($this->object->getType() ==
'crs' or $this->object->getType() ==
'grp') {
711 if ($this->object->gotItems()) {
716 $this->lng->txt(
'cntr_adopt_content'),
717 $this->ctrl->getLinkTargetByClass(
737 $main_tpl->addAdminPanelToolbar(
739 ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ?
true :
false,
740 ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ?
true :
false
744 if ($this->object->gotItems()) {
745 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
748 if ($this->edit_order) {
749 if ($this->object->gotItems() and $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
750 include_once(
'./Services/Container/classes/class.ilContainer.php');
754 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
756 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
758 $this->ctrl->setParameter($this,
"type",
"");
759 $this->ctrl->setParameter($this,
"item_ref_id",
"");
762 $this->lng->txt(
'sorting_save'),
766 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
776 $num_files = $this->tree->getChildsByType(
$ref_id,
"file");
777 $num_folders = $this->tree->getChildsByType(
$ref_id,
"fold");
778 if (count($num_files) > 0 or count($num_folders) > 0) {
780 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
782 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
784 $this->ctrl->setParameter($this,
"type",
"");
785 $this->ctrl->setParameter($this,
"item_ref_id",
"");
789 $GLOBALS[
'tpl']->addAdminPanelToolbar(
791 $this->object->gotItems() ?
true :
false,
792 $this->object->gotItems() ?
true :
false
803 if (!$folder_set->get(
"bgtask_download", 0)) {
805 $this->lng->txt(
'download_selected_items'),
809 $url = $this->ctrl->getLinkTargetByClass(array(
"ilrepositorygui",
"ilobjfoldergui",
"ilbackgroundtaskhub"),
"",
"",
true,
false);
810 $tpl->addJavaScript(
"Services/BackgroundTask/js/BgTask.js");
811 $tpl->addOnLoadCode(
"il.BgTask.initMultiForm('ilFolderDownloadBackgroundTaskHandler');");
812 $tpl->addOnLoadCode(
'il.BgTask.setAjax("' .
$url .
'");');
814 include_once
"Services/UIComponent/Button/classes/class.ilSubmitButton.php";
816 $button->setCaption(
"download_selected_items");
817 $button->addCSSClass(
"ilbgtasksubmit");
818 $button->setCommand(
"download");
819 $toolbar->addButtonInstance($button);
827 if (!
$tree->checkForParentType($this->object->getRefId(),
'crs')) {
830 $tpl->setCurrentBlock(
"custom_button");
831 $tpl->setVariable(
"ADMIN_MODE_LINK", $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editTimings'));
832 $tpl->setVariable(
"TXT_ADMIN_MODE", $this->lng->txt(
'timings_edit'));
833 $tpl->parseCurrentBlock();
845 $tpl->setPermanentLink(
846 $this->object->getType(),
847 $this->object->getRefId(),
861 $ilCtrl->redirect($this,
"editPageFrame");
872 $ilCtrl->redirect($this,
"editPageFrame");
885 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
886 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
898 $this->object->getId(),
903 ilUtil::sendSuccess(
$lng->txt(
"cntr_switched_editor"),
true);
906 $ilCtrl->redirect($this,
"editPageFrame");
916 $this->object->getId(),
919 if ($xpage_id > 0 &&
$_SESSION[
"il_cntr_editor"] !=
"std") {
920 $this->ctrl->redirect($this,
"editPageContent");
922 $this->ctrl->redirectByClass(array(
"ilcontainerpagegui"),
"edit");
939 if (!
$rbacsystem->checkAccess(
"write", $this->ref_id)) {
940 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
944 $this->object->getId(),
948 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
950 $content = $xpage->getContent();
957 "tpl.container_edit_page_content.html",
961 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
963 "TXT_EDIT_PAGE_CONTENT",
964 $this->lng->txt(
"edit_page_content")
966 $tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
967 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
968 $tpl->setVariable(
"TXT_MIGRATION_INFO",
$lng->txt(
"cntr_old_editor_warning"));
969 $tpl->setVariable(
"TXT_MIGRATION_OPEN_STD_EDITOR",
$lng->txt(
"cntr_old_editor_open_standard_editor"));
971 $tpl->setVariable(
"HREF_OPEN_STD_EDITOR",
$ilCtrl->getLinkTarget($this,
"switchToStdEditor"));
972 $tpl->setVariable(
"ALT_WARNING",
$lng->txt(
"warning"));
974 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
975 include_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
980 include_once
"./Services/RTE/classes/class.ilRTE.php";
982 include_once
"./Services/RTE/classes/class.$rtestring.php";
983 $rte =
new $rtestring();
985 include_once
"./Services/Object/classes/class.ilObject.php";
988 $rte->addRTESupport(
$obj_id, $obj_type);
995 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
996 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
998 $this->object->getId(),
1017 if ($xpage_id > 0) {
1019 $xpage->setContent(
$text);
1023 $xpage->setContent(
$text);
1026 $this->object->getId(),
1032 include_once(
"Services/RTE/classes/class.ilRTE.php");
1035 $this->object->getType() .
":html",
1036 $this->object->getId()
1039 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1040 $this->ctrl->redirect($this,
"");
1045 $this->ctrl->redirect($this,
"");
1054 "tpl.container_link_help.html",
1057 "Services/Container"
1060 $type_ordering = array(
1061 "cat",
"fold",
"crs",
"grp",
"chat",
"frm",
"lres",
1062 "glo",
"webr",
"file",
"exc",
1063 "tst",
"svy",
"mep",
"qpl",
"spl");
1066 foreach ($childs as $child) {
1067 if (in_array($child[
"type"], array(
"lm",
"sahs",
"htlm"))) {
1070 $cnt[$child[
"type"]]++;
1075 $tpl->setVariable(
"TXT_HELP_HEADER",
$lng->txt(
"help"));
1076 foreach ($type_ordering as
$type) {
1077 $tpl->setCurrentBlock(
"row");
1078 $tpl->setVariable(
"ROWCOL",
"tblrow" . (((
$i++) % 2) + 1));
1079 if (
$type !=
"lres") {
1081 " (" . ((
int) $cnt[
$type]) .
")");
1083 $tpl->setVariable(
"TYPE",
$lng->txt(
"obj_lrss") .
1084 " (" . ((
int) $cnt[
"lres"]) .
")");
1086 $tpl->setVariable(
"TXT_LINK",
"[list-" .
$type .
"]");
1087 $tpl->parseCurrentBlock();
1098 $this->adminCommands =
false;
1131 "tpl.container_list_block.html",
1134 "Services/Container"
1136 $this->cur_row_type =
"row_type_1";
1152 if ($a_show_image) {
1153 $a_tpl->setCurrentBlock(
"container_header_row_image");
1154 $a_tpl->setVariable(
"HEADER_IMG", $icon);
1155 $a_tpl->setVariable(
"HEADER_ALT",
$title);
1157 $a_tpl->setCurrentBlock(
"container_header_row");
1160 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT",
$title);
1161 $a_tpl->parseCurrentBlock();
1172 public function addStandardRow(
1175 $a_item_ref_id =
"",
1176 $a_item_obj_id =
"",
1181 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1185 $a_tpl->touchBlock($this->cur_row_type);
1188 if (
$ilSetting->get(
"icon_position_in_lists") ==
"item_rows") {
1190 $alt = $this->lng->txt(
"obj_" . $a_image_type);
1195 $customIconFactory =
$DIC[
'object.customicons.factory'];
1196 $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
1198 if ($customIcon->exists()) {
1199 $icon = $customIcon->getFullPath();
1203 $a_tpl->setCurrentBlock(
"block_row_image");
1204 $a_tpl->setVariable(
"ROW_IMG", $icon);
1205 $a_tpl->setVariable(
"ROW_ALT", $alt);
1206 $a_tpl->parseCurrentBlock();
1211 $a_tpl->setCurrentBlock(
"block_row_check");
1212 $a_tpl->setVariable(
"ITEM_ID", $a_item_ref_id);
1213 $a_tpl->parseCurrentBlock();
1216 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
1219 $a_tpl->setCurrentBlock(
'block_position');
1220 $a_tpl->setVariable(
'POS_TYPE', $a_image_type);
1221 $a_tpl->setVariable(
'POS_ID', $a_item_ref_id);
1222 $a_tpl->setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
1223 $a_tpl->parseCurrentBlock();
1226 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1228 $a_tpl->setCurrentBlock(
"container_standard_row");
1229 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
1230 $a_tpl->parseCurrentBlock();
1231 $a_tpl->touchBlock(
"container_row");
1239 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1243 $a_tpl->touchBlock($this->cur_row_type);
1246 $a_message = str_replace(
"[type]",
$type, $a_message);
1248 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1250 $a_tpl->setCurrentBlock(
"container_standard_row");
1251 $a_tpl->setVariable(
1252 "BLOCK_ROW_CONTENT",
1255 $a_tpl->parseCurrentBlock();
1256 $a_tpl->touchBlock(
"container_row");
1261 $this->cur_row_type =
"";
1273 || strtolower($this->ctrl->getCmdClass()) !=
"ilcontainerpagegui") {
1277 $lng->loadLanguageModule(
"content");
1282 $this->tabs_gui->setBackTarget(
1283 $this->lng->txt(
"obj_cat"),
1284 $this->ctrl->getLinkTarget($this,
"frameset"),
1288 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view"), array(
"",
"view"),
"ilcontainerpagegui");
1305 if (!is_object($this->
object)) {
1309 if ($a_include_view && $ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
1311 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTarget($this,
"view"));
1313 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTarget($this,
"disableAdministrationPanel"));
1317 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
1319 $this->adminCommands ||
1320 (is_object($this->
object) &&
1321 ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())))
1323 (is_object($this->
object) &&
1324 ($this->object->getHiddenFilesFound())) ||
1329 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"),
$ilCtrl->getLinkTarget($this,
""));
1331 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"),
$ilCtrl->getLinkTarget($this,
"enableAdministrationPanel"));
1334 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
1335 is_object($this->
object) &&
1336 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())
1339 $ilTabs->addSubTab(
"ordering",
$lng->txt(
"cntr_ordering"),
$ilCtrl->getLinkTarget($this,
"editOrder"));
1341 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
1342 is_object($this->
object) &&
1343 $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())
1345 if (
$ilSetting->get(
"enable_cat_page_edit")) {
1348 $lng->txt(
"cntr_text_media_editor"),
1349 $ilCtrl->getLinkTarget($this,
"editPageFrame"),
1367 if (
$rbacsystem->checkAccess(
'edit_permission', $this->ref_id)) {
1368 $this->tabs_gui->addTarget(
1370 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1371 array(
"perm",
"info",
"owner"),
1374 if (
$ilCtrl->getNextClass() ==
"ilpermissiongui") {
1375 $this->tabs_gui->activateTab(
"perm_settings");
1380 if (strtolower(
$_GET[
"baseClass"]) ==
"ilrepositorygui" && !empty(
$_SESSION[
"clipboard"])) {
1381 $this->tabs_gui->addTarget(
1383 $this->ctrl->getLinkTarget($this,
"clipboard"),
1400 $_SESSION[
"il_cont_admin_panel"] =
true;
1401 $this->ctrl->redirect($this,
"render");
1409 $_SESSION[
"il_cont_admin_panel"] =
false;
1410 $this->ctrl->redirect($this,
"render");
1420 $this->edit_order =
true;
1421 $_SESSION[
"il_cont_admin_panel"] =
false;
1424 $ilTabs->activateSubTab(
"ordering");
1433 return $this->edit_order ? true :
false;
1456 if ((
int)
$ilSetting->get(
'disable_my_offers')) {
1460 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1462 ilUtil::sendSuccess(
$lng->txt(
"added_to_desktop"));
1474 if ((
int)
$ilSetting->get(
'disable_my_offers')) {
1478 include_once
'./Services/PersonalDesktop/classes/class.ilDesktopItemGUI.php';
1480 ilUtil::sendSuccess(
$lng->txt(
"removed_from_desktop"));
1489 $this->multi_download_enabled =
true;
1510 if (
$_GET[
"item_ref_id"] !=
"") {
1516 if (!isset(
$_POST[
"id"])) {
1517 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1523 $node_data = $this->tree->getNodeData(
$ref_id);
1524 $subtree_nodes = $this->tree->getSubTree($node_data);
1526 $all_node_data[] = $node_data;
1527 $all_subtree_nodes[] = $subtree_nodes;
1530 foreach ($subtree_nodes as $node) {
1531 if ($node[
'type'] ==
'rolf') {
1535 if (!
$rbacsystem->checkAccess(
'delete', $node[
"ref_id"])) {
1536 $no_cut[] = $node[
"ref_id"];
1541 if (count($no_cut)) {
1543 foreach ((array) $no_cut as $cut_id) {
1547 $this->lng->txt(
"msg_no_perm_cut") .
" " . implode(
',', (array) $titles),
1576 if (
$_GET[
"item_ref_id"] !=
"") {
1580 if (!isset(
$_POST[
"id"])) {
1581 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1588 $node_data = $this->tree->getNodeData(
$ref_id);
1595 $subtree_nodes = $this->tree->getSubTree($node_data);
1597 $all_node_data[] = $node_data;
1598 $all_subtree_nodes[] = $subtree_nodes;
1601 foreach ($subtree_nodes as $node) {
1602 if ($node[
'type'] ==
'rolf') {
1606 if (!
$rbacsystem->checkAccess(
'visible,read,copy', $node[
"ref_id"])) {
1607 $no_copy[] = $node[
"ref_id"];
1612 if ($containers > 0 && count(
$_POST[
"id"]) > 1) {
1613 $ilErr->raiseError($this->lng->txt(
"cntr_container_only_on_their_own"),
$ilErr->MESSAGE);
1617 if (is_array($no_copy) && count($no_copy)) {
1619 foreach ((array) $no_copy as $copy_id) {
1623 $this->lng->txt(
"msg_no_perm_copy") .
" " . implode(
',', $titles),
1629 if (count(
$_POST[
"id"]) == 1) {
1630 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id",
$_POST[
"id"][0]);
1631 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1633 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_",
$_POST[
"id"]));
1634 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1654 if (
$_GET[
"item_ref_id"] !=
"") {
1658 if (!isset(
$_POST[
"id"])) {
1659 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1665 $obj_type =
$object->getType();
1666 if (!in_array($obj_type, array(
"fold",
"file"))) {
1667 $no_download[] =
$object->getType();
1674 if (count($no_download)) {
1675 $no_download = array_unique($no_download);
1676 foreach ($no_download as
$type) {
1677 $txt_objs[] = $this->lng->txt(
"objs_" .
$type);
1679 $ilErr->raiseError(implode(
', ', $txt_objs) .
" " . $this->lng->txt(
"msg_obj_no_download"),
$ilErr->MESSAGE);
1683 if (count($no_perm)) {
1685 $this->lng->txt(
"msg_obj_perm_download") .
" " . implode(
',', $no_perm),
1700 include_once
'Modules/Folder/classes/class.ilObjFolder.php';
1701 include_once
'Modules/File/classes/class.ilObjFile.php';
1702 include_once
'Modules/File/classes/class.ilFileException.php';
1711 foreach ($a_ref_ids as
$ref_id) {
1712 if (!$ilAccess->checkAccess(
"read",
"",
$ref_id)) {
1722 $obj_type =
$object->getType();
1723 if ($obj_type ==
"fold") {
1726 } elseif ($obj_type ==
"file") {
1733 $deliverFilename = ilUtil::getAsciiFilename($this->object->getTitle()) .
".zip";
1757 $ilAccess =
$DIC->access();
1762 $subtree =
$tree->getChildsByTypeFilter($refid, array(
"fold",
"file"));
1764 foreach ($subtree as $child) {
1765 if (!$ilAccess->checkAccess(
"read",
"", $child[
"ref_id"])) {
1773 if ($child[
"type"] ==
"fold") {
1788 if (!copy($oldFilename, $newFilename)) {
1789 throw new ilFileException(
"Could not copy " . $oldFilename .
" to " . $newFilename);
1792 touch($newFilename, filectime($oldFilename));
1810 if (
$_GET[
"item_ref_id"] !=
"") {
1814 if (!isset(
$_POST[
"id"])) {
1815 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1826 if (!$this->objDefinition->allowLink(
$object->getType())) {
1827 $no_link[] =
$object->getType();
1832 if (count($no_cut)) {
1833 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_link") .
" " .
1834 implode(
',', $no_cut),
$ilErr->MESSAGE);
1837 if (count($no_link)) {
1839 $ilErr->raiseError($this->lng->txt(
"msg_obj_no_link"),
$ilErr->MESSAGE);
1843 $clipboard[
"parent"] =
$_GET[
"ref_id"];
1844 $clipboard[
"cmd"] =
$ilCtrl->getCmd();
1847 $clipboard[
"ref_ids"][] =
$ref_id;
1853 if (count($clipboard[
"ref_ids"]) == 1) {
1875 if (isset(
$_POST[
"cmd"][
"clear"])) {
1876 ilUtil::sendSuccess($this->lng->txt(
"msg_clear_clipboard"),
true);
1878 $this->ctrl->redirect($this,
'render');
1898 $not_allowed_subobject = [];
1901 $command =
$_SESSION[
'clipboard'][
'cmd'];
1902 if (!in_array($command, array(
'cut',
'link',
'copy'))) {
1903 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1907 if ($command ==
'cut') {
1913 if (!is_array(
$_POST[
'nodes']) || !count(
$_POST[
'nodes'])) {
1930 $folder_objects_cache = array();
1933 $current_parent_id =
$tree->getParentId($obj_data->getRefId());
1935 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
1936 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1941 if (!
$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1942 $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() .
']');
1946 if ($folder_ref_id == $current_parent_id) {
1947 $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() .
']');
1953 $is_child[] = sprintf($this->lng->txt(
'msg_paste_object_not_in_itself'), $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']');
1957 if (!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()))) {
1958 $not_allowed_subobject[] = sprintf(
1959 $this->lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1960 $folder_objects_cache[$folder_ref_id]->getTitle() .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1961 $lng->txt(
'obj_' . $obj_data->getType())
1969 if (count($exists) && $command !=
"copy") {
1970 $error .= implode(
'<br />', $exists);
1973 if (count($is_child)) {
1975 $error .= implode(
'<br />', $is_child);
1978 if (count($not_allowed_subobject)) {
1980 $error .= implode(
'<br />', $not_allowed_subobject);
1983 if (count($no_paste)) {
1985 $error .= implode(
'<br />', $no_paste);
2005 $ilLog->write(__METHOD__ .
", cmd: " . $command);
2011 $ref_ids =
$_SESSION[
'clipboard'][
'ref_ids'];
2012 unset(
$_SESSION[
'clipboard'][
'ref_ids']);
2015 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
2019 if ($command ==
'copy') {
2020 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
2021 foreach ($ref_ids as
$ref_id) {
2022 $revIdMapping = array();
2025 if ($oldNode_data[
'parent'] == $folder_ref_id) {
2026 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
2028 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
2030 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping,
null);
2035 $newNode_data =
$tree->getNodeData($newRef);
2037 $oldNode_data[
'type'],
2039 $oldNode_data[
'obj_id'],
2043 $newNode_data[
'obj_id'],
2046 $ilObjDataCache->lookupObjId($folder_ref_id)
2053 ilUtil::sendSuccess($this->lng->txt(
'msg_cloned'),
true);
2057 if ($command ==
'cut') {
2058 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
2059 foreach ($ref_ids as
$ref_id) {
2065 include_once(
'./Services/Conditions/classes/class.ilConditionHandler.php');
2070 $old_parent_data =
$tree->getNodeData($old_parent);
2072 $node_data[
'obj_id'],
2075 $old_parent_data[
'obj_id']
2078 $node_data[
'obj_id'],
2081 $ilObjDataCache->lookupObjId($folder_ref_id)
2091 ilUtil::sendSuccess($this->lng->txt(
'msg_cut_copied'),
true);
2095 if ($command ==
'link') {
2096 $linked_to_folders = array();
2098 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
2101 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
2102 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
2104 foreach ($ref_ids as
$ref_id) {
2113 foreach ($subnodes as
$key => $subnode) {
2116 $new_ref_id = $obj_data->createReference();
2117 $obj_data->putInTree($folder_ref_id);
2118 $obj_data->setPermissions($folder_ref_id);
2121 if ($rbac_log_active) {
2122 $rbac_log_roles =
$rbacreview->getParentRoleIds($new_ref_id,
false);
2128 $node_data =
$tree->getNodeData($new_ref_id);
2130 $node_data[
'obj_id'],
2133 $ilObjDataCache->lookupObjId($folder_ref_id)
2139 $ilLog->write(__METHOD__ .
', link finished');
2142 $linked_targets = array();
2144 if (count($linked_to_folders)) {
2145 require_once
'Services/Link/classes/class.ilLink.php';
2153 if (count($ref_ids) == 1) {
2157 $mbox =
$ui->factory()->messageBox()->success($this->lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix))
2160 ilUtil::sendSuccess(
$ui->renderer()->render($mbox),
true);
2166 $this->ctrl->returnToParent($this);
2174 $_SESSION[
'paste_linked_repexpand'] = array();
2181 foreach ((array)
$path as $node_id) {
2182 if (!in_array($node_id,
$_SESSION[
'paste_linked_repexpand'])) {
2183 $_SESSION[
'paste_linked_repexpand'][] = $node_id;
2199 $ilTabs->setTabActive(
'view_content');
2201 if (!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'link',
'copy',
'cut'))) {
2202 $message = __METHOD__ .
": Unknown action.";
2209 if ($exp->handleCommand()) {
2214 $txt_var = ($cmd ==
"copy")
2220 $t->setFormAction($this->ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
2222 include_once(
"./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2224 $b->setCaption($txt_var);
2225 $b->setCommand(
"performPasteIntoMultipleObjects");
2228 $t->addStickyItem($b);
2231 $this->lng->loadLanguageModule(
'obj');
2232 $t->addFormButton($this->lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
2234 $t->addFormButton($this->lng->txt(
"cancel"),
"cancelMoveLink");
2235 $t->setCloseFormTag(
false);
2239 $t->setCloseFormTag(
true);
2240 $t->setOpenFormTag(
false);
2243 $this->tpl->setContent(
$output);
2256 $ilCtrl->returnToParent($this);
2266 ilUtil::sendSuccess($this->lng->txt(
"obj_inserted_clipboard"),
true);
2267 $ilCtrl->returnToParent($this);
2276 $_SESSION[
'paste_copy_repexpand'] = array();
2283 foreach ((array)
$path as $node_id) {
2284 if (!in_array($node_id,
$_SESSION[
'paste_copy_repexpand'])) {
2285 $_SESSION[
'paste_copy_repexpand'][] = $node_id;
2298 $_SESSION[
'paste_cut_repexpand'] = array();
2305 foreach ((array)
$path as $node_id) {
2306 if (!in_array($node_id,
$_SESSION[
'paste_cut_repexpand'])) {
2307 $_SESSION[
'paste_cut_repexpand'][] = $node_id;
2334 $not_allowed_subobject = [];
2337 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
2341 if (!in_array(
$_SESSION[
"clipboard"][
"cmd"], array(
"cut",
"link",
"copy"))) {
2342 $message = get_class($this) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2351 if (!
$rbacsystem->checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
2353 $no_paste_titles[] = $obj_data->getTitle();
2357 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId())) {
2363 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
2367 if (
$ref_id == $this->object->getRefId()) {
2372 $obj_type = $obj_data->getType();
2374 if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects()))) {
2375 $not_allowed_subobject[] = $obj_data->getType();
2382 if (count($exists) > 0 &&
$_SESSION[
"clipboard"][
"cmd"] !=
"copy") {
2384 $ilErr->raiseError($this->lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
2387 if (count($is_child) > 0) {
2389 $this->lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
2394 if (count($not_allowed_subobject) > 0) {
2396 $this->lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
2401 if (count($no_paste) > 0) {
2402 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_paste") .
" " .
2403 implode(
',', $no_paste),
$ilErr->MESSAGE);
2407 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " .
$_SESSION[
"clipboard"][
"cmd"]);
2413 $ref_ids =
$_SESSION[
"clipboard"][
"ref_ids"];
2414 unset(
$_SESSION[
"clipboard"][
"ref_ids"]);
2418 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"copy") {
2422 if (count($ref_ids) == 1) {
2423 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->object->getRefId());
2424 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
2425 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
2427 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->object->getRefId());
2428 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
2429 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
2463 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
2468 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") {
2469 foreach ($ref_ids as
$ref_id) {
2472 $this->tree->moveTree(
$ref_id, $this->object->getRefId());
2475 include_once(
'./Services/Conditions/classes/class.ilConditionHandler.php');
2480 $old_parent_data =
$tree->getNodeData($old_parent);
2482 $node_data[
'obj_id'],
2485 $old_parent_data[
'obj_id']
2488 $node_data[
'obj_id'],
2491 $this->object->getId()
2499 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"link") {
2500 foreach ($ref_ids as
$ref_id) {
2502 $top_node = $this->tree->getNodeData(
$ref_id);
2505 $subnodes[
$ref_id] = $this->tree->getSubtree($top_node);
2509 foreach ($subnodes as
$key => $subnode) {
2512 $new_ref_id = $obj_data->createReference();
2513 $obj_data->putInTree(
$_GET[
"ref_id"]);
2514 $obj_data->setPermissions(
$_GET[
"ref_id"]);
2517 $node_data =
$tree->getNodeData($new_ref_id);
2519 $node_data[
'obj_id'],
2522 $this->object->getId()
2528 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
2532 $last_cmd =
$_SESSION[
"clipboard"][
"cmd"];
2538 if ($last_cmd ==
"cut") {
2539 ilUtil::sendSuccess($this->lng->txt(
"msg_cut_copied"),
true);
2542 elseif ($last_cmd ==
"copy") {
2543 ilUtil::sendSuccess($this->lng->txt(
"msg_cloned"),
true);
2544 } elseif ($last_cmd ==
'link') {
2546 ilUtil::sendSuccess($this->lng->txt(
"msg_linked"),
true);
2549 $this->ctrl->returnToParent($this);
2566 $ilTabs->activateTab(
"clipboard");
2570 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2572 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->WARNING);
2582 "type" => $tmp_obj->getType(),
2583 "type_txt" => $this->lng->txt(
"obj_" . $tmp_obj->getType()),
2584 "title" => $tmp_obj->getTitle(),
2585 "cmd" => (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") ? $this->lng->txt(
"move") :$this->lng->txt(
$_SESSION[
"clipboard"][
"cmd"]),
2587 "obj_id" => $tmp_obj->getId()
2593 include_once(
"./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2598 if (count(
$data) > 0) {
2599 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
2600 $ilToolbar->addFormButton(
2601 $lng->txt(
"insert_object_here"),
2604 $ilToolbar->addFormButton(
2605 $lng->txt(
"clear_clipboard"),
2619 $this->object->getRefId() &&
2620 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2624 return $_SESSION[
"il_cont_admin_panel"];
2633 parent::setColumnSettings($column_gui);
2635 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
2636 $this->isActiveAdministrationPanel() &&
2637 $this->allowBlocksMoving()) {
2642 $this->object->getSubItems($this->isActiveAdministrationPanel(),
true)
2647 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2707 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2712 if (!$_REQUEST[
'clone_source']) {
2714 if (isset(
$_SESSION[
'wizard_search_title'])) {
2715 $this->searchCloneSourceObject();
2721 $source_id = $_REQUEST[
'clone_source'];
2722 $new_type = $_REQUEST[
'new_type'];
2723 $this->ctrl->setParameter($this,
'clone_source', (
int) $_REQUEST[
'clone_source']);
2724 $this->ctrl->setParameter($this,
'new_type', $new_type);
2728 $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
2729 $this->tpl->setVariable(
'BODY_ATTRIBUTES',
'onload="ilDisableChilds(\'cmd\');"');
2732 $this->tpl->addBlockFile(
2735 'tpl.container_wizard_page.html',
2736 "Services/Container"
2738 $this->tpl->setVariable(
'FORMACTION', $this->ctrl->getFormAction($this));
2740 $this->tpl->setVariable(
'ALT_IMG', $this->lng->txt(
'obj_' . $new_type));
2741 $this->tpl->setVariable(
'TXT_DUPLICATE', $this->lng->txt($new_type .
'_wizard_page'));
2742 $this->tpl->setVariable(
'INFO_DUPLICATE', $this->lng->txt($new_type .
'_copy_threads_info'));
2743 $this->tpl->setVariable(
'BTN_COPY', $this->lng->txt(
'obj_' . $new_type .
'_duplicate'));
2744 $this->tpl->setVariable(
'BTN_BACK', $this->lng->txt(
'btn_back'));
2745 if (isset(
$_SESSION[
'wizard_search_title'])) {
2746 $this->tpl->setVariable(
'CMD_BACK',
'searchCloneSource');
2748 $this->tpl->setVariable(
'CMD_BACK',
'create');
2751 $this->tpl->setVariable(
'BTN_TREE', $this->lng->txt(
'treeview'));
2752 $this->tpl->setVariable(
'BTN_LIST', $this->lng->txt(
'flatview'));
2759 foreach ($subnodes =
$tree->getSubtree($source_node =
$tree->getNodeData($source_id),
true) as $node) {
2760 if ($first ==
true) {
2765 if ($node[
'type'] ==
'rolf') {
2771 for (
$i = $source_node[
'depth'];
$i < $node[
'depth'];
$i++) {
2772 $this->tpl->touchBlock(
'padding');
2773 $this->tpl->touchBlock(
'end_padding');
2777 $copy_wizard_page->fillTreeSelection($node[
'ref_id'], $node[
'type'], $node[
'depth']);
2779 $this->tpl->setCurrentBlock(
'tree_row');
2781 $this->tpl->setVariable(
'TREE_ALT_IMG', $this->lng->txt(
'obj_' . $node[
'type']));
2782 $this->tpl->setVariable(
'TREE_TITLE', $node[
'title']);
2783 $this->tpl->parseCurrentBlock();
2786 $this->tpl->setCurrentBlock(
'no_content');
2787 $this->tpl->setVariable(
'TXT_NO_CONTENT', $this->lng->txt(
'container_no_items'));
2788 $this->tpl->parseCurrentBlock();
2790 $this->tpl->setCurrentBlock(
'tree_footer');
2791 $this->tpl->setVariable(
'TXT_COPY_ALL', $this->lng->txt(
'copy_all'));
2792 $this->tpl->setVariable(
'TXT_LINK_ALL', $this->lng->txt(
'link_all'));
2793 $this->tpl->setVariable(
'TXT_OMIT_ALL', $this->lng->txt(
'omit_all'));
2794 $this->tpl->parseCurrentBlock();
2797 foreach (
$tree->getSubTreeTypes($source_id, array(
'rolf',
'crs')) as
$type) {
2799 if (strlen(
$html = $copy_wizard_page->getWizardPageBlockHTML())) {
2800 $this->tpl->setCurrentBlock(
'obj_row');
2801 $this->tpl->setVariable(
'ITEM_BLOCK',
$html);
2802 $this->tpl->parseCurrentBlock();
2820 include_once(
'./Services/Link/classes/class.ilLink.php');
2821 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2829 $new_type = $_REQUEST[
'new_type'];
2831 $clone_source = (int) $_REQUEST[
'clone_source'];
2834 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2836 if (!$clone_source) {
2841 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
2842 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2849 include_once
'./Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
2851 ilUtil::sendSuccess($this->lng->txt(
"object_duplicated"),
true);
2852 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$result[
'ref_id']);
2853 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
2856 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
2857 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
2871 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
2875 $positions = str_replace(
',',
'.',
$_POST[
'position']);
2877 $sorting->savePost($positions);
2878 ilUtil::sendSuccess($this->lng->txt(
'cntr_saved_sorting'),
true);
2879 $this->ctrl->redirect($this,
"editOrder");
2893 public function cloneNodes($srcRef, $dstRef, &$mapping, $newName =
null)
2899 error_log(__METHOD__ .
' cloning srcRef=' . $srcRef .
' dstRef=' . $dstRef .
'...');
2900 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2901 error_log(__METHOD__ .
' ...cloning... newRef=' . $newRef .
'...');
2906 if (!is_null($newName)) {
2908 $newObj->setTitle($newName);
2913 $mapping[$newRef] = $srcRef;
2916 $children =
$tree->getChilds($srcRef);
2917 foreach (
$tree->getChilds($srcRef) as $child) {
2920 if ($child[
"type"] !=
'rolf') {
2921 $this->
cloneNodes($child[
"ref_id"], $newRef, $mapping);
2923 if (count($rolf =
$tree->getChildsByType($newRef,
"rolf"))) {
2924 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2928 error_log(__METHOD__ .
' ...cloned srcRef=' . $srcRef .
' dstRef=' . $dstRef .
' newRef=' . $newRef);
2944 $a_item_list_gui->addCustomProperty(
2946 ilContainer::buildPath($a_item_data[
'ref_id'], $this->object->getRefId()),
2962 $path_arr =
$tree->getPathFull($a_ref_id, $a_course_ref_id);
2964 foreach ($path_arr as
$data) {
2989 $tpl->setContent($this->form->getHTML());
2991 $ilTabs->activateTab(
"obj_sty");
3005 $tpl->setTreeFlatIcon(
"",
"");
3006 $ilTabs->clearTargets();
3008 $this->object->getId(),
3011 if ($xpage_id > 0) {
3012 $ilTabs->setBackTarget(
3013 $lng->txt(
"cntr_back_to_old_editor"),
3014 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
3018 $ilTabs->setBackTarget(
$lng->txt(
"back"),
"./goto.php?target=" . $this->object->getType() .
"_" .
3019 $this->object->getRefId(),
"_top");
3022 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
3024 $style_id = $this->
object->getStyleSheetId();
3026 $page_gui->setStyleId($style_id);
3030 $page_gui->setTabHook($this,
"addPageTabs");
3032 $ilTabs->setTabActive(
"obj_sty");
3034 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3035 $lng->loadLanguageModule(
"style");
3037 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3040 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
3043 if ($fixed_style > 0) {
3046 $this->lng->txt(
"global_fixed") .
")");
3047 $this->form->addItem($st);
3055 $st_styles[0] = $this->lng->txt(
"default");
3058 if ($style_id > 0) {
3063 $this->form->addItem($st);
3068 $this->form->addCommandButton(
3070 $lng->txt(
"style_edit_style")
3072 $this->form->addCommandButton(
3074 $lng->txt(
"style_delete_style")
3089 $style_sel->setOptions($st_styles);
3090 $style_sel->setValue($style_id);
3091 $this->form->addItem($style_sel);
3093 $this->form->addCommandButton(
3094 "saveStyleSettings",
3097 $this->form->addCommandButton(
3099 $lng->txt(
"sty_create_ind_style")
3103 $this->form->setTitle(
$lng->txt(
"obj_sty"));
3104 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
3114 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
3124 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
3134 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
3144 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3145 if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
3147 || $this->object->getStyleSheetId() == 0)) {
3149 $this->
object->update();
3150 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
3152 $this->ctrl->redirect($this,
"editStyleProperties");
3169 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
3171 $item_list_gui->setContainerObject($this);
3173 $item_list_gui->enableComments(
true);
3174 $item_list_gui->enableNotes(
true);
3175 $item_list_gui->enableTags(
true);
3178 $html = $item_list_gui->getListItemHTML(
3189 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
3190 foreach ($pl_names as $pl) {
3192 $gui_class = $ui_plugin->getUIClassInstance();
3193 $resp = $gui_class->getHTML(
"Services/Container",
"async_item_list", array(
"html" =>
$html));
3195 $html = $gui_class->modifyHTML(
$html, $resp);
3217 include_once(
'Services/WebDAV/classes/class.ilWebDAVUtil.php');
3219 $ilToolbar->addButton(
3220 $this->lng->txt(
'mount_webfolder'),
3221 $dav_util->getMountURI($this->object->getRefId()),
3224 $dav_util->getFolderURI($this->object->getRefId())
3228 $tpl->setContent($this->form->getHTML());
3237 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3239 $this->form->setFormAction($this->ctrl->getFormAction($this));
3242 $ipass =
new ilPasswordInputGUI($this->lng->txt(
"desired_password"),
"new_password");
3243 $ipass->setRequired(
true);
3245 $this->form->addItem($ipass);
3246 $this->form->addCommandButton(
"savePassword", $this->lng->txt(
"save"));
3247 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
3249 $this->form->setTitle($this->lng->txt(
"chg_ilias_and_webfolder_password"));
3250 $this->form->setFormAction($this->ctrl->getFormAction($this));
3264 if (
$form->checkInput()) {
3265 $ilUser->resetPassword($this->form->getInput(
'new_password'), $this->form->getInput(
'new_password'));
3266 ilUtil::sendSuccess($this->lng->txt(
'webdav_pwd_instruction_success'),
true);
3270 $form->setValuesByPost();
3286 $item_data = $this->
object->getSubItems(
false,
false, (
int)
$_GET[
"child_ref_id"]);
3290 include_once
'./Modules/Session/classes/class.ilEventItems.php';
3292 if (in_array((
int)
$_GET[
"child_ref_id"], $event_items)) {
3293 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
3294 foreach ($this->object->items[
"sess"] as
$id) {
3296 foreach ($items as $event_item) {
3297 if ($event_item[
"child"] == (
int)
$_GET[
"child_ref_id"]) {
3299 if ((
int)
$_GET[
"parent_ref_id"]) {
3300 $event_item[
"parent"] = (int)
$_GET[
"parent_ref_id"];
3302 $html = $container_view->renderItem($event_item);
3310 foreach ($this->object->items[
"_all"] as
$id) {
3311 if (
$id[
"child"] == (
int)
$_GET[
"child_ref_id"]) {
3312 $html = $container_view->renderItem(
$id);
3321 echo
$tpl->getOnLoadCodeForAsynch();
3336 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3339 include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3342 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
'fileManagerLaunch'),
'fm_start',
'_blank');
3356 $tpl =
new ilTemplate(
'tpl.fm_launch_ws.html',
false,
false,
'Services/WebServices/FileManager');
3357 $tpl->setVariable(
'JNLP_URL', ILIAS_HTTP_PATH .
'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3358 $tpl->setVariable(
'SESSION_ID',
$_COOKIE[session_name()] .
'::' . CLIENT_ID);
3360 $tpl->setVariable(
'REF_ID', $this->object->getRefId());
3361 $tpl->setVariable(
'WSDL_URI', ILIAS_HTTP_PATH .
'/webservice/soap/server.php?wsdl');
3363 $tpl->setVariable(
'REST_URI', ILIAS_HTTP_PATH .
'/Services/WebServices/Rest/server.php');
3364 $tpl->setVariable(
'FILE_LOCKS', 0);
3367 include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3368 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3369 $tpl->setVariable(
'HEADER_TITLE', $header_top_title ? $header_top_title :
'');
3386 if (!empty(
$_GET[
"set_mode"])) {
3388 if (
$ilUser->getId() != ANONYMOUS_USER_ID) {
3395 if (
$ilUser->getId() != ANONYMOUS_USER_ID) {
3405 $mode = (
$_SESSION[
"il_rep_mode"] !=
"")
3409 if (isset($_REQUEST[
'new_type'])) {
3414 if ($mode ==
"tree" && (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui")) {
3415 include_once(
"./Services/Repository/classes/class.ilRepositoryExplorerGUI.php");
3417 if (method_exists($this,
'getAdditionalWhitelistTypes')) {
3418 $whitelist = array_merge(
3419 $exp->getTypeWhiteList(),
3420 $this->getAdditionalWhitelistTypes()
3422 $exp->setTypeWhiteList($whitelist);
3425 if (!$exp->handleCommand()) {
3426 $tpl->setLeftNavContent($exp->getHTML());
3441 $lng->loadLanguageModule($this->object->getType());
3443 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3445 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
3446 $form->setTitle($this->lng->txt($this->object->getType() .
"_edit"));
3448 $this->initFormTitleDescription(
$form);
3452 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
3465 if (is_object($this->
object)) {
3466 $trans = $this->
object->getObjectTranslation();
3470 $title->setRequired(
true);
3473 if (is_object($trans)) {
3474 $title->setValue($trans->getDefaultTitle());
3478 if (is_object($trans) &&
sizeof($trans->getLanguages()) > 1) {
3479 include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
3481 $title->setInfo($this->lng->txt(
"language") .
": " .
$languages[$trans->getDefaultLanguage()] .
3482 ' <a href="' . $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"") .
3483 '">» ' . $this->lng->txt(
"obj_more_translations") .
'</a>');
3491 if (is_object($trans)) {
3492 $desc->setValue($trans->getDefaultDescription());
3494 $form->addItem($desc);
3505 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
3506 include_once
'./Services/Container/classes/class.ilContainer.php';
3513 $sort_inherit->setTitle(
3514 $this->lng->txt(
'sort_inherit_prefix') .
3517 $this->object->getId()
3522 $sort_inherit->setInfo($this->lng->txt(
'sorting_info_inherit'));
3523 $sort->addOption($sort_inherit);
3527 $this->lng->txt(
'sorting_title_header'),
3530 $sort_title->setInfo($this->lng->txt(
'sorting_info_title'));
3533 $sort->addOption($sort_title);
3537 $sort_activation->setInfo($this->lng->txt(
'sorting_creation_info'));
3539 $sort->addOption($sort_activation);
3543 $sort_activation->setInfo($this->lng->txt(
'crs_sort_timing_info'));
3545 $sort->addOption($sort_activation);
3549 $this->lng->txt(
'sorting_manual_header'),
3552 $sort_manual->setInfo($this->lng->txt(
'sorting_info_manual'));
3554 $sort->addOption($sort_manual);
3558 if (in_array(
$settings->getSortMode(), $a_sorting_settings)) {
3559 $sort->setValue(
$settings->getSortMode());
3563 $form->addItem($sort);
3575 $lpres =
new ilRadioGroupInputGUI($this->lng->txt(
'cont_list_presentation'),
"list_presentation");
3577 $item_list =
new ilRadioOption($this->lng->txt(
'cont_item_list'),
"");
3579 $lpres->addOption($item_list);
3581 $tile_view =
new ilRadioOption($this->lng->txt(
'cont_tile_view'),
"tile");
3583 $lpres->addOption($tile_view);
3589 $form->addItem($lpres);
3600 $val = (
$form->getInput(
'list_presentation') ==
"tile")
3613 if ($a_prefix ==
'manual') {
3614 $txt = $this->lng->txt(
'sorting_new_items_direction');
3616 $txt = $this->lng->txt(
'sorting_direction');
3621 $direction->setRequired(
true);
3625 $this->lng->txt(
'sorting_asc'),
3628 $direction->addOption($asc);
3632 $this->lng->txt(
'sorting_desc'),
3635 $direction->addOption($desc);
3637 $element->addSubItem($direction);
3652 $position =
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_position'), $a_prefix .
'_new_items_position');
3653 $position->setValue(
$settings->getSortNewItemsPosition());
3654 $position->setRequired(
true);
3658 $this->lng->txt(
'sorting_new_items_at_top'),
3662 $position->addOption($new_top);
3666 $this->lng->txt(
'sorting_new_items_at_bottom'),
3670 $position->addOption($new_bottom);
3672 $element->addSubItem($position);
3674 $order =
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
3675 $order->setValue(
$settings->getSortNewItemsOrder());
3676 $order->setRequired(
true);
3681 $this->lng->txt(
'sorting_title_header'),
3685 $order->addOption($new_title);
3691 $this->lng->txt(
'sorting_creation_header'),
3695 $order->addOption($new_creation);
3702 $this->lng->txt(
'crs_sort_activation'),
3706 $order->addOption($new_activation);
3709 $element->addSubItem($order);
3722 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
3726 switch (
$form->getInput(
'sorting')) {
3728 $settings->setSortDirection(
$form->getInput(
'title_sorting_direction'));
3731 $settings->setSortDirection(
$form->getInput(
'activation_sorting_direction'));
3734 $settings->setSortDirection(
$form->getInput(
'creation_sorting_direction'));
3737 $settings->setSortNewItemsPosition(
$form->getInput(
'manual_new_items_position'));
3738 $settings->setSortNewItemsOrder(
$form->getInput(
'manual_new_items_order'));
3739 $settings->setSortDirection(
$form->getInput(
'manual_sorting_direction'));
3755 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3757 $ru->showTrashTable(
$_GET[
"ref_id"]);
3771 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3773 $ru->removeObjectsFromSystem(
$_POST[
"trash_id"]);
3774 $this->ctrl->redirect($this,
"trash");
3782 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3784 $ru->restoreObjects(
$_GET[
"ref_id"],
$_POST[
"trash_id"]);
3785 $this->ctrl->redirect($this,
"trash");
3794 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3796 if (!isset(
$_POST[
"trash_id"])) {
3798 $this->ctrl->redirect($this,
"trash");
3802 $ru->confirmRemoveFromSystemObject(
$_POST[
"trash_id"]);
3811 include_once(
"./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3817 $exp->setTypeWhiteList(array(
"root",
"cat",
"grp",
"crs",
"fold"));
3821 if (in_array(
$_SESSION[
"clipboard"][
"cmd"], [
"link",
"cut"])) {
3822 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
3823 $refs =
$_SESSION[
"clipboard"][
"ref_ids"];
3825 foreach ($refs as $item_ref_id) {
3827 if (!in_array(
$type, $lso_types)) {
3832 $whitelist = $exp->getTypeWhiteList();
3833 $whitelist[] =
'lso';
3834 $exp->setTypeWhiteList($whitelist);
3838 if ($cmd ==
"link") {
3839 $exp->setSelectMode(
"nodes",
true);
3842 $exp->setSelectMode(
"nodes[]",
false);
3852 $this->ctrl->setReturn($this,
"");
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
static _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.
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
Column user interface class.
setBlockProperty($a_block_type, $a_property, $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...
setEnableMovement($a_enablemovement)
Set Enable Movement.
setRepositoryItems($a_repositoryitems)
Set Repository Items.
setAdminCommands($a_admincommands)
Set Administration Commmands.
static _adjustMovedObjectConditions($a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
Shows all items grouped by type.
downloadMultipleObjects($a_ref_ids)
clearObject()
clear clipboard and go back to last object
saveSortingObject()
Save Sorting.
afterUpdate()
Post (successful) object update hook.
editPageFrameObject()
show page editor frameset
clipboardObject()
show clipboard
initAndDisplayMoveIntoObjectObject()
getAsynchItemListObject()
Get item list command drop down asynchronously.
isActiveAdministrationPanel()
savePasswordObject()
Save password.
cloneWizardPageTreeObject()
@access public
setContentSubTabs()
Set content sub tabs.
setSideColumnReturn()
Set return point for side column actions.
initFormPasswordInstruction()
Init password form.
initEditForm()
Init object edit form.
& forwardToPageObject()
forward command to page object
getEditFormValues()
Get values for edit form.
disableAdministrationPanelObject()
enable administration panel
trashObject()
Show trash content of object.
initAndDisplayCopyIntoMultipleObjectsObject()
static _buildPath($a_ref_id, $a_course_ref_id)
build path
initStylePropertiesForm()
Init style properties form.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
cutObject()
cut object(s) out from a container and write the information to clipboard
confirmRemoveFromSystemObject()
confirmation screen remove from system
showPasteTreeObject()
Show paste tree.
getContentGUI()
Get content gui object.
enableMultiDownloadObject()
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
performPasteIntoMultipleObjectsObject()
addHeaderRow(&$a_tpl, $a_type, $a_show_image=true)
adds a header row to a block template
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
allowBlocksConfigure()
Standard is to allow blocks configuration.
isActiveOrdering()
Check if ordering is enabled.
cloneNodes($srcRef, $dstRef, &$mapping, $newName=null)
Recursively clones all nodes of the RBAC tree.
getContainerPageHTML()
Get container page HTML.
initManualSortingOptionForm(ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
Add manual sorting options.
clearAdminCommandsDetermination()
cleaer administration commands determination
switchToOldEditorObject()
Switch to old page editor.
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
renderBlockAsynchObject()
render the object
static copyFile($obj_id, $title, $tmpdir)
& newBlockTemplate()
determin admin commands
showPermanentLink()
show permanent link
redrawListItemObject()
Redraw a list item (ajax)
undeleteObject()
Get objects back from trash.
prepareOutput($a_show_subobjects=true)
prepare output
showPasswordInstructionObject($a_init=true)
Show webdav password instruction.
fileManagerLaunchObject()
Launch jnlp.
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
editStylePropertiesObject()
Edit style properties.
__showTimingsButton(&$tpl)
editStyleObject()
Edit Style.
saveStyleSettingsObject()
Save style settings.
modifyItemGUI($a_item_list_gui, $a_item_data, $a_show_path)
Modify list gui for presentation in container.
setPageEditorTabs()
Add page editor tabs.
useNewEditorObject()
Use new editor (-> delete xhtml content page)
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
Add sorting direction.
renderObject()
render the object
addPageTabs()
Add page tabs.
cloneWizardPageObject($a_tree_view=true)
Show clone wizard page for container objects.
initAndDisplayLinkIntoMultipleObjectsObject()
addMessageRow(&$a_tpl, $a_message, $a_type)
add message row
editOrderObject()
Edit order.
setTitleAndDescription()
called by prepare output
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add file manager link.
forwardToStyleSheet()
Forward to style object.
isActiveItemOrdering()
Check if item ordering is enabled.
cancelPageContentObject()
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
allowBlocksMoving()
Standard is to allow blocks moving.
enableAdministrationPanelObject()
enable administration panel
copyObject()
Copy object(s) out from a container and write the information to clipboard It is not possible to copy...
setColumnSettings(ilColumnGUI $column_gui)
May be overwritten in subclasses.
showPossibleSubObjects()
show possible sub objects selection list
linkObject()
create an new reference of an object in tree it's like a hard link of unix
deleteStyleObject()
Delete Style.
cloneWizardPageListObject()
@access public
switchToStdEditorObject()
Switch to standard page editor.
createStyleObject()
Create Style.
editPageContentObject()
edit page content (for repository root node and categories)
addDownloadButton(&$tpl, &$toolbar)
keepObjectsInClipboardObject()
Keep objects in the clipboard.
showAdministrationPanel()
show administration panel
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
removeFromSystemObject()
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
executeCommand()
execute command note: this method is overwritten in all container objects
cloneAllObject()
Clone all object Overwritten method for copying container objects.
static recurseFolder($refid, $title, $tmpdir)
private functions which iterates through all folders and files and create an according file structure...
getTabs()
common tabs for all container objects (should be called at the end of child getTabs() method
GUI class for course objective view.
Container page GUI class.
Shows all items in one block.
Shows all items in one block.
static lookupSortModeFromParentContainer($a_obj_id)
Lookup sort mode from parent container.
static _lookupSortMode($a_obj_id)
lookup sort mode
static sortModeToString($a_sort_mode)
get String representation of sort mode
getSortDirection()
Get sort direction.
static _getInstance($a_obj_id)
get instance by obj_id
const SORT_DIRECTION_DESC
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
const SORT_NEW_ITEMS_ORDER_ACTIVATION
const SORT_NEW_ITEMS_ORDER_TITLE
const SORT_NEW_ITEMS_ORDER_CREATION
static _writeContainerSetting($a_id, $a_keyword, $a_value)
const SORT_NEW_ITEMS_POSITION_BOTTOM
const SORT_NEW_ITEMS_POSITION_TOP
static _isFinished($a_copy_id)
check if copy is finished
static _getInstanceByType($a_source_id, $a_item_type)
Get instance by type.
static addToDesktop()
Add desktop item @access public.
static removeFromDesktop()
Remove item from personal desktop @access public.
GUI class for didactic template settings inside repository objects.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
static _getItemsOfContainer($a_ref_id)
static getInstance()
Get singleton instance.
Class to report exception.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static showMemberViewSwitch($a_ref_id)
Show member view switch.
static getInstance()
Get instance.
This class represents a non editable value in a property form.
static _getUsedHTMLTagsAsString($a_module="")
Returns a string of all allowed HTML tags for text editing.
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.
static _lookupAbsolutePath($obj_id, $a_version=null)
Class ilObjStyleSheetGUI.
static _lookupStandard($a_id)
Lookup standard flag.
static getSyntaxStylePath()
get syntax style path
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static getItemsByEvent($a_event_id)
Get session material / event items.
Render add new item selector.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObjectGUI Basic methods of all Output classes.
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.
getCreationMode()
get creation mode
createObject()
create new object form
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
static getInstance($a_obj_id)
Get instance.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
static _isInTrash($a_ref_id)
checks wether object is in trash
static _lookupType($a_id, $a_reference=false)
lookup object type
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static _existsAndNotEmpty($a_parent_type, $a_id, $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static _getRTEClassname()
static _cleanupMediaObjectUsage($a_text, $a_usage_type, $a_usage_id)
Synchronises appearances of media objects in $a_text with media object usage table.
This class represents an option in a radio group.
static add($a_action, $a_ref_id, array $a_diff, $a_source_ref_id=false)
static gatherFaPa($a_ref_id, array $a_role_ids, $a_add_action=false)
Repository GUI Utilities.
Repository explorer GUI class.
Explorer for selecting repository items.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
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.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static getInstance()
Get singleton instance.
if(!array_key_exists('StateId', $_REQUEST)) $id
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
catch(Exception $e) $message
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
if(isset($_POST['submit'])) $form