6require_once
"./Services/Object/classes/class.ilObjectGUI.php";
7require_once
"./Services/Container/classes/class.ilContainer.php";
129 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
133 $this->lng =
$DIC->language();
134 $this->tpl =
$DIC[
"tpl"];
135 $this->ctrl =
$DIC->ctrl();
136 $this->tabs =
$DIC->tabs();
138 $this->
user = $DIC->user();
139 $this->db =
$DIC->database();
140 $this->access =
$DIC->access();
141 $this->tree =
$DIC->repositoryTree();
142 $this->
error = $DIC[
"ilErr"];
143 $this->obj_definition =
$DIC[
"objDefinition"];
144 $this->rbacadmin =
$DIC->rbac()->admin();
145 $this->rbacreview =
$DIC->rbac()->review();
146 $this->log =
$DIC[
"ilLog"];
147 $this->obj_data_cache =
$DIC[
"ilObjDataCache"];
148 $this->toolbar =
$DIC->toolbar();
149 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
150 $this->app_event_handler =
$DIC[
"ilAppEventHandler"];
151 $this->
ui = $DIC->ui();
152 $this->global_screen =
$DIC->globalScreen();
158 $lng->loadLanguageModule(
"cntr");
159 $lng->loadLanguageModule(
'cont');
177 $next_class = $this->ctrl->getNextClass();
178 $cmd = $this->ctrl->getCmd(
"render");
181 switch ($next_class) {
183 case "ilcontainerpagegui":
184 if (
$_GET[
"redirectSource"] !=
"ilinternallinkgui") {
192 case "ilobjstylesheetgui":
212 $values = parent::getEditFormValues();
214 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
215 $values[
'didactic_type'] =
227 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
229 $this->object->getRefId()
233 if ($new_tpl_id != $current_tpl_id) {
234 $_REQUEST[
'tplid'] = $new_tpl_id;
237 include_once
'./Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
238 $this->ctrl->setReturn($this,
'edit');
239 $this->ctrl->setCmdClass(
'ildidactictemplategui');
240 $this->ctrl->setCmd(
'confirmTemplateSwitch');
242 return $this->ctrl->forwardCommand($dtpl_gui);
244 parent::afterUpdate();
256 $ilTabs->clearTargets();
259 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
260 $this->ctrl->setReturn($this,
"editStyleProperties");
261 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
262 $style_gui->omitLocator();
263 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
264 $style_gui->setCreationMode(
true);
267 if ($cmd ==
"confirmedDelete") {
268 $this->
object->setStyleSheetId(0);
269 $this->
object->update();
272 $ret = $this->ctrl->forwardCommand($style_gui);
274 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
276 $this->
object->setStyleSheetId($style_id);
277 $this->
object->update();
278 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
294 if (in_array($cmd, array(
"displayMediaFullscreen",
"downloadFile",
"displayMedia"))) {
300 $ilTabs->clearTargets();
302 if (
$_GET[
"redirectSource"] ==
"ilinternallinkgui") {
307 $this->object->getId(),
311 $ilTabs->setBackTarget(
312 $lng->txt(
"cntr_back_to_old_editor"),
313 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
317 $ilTabs->setBackTarget(
$lng->txt(
"back"),
"./goto.php?target=" . $this->object->getType() .
"_" .
318 $this->object->getRefId(),
"_top");
322 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
323 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
325 $lng->loadLanguageModule(
"content");
327 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
335 $this->object->getId()
339 $new_page_object->setParentId($this->object->getId());
340 $new_page_object->setId($this->object->getId());
341 $new_page_object->createFromXML();
345 $this->ctrl->setReturnByClass(
"ilcontainerpagegui",
"edit");
347 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
349 $this->object->getStyleSheetId(),
350 $this->object->getType()
353 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
354 $page_gui->setFileDownloadLink(
"");
356 $page_gui->setPresentationTitle(
"");
357 $page_gui->setTemplateOutput(
false);
361 $this->object->getId(),
366 "tpl.cntr_old_editor_message.html",
371 $wtpl->setVariable(
"ALT_WARNING",
$lng->txt(
"warning"));
376 $wtpl->setVariable(
"TXT_MIGRATION_INFO",
$lng->txt(
"cntr_switch_to_new_editor_message"));
377 $wtpl->setVariable(
"TXT_MIGRATION_INFO",
$lng->txt(
"cntr_switch_to_new_editor_message"));
379 "HREF_SWITCH_TO_NEW_EDITOR",
380 $ilCtrl->getLinkTarget($this,
"useNewEditor")
383 "TXT_MIGRATION_SWITCH",
384 $lng->txt(
"cntr_switch_to_new_editor_cmd")
386 $page_gui->setPrependingHtml($wtpl->get());
390 $page_gui->setTabHook($this,
"addPageTabs");
392 $ret = $this->ctrl->forwardCommand($page_gui);
408 $ilCtrl->getLinkTarget($this,
'editStyleProperties'),
409 "editStyleProperties"
421 if (!
$ilSetting->get(
"enable_cat_page_edit") || $this->object->filteredSubtree()) {
427 $this->object->getId(),
431 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
433 return $xpage->getContent();
441 include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
444 $this->object->getId()
448 include_once(
"./Services/Container/classes/class.ilContainerPage.php");
449 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
451 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
452 $this->tpl->setVariable(
453 "LOCATION_CONTENT_STYLESHEET",
456 $this->tpl->setCurrentBlock(
"SyntaxStyle");
457 $this->tpl->setVariable(
458 "LOCATION_SYNTAX_STYLESHEET",
461 $this->tpl->parseCurrentBlock();
464 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
466 $lang = $ot->getEffectiveContentLang(
$ilUser->getCurrentLanguage(),
"cont");
468 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
470 $this->object->getStyleSheetId(),
471 $this->object->getType()
474 $page_gui->setPresentationTitle(
"");
475 $page_gui->setTemplateOutput(
false);
476 $page_gui->setHeader(
"");
477 $ret = $page_gui->showPage();
490 if (parent::prepareOutput($a_show_subobjects)) {
493 #$this->showPossibleSubObjects();
497 include_once
'./Services/Container/classes/class.ilMemberViewGUI.php';
508 if (
$_GET[
"obj_id"] !=
"") {
512 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
517 $mode = (
$_SESSION[
"il_rep_mode"] ==
"flat")
520 $link =
"ilias.php?baseClass=ilRepositoryGUI&cmd=frameset&set_mode=" . $mode .
"&ref_id=" . $this->
object->getRefId();
521 $tpl->setTreeFlatIcon($link, $mode);
530 $this->tpl->setTitle((
string) $this->object->getTitle(),
true);
532 $this->tpl->setTitle((
string) $this->object->getTitle());
533 $this->tpl->setDescription($this->object->getLongDescription());
536 $icon = ilObject::_getIcon($this->object->getId(),
"big", $this->object->getType());
537 $this->tpl->setTitleIcon($icon, $this->lng->txt(
"obj_" . $this->object->getType()));
539 include_once
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
541 $lgui->initItem($this->object->getRefId(), $this->object->getId(), $this->object->getType());
542 $this->tpl->setAlertProperties($lgui->getAlertProperties());
551 include_once
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
564 $view_mode = $this->
object->getViewMode();
565 if ($this->object->filteredSubtree()) {
568 switch ($view_mode) {
571 include_once(
"./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
576 include_once(
'./Services/Container/classes/class.ilContainerObjectiveGUI.php');
583 include_once(
"./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
590 include_once(
"./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
594 return $container_view;
614 $ilTabs->activateSubTab(
"manage");
616 $ilTabs->activateSubTab(
"view_content");
619 $container_view->setOutput();
621 $this->adminCommands = $container_view->adminCommands;
625 if (
$ilCtrl->getNextClass() !=
"ilcolumngui") {
630 $this->showContainerFilter();
635 if ((
int)
$_GET[
"ref_id"] > 1 &&
$ilSetting->get(
"rep_tree_synchronize")) {
636 $ilCtrl->setParameter($this,
"active_node", (
int)
$_GET[
"ref_id"]);
646 echo $container_view->getSingleTypeBlockAsynch(
$_GET[
"type"]);
669 $main_tpl =
$DIC->ui()->mainTemplate();
671 $lng->loadLanguageModule(
'cntr');
675 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
677 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
679 $this->ctrl->setParameter($this,
"type",
"");
680 $this->ctrl->setParameter($this,
"item_ref_id",
"");
683 $this->lng->txt(
'paste_clipboard_items'),
688 $this->lng->txt(
'clear_clipboard'),
692 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
695 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
697 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
699 $this->ctrl->setParameter($this,
"type",
"");
700 $this->ctrl->setParameter($this,
"item_ref_id",
"");
704 if ($this->object->gotItems()) {
710 $this->lng->txt(
'delete_selected_items'),
714 $this->lng->txt(
'move_selected_items'),
718 $this->lng->txt(
'copy_selected_items'),
722 $this->lng->txt(
'link_selected_items'),
727 if ((
bool) $folder_set->get(
'enable_multi_download') ===
true) {
730 $this->lng->txt(
'download_selected_items'),
735 if ($this->object->getType() ==
'crs' or $this->object->getType() ==
'grp') {
736 if ($this->object->gotItems()) {
741 $this->lng->txt(
'cntr_adopt_content'),
742 $this->ctrl->getLinkTargetByClass(
762 $main_tpl->addAdminPanelToolbar(
764 ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ?
true :
false,
765 ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ?
true :
false
769 if ($this->object->gotItems()) {
770 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
773 if ($this->edit_order) {
774 if ($this->object->gotItems() and $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
775 include_once(
'./Services/Container/classes/class.ilContainer.php');
779 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
781 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
783 $this->ctrl->setParameter($this,
"type",
"");
784 $this->ctrl->setParameter($this,
"item_ref_id",
"");
787 $this->lng->txt(
'sorting_save'),
791 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
802 $num_files = $this->tree->getChildsByType(
$ref_id,
"file");
803 $num_folders = $this->tree->getChildsByType(
$ref_id,
"fold");
804 if (count($num_files) > 0 or count($num_folders) > 0) {
806 $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
808 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
810 $this->ctrl->setParameter($this,
"type",
"");
811 $this->ctrl->setParameter($this,
"item_ref_id",
"");
814 $this->lng->txt(
'download_selected_items'),
818 $GLOBALS[
'tpl']->addAdminPanelToolbar(
820 $this->object->gotItems() ?
true :
false,
821 $this->object->gotItems() ?
true :
false
834 if (!
$tree->checkForParentType($this->object->getRefId(),
'crs')) {
837 $tpl->setCurrentBlock(
"custom_button");
838 $tpl->setVariable(
"ADMIN_MODE_LINK", $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui',
'editTimings'));
839 $tpl->setVariable(
"TXT_ADMIN_MODE", $this->lng->txt(
'timings_edit'));
840 $tpl->parseCurrentBlock();
852 $tpl->setPermanentLink(
853 $this->object->getType(),
854 $this->object->getRefId(),
868 $ilCtrl->redirect($this,
"editPageFrame");
879 $ilCtrl->redirect($this,
"editPageFrame");
892 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
893 include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
905 $this->object->getId(),
910 ilUtil::sendSuccess(
$lng->txt(
"cntr_switched_editor"),
true);
913 $ilCtrl->redirect($this,
"editPageFrame");
923 $this->object->getId(),
926 if ($xpage_id > 0 &&
$_SESSION[
"il_cntr_editor"] !=
"std") {
927 $this->ctrl->redirect($this,
"editPageContent");
929 $this->ctrl->redirectByClass(array(
"ilcontainerpagegui"),
"edit");
946 if (!
$rbacsystem->checkAccess(
"write", $this->ref_id)) {
947 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"),
$ilErr->MESSAGE);
951 $this->object->getId(),
955 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
957 $content = $xpage->getContent();
964 "tpl.container_edit_page_content.html",
968 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
970 "TXT_EDIT_PAGE_CONTENT",
971 $this->lng->txt(
"edit_page_content")
973 $tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
974 $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
975 $tpl->setVariable(
"TXT_MIGRATION_INFO",
$lng->txt(
"cntr_old_editor_warning"));
976 $tpl->setVariable(
"TXT_MIGRATION_OPEN_STD_EDITOR",
$lng->txt(
"cntr_old_editor_open_standard_editor"));
978 $tpl->setVariable(
"HREF_OPEN_STD_EDITOR",
$ilCtrl->getLinkTarget($this,
"switchToStdEditor"));
979 $tpl->setVariable(
"ALT_WARNING",
$lng->txt(
"warning"));
981 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
982 include_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
987 include_once
"./Services/RTE/classes/class.ilRTE.php";
989 include_once
"./Services/RTE/classes/class.$rtestring.php";
990 $rte =
new $rtestring();
992 include_once
"./Services/Object/classes/class.ilObject.php";
995 $rte->addRTESupport(
$obj_id, $obj_type);
1002 include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
1003 include_once
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
1005 $this->object->getId(),
1024 if ($xpage_id > 0) {
1026 $xpage->setContent($text);
1030 $xpage->setContent($text);
1033 $this->object->getId(),
1039 include_once(
"Services/RTE/classes/class.ilRTE.php");
1042 $this->object->getType() .
":html",
1043 $this->object->getId()
1046 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1047 $this->ctrl->redirect($this,
"");
1052 $this->ctrl->redirect($this,
"");
1061 "tpl.container_link_help.html",
1064 "Services/Container"
1067 $type_ordering = array(
1068 "cat",
"fold",
"crs",
"grp",
"chat",
"frm",
"lres",
1069 "glo",
"webr",
"file",
"exc",
1070 "tst",
"svy",
"mep",
"qpl",
"spl");
1073 foreach ($childs as $child) {
1074 if (in_array($child[
"type"], array(
"lm",
"sahs",
"htlm"))) {
1077 $cnt[$child[
"type"]]++;
1082 $tpl->setVariable(
"TXT_HELP_HEADER",
$lng->txt(
"help"));
1083 foreach ($type_ordering as
$type) {
1084 $tpl->setCurrentBlock(
"row");
1085 $tpl->setVariable(
"ROWCOL",
"tblrow" . (((
$i++) % 2) + 1));
1086 if (
$type !=
"lres") {
1088 " (" . ((
int) $cnt[
$type]) .
")");
1090 $tpl->setVariable(
"TYPE",
$lng->txt(
"obj_lrss") .
1091 " (" . ((
int) $cnt[
"lres"]) .
")");
1093 $tpl->setVariable(
"TXT_LINK",
"[list-" .
$type .
"]");
1094 $tpl->parseCurrentBlock();
1096 $tpl->printToStdout();
1105 $this->adminCommands =
false;
1138 "tpl.container_list_block.html",
1141 "Services/Container"
1143 $this->cur_row_type =
"row_type_1";
1157 $title = $this->lng->txt(
"objs_" .
$a_type);
1159 if ($a_show_image) {
1160 $a_tpl->setCurrentBlock(
"container_header_row_image");
1161 $a_tpl->setVariable(
"HEADER_IMG", $icon);
1162 $a_tpl->setVariable(
"HEADER_ALT", $title);
1164 $a_tpl->setCurrentBlock(
"container_header_row");
1167 $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT", $title);
1168 $a_tpl->parseCurrentBlock();
1179 public function addStandardRow(
1182 $a_item_ref_id =
"",
1183 $a_item_obj_id =
"",
1188 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1192 $a_tpl->touchBlock($this->cur_row_type);
1195 if (
$ilSetting->get(
"icon_position_in_lists") ==
"item_rows") {
1197 $alt = $this->lng->txt(
"obj_" . $a_image_type);
1202 $customIconFactory =
$DIC[
'object.customicons.factory'];
1203 $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
1205 if ($customIcon->exists()) {
1206 $icon = $customIcon->getFullPath();
1210 $a_tpl->setCurrentBlock(
"block_row_image");
1211 $a_tpl->setVariable(
"ROW_IMG", $icon);
1212 $a_tpl->setVariable(
"ROW_ALT", $alt);
1213 $a_tpl->parseCurrentBlock();
1218 $a_tpl->setCurrentBlock(
"block_row_check");
1219 $a_tpl->setVariable(
"ITEM_ID", $a_item_ref_id);
1220 $a_tpl->parseCurrentBlock();
1223 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
1226 $a_tpl->setCurrentBlock(
'block_position');
1227 $a_tpl->setVariable(
'POS_TYPE', $a_image_type);
1228 $a_tpl->setVariable(
'POS_ID', $a_item_ref_id);
1229 $a_tpl->setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
1230 $a_tpl->parseCurrentBlock();
1233 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1235 $a_tpl->setCurrentBlock(
"container_standard_row");
1236 $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
1237 $a_tpl->parseCurrentBlock();
1238 $a_tpl->touchBlock(
"container_row");
1246 $this->cur_row_type = ($this->cur_row_type ==
"row_type_1")
1250 $a_tpl->touchBlock($this->cur_row_type);
1253 $a_message = str_replace(
"[type]",
$type, $a_message);
1255 $a_tpl->setVariable(
"ROW_NBSP",
" ");
1257 $a_tpl->setCurrentBlock(
"container_standard_row");
1258 $a_tpl->setVariable(
1259 "BLOCK_ROW_CONTENT",
1262 $a_tpl->parseCurrentBlock();
1263 $a_tpl->touchBlock(
"container_row");
1268 $this->cur_row_type =
"";
1280 || strtolower($this->ctrl->getCmdClass()) !=
"ilcontainerpagegui") {
1284 $lng->loadLanguageModule(
"content");
1289 $this->tabs_gui->setBackTarget(
1290 $this->lng->txt(
"obj_cat"),
1291 $this->ctrl->getLinkTarget($this,
"frameset"),
1295 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view"), array(
"",
"view"),
"ilcontainerpagegui");
1312 if (!is_object($this->
object)) {
1316 if ($a_include_view && $this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
1318 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTarget($this,
"view"));
1320 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"),
$ilCtrl->getLinkTarget($this,
"disableAdministrationPanel"));
1324 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
1326 $this->adminCommands ||
1327 (is_object($this->
object) &&
1328 ($this->rbacsystem->checkAccess(
"write", $this->object->getRefId())))
1330 (is_object($this->
object) &&
1331 ($this->object->getHiddenFilesFound())) ||
1336 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"),
$ilCtrl->getLinkTarget($this,
""));
1338 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"),
$ilCtrl->getLinkTarget($this,
"enableAdministrationPanel"));
1341 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
1342 is_object($this->
object) &&
1343 $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
1346 $ilTabs->addSubTab(
"ordering",
$lng->txt(
"cntr_ordering"),
$ilCtrl->getLinkTarget($this,
"editOrder"));
1348 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
1349 is_object($this->
object) &&
1350 $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
1352 if (
$ilSetting->get(
"enable_cat_page_edit")) {
1355 $lng->txt(
"cntr_text_media_editor"),
1356 $ilCtrl->getLinkTarget($this,
"editPageFrame"),
1374 if (
$rbacsystem->checkAccess(
'edit_permission', $this->ref_id)) {
1375 $this->tabs_gui->addTarget(
1377 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1378 array(
"perm",
"info",
"owner"),
1381 if (
$ilCtrl->getNextClass() ==
"ilpermissiongui") {
1382 $this->tabs_gui->activateTab(
"perm_settings");
1387 if (strtolower(
$_GET[
"baseClass"]) ==
"ilrepositorygui" && !empty(
$_SESSION[
"clipboard"])) {
1388 $this->tabs_gui->addTarget(
1390 $this->ctrl->getLinkTarget($this,
"clipboard"),
1407 $_SESSION[
"il_cont_admin_panel"] =
true;
1408 $this->ctrl->redirect($this,
"render");
1416 $_SESSION[
"il_cont_admin_panel"] =
false;
1417 $this->ctrl->redirect($this,
"render");
1427 $this->edit_order =
true;
1428 $_SESSION[
"il_cont_admin_panel"] =
false;
1431 $ilTabs->activateSubTab(
"ordering");
1440 return $this->edit_order ? true :
false;
1461 $this->multi_download_enabled =
true;
1482 if (
$_GET[
"item_ref_id"] !=
"") {
1488 if (!isset(
$_POST[
"id"])) {
1489 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1495 $node_data = $this->tree->getNodeData(
$ref_id);
1496 $subtree_nodes = $this->tree->getSubTree($node_data);
1498 $all_node_data[] = $node_data;
1499 $all_subtree_nodes[] = $subtree_nodes;
1502 foreach ($subtree_nodes as $node) {
1503 if ($node[
'type'] ==
'rolf') {
1507 if (!
$rbacsystem->checkAccess(
'delete', $node[
"ref_id"])) {
1508 $no_cut[] = $node[
"ref_id"];
1513 if (count($no_cut)) {
1515 foreach ((array) $no_cut as $cut_id) {
1519 $this->lng->txt(
"msg_no_perm_cut") .
" " . implode(
',', (array) $titles),
1548 if (
$_GET[
"item_ref_id"] !=
"") {
1552 if (!isset(
$_POST[
"id"])) {
1553 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1560 $node_data = $this->tree->getNodeData(
$ref_id);
1567 $subtree_nodes = $this->tree->getSubTree($node_data);
1569 $all_node_data[] = $node_data;
1570 $all_subtree_nodes[] = $subtree_nodes;
1573 foreach ($subtree_nodes as $node) {
1574 if ($node[
'type'] ==
'rolf') {
1578 if (!
$rbacsystem->checkAccess(
'visible,read,copy', $node[
"ref_id"])) {
1579 $no_copy[] = $node[
"ref_id"];
1584 if ($containers > 0 && count(
$_POST[
"id"]) > 1) {
1585 $ilErr->raiseError($this->lng->txt(
"cntr_container_only_on_their_own"),
$ilErr->MESSAGE);
1589 if (is_array($no_copy) && count($no_copy)) {
1591 foreach ((array) $no_copy as $copy_id) {
1595 $this->lng->txt(
"msg_no_perm_copy") .
" " . implode(
',', $titles),
1601 if (count(
$_POST[
"id"]) == 1) {
1602 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id",
$_POST[
"id"][0]);
1603 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1605 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_",
$_POST[
"id"]));
1606 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1623 $initiated_by_folder_action =
false;
1625 if (
$_GET[
"item_ref_id"] !=
"") {
1629 if (!isset(
$_POST[
"id"])) {
1631 $object_type =
$object->getType();
1632 if ($object_type ==
"fold") {
1634 $initiated_by_folder_action =
true;
1636 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1640 include_once
'./Services/Container/classes/BackgroundTasks/class.ilDownloadContainerFilesBackgroundTask.php';
1644 if ($download_job->run()) {
1645 ilUtil::sendSuccess($this->lng->txt(
'msg_bt_download_started'),
true);
1647 $GLOBALS[
'DIC']->ctrl()->redirect($this);
1656 return $bucket_title = ilUtil::getAsciiFilename($this->object->getTitle());
1674 if (
$_GET[
"item_ref_id"] !=
"") {
1678 if (!isset(
$_POST[
"id"])) {
1679 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1690 if (!$this->objDefinition->allowLink(
$object->getType())) {
1691 $no_link[] =
$object->getType();
1696 if (count($no_cut)) {
1697 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_link") .
" " .
1698 implode(
',', $no_cut),
$ilErr->MESSAGE);
1701 if (count($no_link)) {
1703 $ilErr->raiseError($this->lng->txt(
"msg_obj_no_link"),
$ilErr->MESSAGE);
1707 $clipboard[
"parent"] =
$_GET[
"ref_id"];
1708 $clipboard[
"cmd"] =
$ilCtrl->getCmd();
1711 $clipboard[
"ref_ids"][] =
$ref_id;
1717 if (count($clipboard[
"ref_ids"]) == 1) {
1739 if (isset(
$_POST[
"cmd"][
"clear"])) {
1740 ilUtil::sendSuccess($this->lng->txt(
"msg_clear_clipboard"),
true);
1742 $this->ctrl->redirect($this,
'render');
1762 $not_allowed_subobject = [];
1765 $command =
$_SESSION[
'clipboard'][
'cmd'];
1766 if (!in_array($command, array(
'cut',
'link',
'copy'))) {
1767 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1771 if ($command ==
'cut') {
1777 if (!is_array(
$_POST[
'nodes']) || !count(
$_POST[
'nodes'])) {
1794 $folder_objects_cache = array();
1797 $current_parent_id =
$tree->getParentId($obj_data->getRefId());
1799 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
1800 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1805 if (!
$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1806 $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() .
']');
1810 if ($folder_ref_id == $current_parent_id) {
1811 $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() .
']');
1817 $is_child[] = sprintf($this->lng->txt(
'msg_paste_object_not_in_itself'), $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']');
1821 if (!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()))) {
1822 $not_allowed_subobject[] = sprintf(
1823 $this->lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1824 $folder_objects_cache[$folder_ref_id]->getTitle() .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1825 $lng->txt(
'obj_' . $obj_data->getType())
1833 if (count($exists) && $command !=
"copy") {
1834 $error .= implode(
'<br />', $exists);
1837 if (count($is_child)) {
1839 $error .= implode(
'<br />', $is_child);
1842 if (count($not_allowed_subobject)) {
1844 $error .= implode(
'<br />', $not_allowed_subobject);
1847 if (count($no_paste)) {
1849 $error .= implode(
'<br />', $no_paste);
1869 $ilLog->write(__METHOD__ .
", cmd: " . $command);
1875 $ref_ids =
$_SESSION[
'clipboard'][
'ref_ids'];
1876 unset(
$_SESSION[
'clipboard'][
'ref_ids']);
1879 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1883 if ($command ==
'copy') {
1884 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
1885 foreach ($ref_ids as
$ref_id) {
1886 $revIdMapping = array();
1889 if ($oldNode_data[
'parent'] == $folder_ref_id) {
1890 require_once
'Modules/File/classes/class.ilObjFileAccess.php';
1892 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1894 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping,
null);
1899 $newNode_data =
$tree->getNodeData($newRef);
1901 $oldNode_data[
'type'],
1903 $oldNode_data[
'obj_id'],
1907 $newNode_data[
'obj_id'],
1910 $ilObjDataCache->lookupObjId($folder_ref_id)
1917 ilUtil::sendSuccess($this->lng->txt(
'msg_cloned'),
true);
1921 if ($command ==
'cut') {
1922 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
1923 foreach ($ref_ids as
$ref_id) {
1929 include_once(
'./Services/Conditions/classes/class.ilConditionHandler.php');
1934 $old_parent_data =
$tree->getNodeData($old_parent);
1936 $node_data[
'obj_id'],
1939 $old_parent_data[
'obj_id']
1942 $node_data[
'obj_id'],
1945 $ilObjDataCache->lookupObjId($folder_ref_id)
1955 ilUtil::sendSuccess($this->lng->txt(
'msg_cut_copied'),
true);
1959 if ($command ==
'link') {
1960 $linked_to_folders = array();
1962 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
1965 foreach (
$_POST[
'nodes'] as $folder_ref_id) {
1966 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
1968 foreach ($ref_ids as
$ref_id) {
1977 foreach ($subnodes as $key => $subnode) {
1980 $new_ref_id = $obj_data->createReference();
1981 $obj_data->putInTree($folder_ref_id);
1982 $obj_data->setPermissions($folder_ref_id);
1985 if ($rbac_log_active) {
1986 $rbac_log_roles =
$rbacreview->getParentRoleIds($new_ref_id,
false);
1992 $node_data =
$tree->getNodeData($new_ref_id);
1994 $node_data[
'obj_id'],
1997 $ilObjDataCache->lookupObjId($folder_ref_id)
2003 $ilLog->write(__METHOD__ .
', link finished');
2006 $linked_targets = array();
2008 if (count($linked_to_folders)) {
2009 require_once
'Services/Link/classes/class.ilLink.php';
2010 foreach ($linked_to_folders as
$ref_id => $title) {
2017 if (count($ref_ids) == 1) {
2021 $mbox =
$ui->factory()->messageBox()->success($this->lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix))
2022 ->withLinks($links);
2024 ilUtil::sendSuccess(
$ui->renderer()->render($mbox),
true);
2030 $this->ctrl->returnToParent($this);
2038 $_SESSION[
'paste_linked_repexpand'] = array();
2044 $path =
$tree->getPathId((
int)
$_GET[
'ref_id']);
2045 foreach ((array) $path as $node_id) {
2046 if (!in_array($node_id,
$_SESSION[
'paste_linked_repexpand'])) {
2047 $_SESSION[
'paste_linked_repexpand'][] = $node_id;
2063 $ilTabs->setTabActive(
'view_content');
2065 if (!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'link',
'copy',
'cut'))) {
2066 $message = __METHOD__ .
": Unknown action.";
2073 if ($exp->handleCommand()) {
2076 $output = $exp->getHTML();
2078 $txt_var = ($cmd ==
"copy")
2084 $t->setFormAction($this->ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
2086 include_once(
"./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
2088 $b->setCaption($txt_var);
2089 $b->setCommand(
"performPasteIntoMultipleObjects");
2092 $t->addStickyItem(
$b);
2095 $this->lng->loadLanguageModule(
'obj');
2096 $t->addFormButton($this->lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
2098 $t->addFormButton($this->lng->txt(
"cancel"),
"cancelMoveLink");
2099 $t->setCloseFormTag(
false);
2101 $output = $t->getHTML() . $output;
2103 $t->setCloseFormTag(
true);
2104 $t->setOpenFormTag(
false);
2105 $output .=
"<br />" . $t->getHTML();
2107 $this->tpl->setContent($output);
2120 $ilCtrl->returnToParent($this);
2130 ilUtil::sendSuccess($this->lng->txt(
"obj_inserted_clipboard"),
true);
2131 $ilCtrl->returnToParent($this);
2140 $_SESSION[
'paste_copy_repexpand'] = array();
2146 $path =
$tree->getPathId((
int)
$_GET[
'ref_id']);
2147 foreach ((array) $path as $node_id) {
2148 if (!in_array($node_id,
$_SESSION[
'paste_copy_repexpand'])) {
2149 $_SESSION[
'paste_copy_repexpand'][] = $node_id;
2162 $_SESSION[
'paste_cut_repexpand'] = array();
2168 $path =
$tree->getPathId((
int)
$_GET[
'ref_id']);
2169 foreach ((array) $path as $node_id) {
2170 if (!in_array($node_id,
$_SESSION[
'paste_cut_repexpand'])) {
2171 $_SESSION[
'paste_cut_repexpand'][] = $node_id;
2198 $not_allowed_subobject = [];
2201 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
2205 if (!in_array(
$_SESSION[
"clipboard"][
"cmd"], array(
"cut",
"link",
"copy"))) {
2206 $message = get_class($this) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
2215 if (!
$rbacsystem->checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
2217 $no_paste_titles[] = $obj_data->getTitle();
2221 if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId())) {
2227 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
2231 if (
$ref_id == $this->object->getRefId()) {
2236 $obj_type = $obj_data->getType();
2238 if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects()))) {
2239 $not_allowed_subobject[] = $obj_data->getType();
2246 if (count($exists) > 0 &&
$_SESSION[
"clipboard"][
"cmd"] !=
"copy") {
2248 $ilErr->raiseError($this->lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
2251 if (count($is_child) > 0) {
2253 $this->lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
2258 if (count($not_allowed_subobject) > 0) {
2260 $this->lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
2265 if (count($no_paste) > 0) {
2266 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_paste") .
" " .
2267 implode(
',', $no_paste),
$ilErr->MESSAGE);
2271 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " .
$_SESSION[
"clipboard"][
"cmd"]);
2277 $ref_ids =
$_SESSION[
"clipboard"][
"ref_ids"];
2278 unset(
$_SESSION[
"clipboard"][
"ref_ids"]);
2282 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"copy") {
2286 if (count($ref_ids) == 1) {
2287 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->object->getRefId());
2288 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
2289 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
2291 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->object->getRefId());
2292 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
2293 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
2327 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
2332 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") {
2333 foreach ($ref_ids as
$ref_id) {
2336 $this->tree->moveTree(
$ref_id, $this->object->getRefId());
2339 include_once(
'./Services/Conditions/classes/class.ilConditionHandler.php');
2344 $old_parent_data =
$tree->getNodeData($old_parent);
2346 $node_data[
'obj_id'],
2349 $old_parent_data[
'obj_id']
2352 $node_data[
'obj_id'],
2355 $this->object->getId()
2363 if (
$_SESSION[
"clipboard"][
"cmd"] ==
"link") {
2364 foreach ($ref_ids as
$ref_id) {
2366 $top_node = $this->tree->getNodeData(
$ref_id);
2369 $subnodes[
$ref_id] = $this->tree->getSubtree($top_node);
2373 foreach ($subnodes as $key => $subnode) {
2376 $new_ref_id = $obj_data->createReference();
2377 $obj_data->putInTree(
$_GET[
"ref_id"]);
2378 $obj_data->setPermissions(
$_GET[
"ref_id"]);
2381 $node_data =
$tree->getNodeData($new_ref_id);
2383 $node_data[
'obj_id'],
2386 $this->object->getId()
2392 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
2396 $last_cmd =
$_SESSION[
"clipboard"][
"cmd"];
2402 if ($last_cmd ==
"cut") {
2403 ilUtil::sendSuccess($this->lng->txt(
"msg_cut_copied"),
true);
2406 elseif ($last_cmd ==
"copy") {
2407 ilUtil::sendSuccess($this->lng->txt(
"msg_cloned"),
true);
2408 } elseif ($last_cmd ==
'link') {
2410 ilUtil::sendSuccess($this->lng->txt(
"msg_linked"),
true);
2413 $this->ctrl->returnToParent($this);
2430 $ilTabs->activateTab(
"clipboard");
2434 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
2436 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->WARNING);
2446 "type" => $tmp_obj->getType(),
2447 "type_txt" => $this->lng->txt(
"obj_" . $tmp_obj->getType()),
2448 "title" => $tmp_obj->getTitle(),
2449 "cmd" => (
$_SESSION[
"clipboard"][
"cmd"] ==
"cut") ? $this->lng->txt(
"move") :$this->lng->txt(
$_SESSION[
"clipboard"][
"cmd"]),
2451 "obj_id" => $tmp_obj->getId()
2457 include_once(
"./Services/Object/classes/class.ilObjClipboardTableGUI.php");
2462 if (count(
$data) > 0) {
2463 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
2464 $ilToolbar->addFormButton(
2465 $lng->txt(
"insert_object_here"),
2468 $ilToolbar->addFormButton(
2469 $lng->txt(
"clear_clipboard"),
2481 $this->object->getRefId() &&
2482 !$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
2486 return $_SESSION[
"il_cont_admin_panel"];
2495 parent::setColumnSettings($column_gui);
2498 $this->object->getSubItems($this->isActiveAdministrationPanel(),
true)
2503 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
2563 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
2568 if (!$_REQUEST[
'clone_source']) {
2570 if (isset(
$_SESSION[
'wizard_search_title'])) {
2571 $this->searchCloneSourceObject();
2577 $source_id = $_REQUEST[
'clone_source'];
2578 $new_type = $_REQUEST[
'new_type'];
2579 $this->ctrl->setParameter($this,
'clone_source', (
int) $_REQUEST[
'clone_source']);
2580 $this->ctrl->setParameter($this,
'new_type', $new_type);
2584 $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
2585 $this->tpl->setVariable(
'BODY_ATTRIBUTES',
'onload="ilDisableChilds(\'cmd\');"');
2588 $this->tpl->addBlockFile(
2591 'tpl.container_wizard_page.html',
2592 "Services/Container"
2594 $this->tpl->setVariable(
'FORMACTION', $this->ctrl->getFormAction($this));
2596 $this->tpl->setVariable(
'ALT_IMG', $this->lng->txt(
'obj_' . $new_type));
2597 $this->tpl->setVariable(
'TXT_DUPLICATE', $this->lng->txt($new_type .
'_wizard_page'));
2598 $this->tpl->setVariable(
'INFO_DUPLICATE', $this->lng->txt($new_type .
'_copy_threads_info'));
2599 $this->tpl->setVariable(
'BTN_COPY', $this->lng->txt(
'obj_' . $new_type .
'_duplicate'));
2600 $this->tpl->setVariable(
'BTN_BACK', $this->lng->txt(
'btn_back'));
2601 if (isset(
$_SESSION[
'wizard_search_title'])) {
2602 $this->tpl->setVariable(
'CMD_BACK',
'searchCloneSource');
2604 $this->tpl->setVariable(
'CMD_BACK',
'create');
2607 $this->tpl->setVariable(
'BTN_TREE', $this->lng->txt(
'treeview'));
2608 $this->tpl->setVariable(
'BTN_LIST', $this->lng->txt(
'flatview'));
2615 foreach ($subnodes =
$tree->getSubtree($source_node =
$tree->getNodeData($source_id),
true) as $node) {
2616 if ($first ==
true) {
2621 if ($node[
'type'] ==
'rolf') {
2627 for (
$i = $source_node[
'depth'];
$i < $node[
'depth'];
$i++) {
2628 $this->tpl->touchBlock(
'padding');
2629 $this->tpl->touchBlock(
'end_padding');
2633 $copy_wizard_page->fillTreeSelection($node[
'ref_id'], $node[
'type'], $node[
'depth']);
2635 $this->tpl->setCurrentBlock(
'tree_row');
2637 $this->tpl->setVariable(
'TREE_ALT_IMG', $this->lng->txt(
'obj_' . $node[
'type']));
2638 $this->tpl->setVariable(
'TREE_TITLE', $node[
'title']);
2639 $this->tpl->parseCurrentBlock();
2642 $this->tpl->setCurrentBlock(
'no_content');
2643 $this->tpl->setVariable(
'TXT_NO_CONTENT', $this->lng->txt(
'container_no_items'));
2644 $this->tpl->parseCurrentBlock();
2646 $this->tpl->setCurrentBlock(
'tree_footer');
2647 $this->tpl->setVariable(
'TXT_COPY_ALL', $this->lng->txt(
'copy_all'));
2648 $this->tpl->setVariable(
'TXT_LINK_ALL', $this->lng->txt(
'link_all'));
2649 $this->tpl->setVariable(
'TXT_OMIT_ALL', $this->lng->txt(
'omit_all'));
2650 $this->tpl->parseCurrentBlock();
2653 foreach (
$tree->getSubTreeTypes($source_id, array(
'rolf',
'crs')) as
$type) {
2655 if (strlen($html = $copy_wizard_page->getWizardPageBlockHTML())) {
2656 $this->tpl->setCurrentBlock(
'obj_row');
2657 $this->tpl->setVariable(
'ITEM_BLOCK', $html);
2658 $this->tpl->parseCurrentBlock();
2676 include_once(
'./Services/Link/classes/class.ilLink.php');
2677 include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
2685 $new_type = $_REQUEST[
'new_type'];
2687 $clone_source = (int) $_REQUEST[
'clone_source'];
2690 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2692 if (!$clone_source) {
2697 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
2698 $ilErr->raiseError($this->lng->txt(
'permission_denied'));
2701 $options =
$_POST[
'cp_options'] ?
$_POST[
'cp_options'] : array();
2705 include_once
'./Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
2707 ilUtil::sendSuccess($this->lng->txt(
"object_duplicated"),
true);
2708 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$result[
'ref_id']);
2709 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
2712 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
2713 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
2727 include_once(
'Services/Container/classes/class.ilContainerSorting.php');
2731 $positions = str_replace(
',',
'.',
$_POST[
'position']);
2733 $sorting->savePost($positions);
2734 ilUtil::sendSuccess($this->lng->txt(
'cntr_saved_sorting'),
true);
2735 $this->ctrl->redirect($this,
"editOrder");
2749 public function cloneNodes($srcRef, $dstRef, &$mapping, $newName =
null)
2755 error_log(__METHOD__ .
' cloning srcRef=' . $srcRef .
' dstRef=' . $dstRef .
'...');
2756 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2757 error_log(__METHOD__ .
' ...cloning... newRef=' . $newRef .
'...');
2762 if (!is_null($newName)) {
2764 $newObj->setTitle($newName);
2769 $mapping[$newRef] = $srcRef;
2772 $children =
$tree->getChilds($srcRef);
2773 foreach (
$tree->getChilds($srcRef) as $child) {
2776 if ($child[
"type"] !=
'rolf') {
2777 $this->
cloneNodes($child[
"ref_id"], $newRef, $mapping);
2779 if (count($rolf =
$tree->getChildsByType($newRef,
"rolf"))) {
2780 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2784 error_log(__METHOD__ .
' ...cloned srcRef=' . $srcRef .
' dstRef=' . $dstRef .
' newRef=' . $newRef);
2800 $a_item_list_gui->addCustomProperty(
2802 ilContainer::buildPath($a_item_data[
'ref_id'], $this->object->getRefId()),
2818 $path_arr =
$tree->getPathFull($a_ref_id, $a_course_ref_id);
2820 foreach ($path_arr as
$data) {
2824 $path .=
$data[
'title'];
2845 $tpl->setContent($this->form->getHTML());
2847 $ilTabs->activateTab(
"obj_sty");
2861 $tpl->setTreeFlatIcon(
"",
"");
2862 $ilTabs->clearTargets();
2864 $this->object->getId(),
2867 if ($xpage_id > 0) {
2868 $ilTabs->setBackTarget(
2869 $lng->txt(
"cntr_back_to_old_editor"),
2870 $ilCtrl->getLinkTarget($this,
"switchToOldEditor"),
2874 $ilTabs->setBackTarget(
$lng->txt(
"back"),
"./goto.php?target=" . $this->object->getType() .
"_" .
2875 $this->object->getRefId(),
"_top");
2878 include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
2880 $style_id = $this->
object->getStyleSheetId();
2882 $page_gui->setStyleId($style_id);
2886 $page_gui->setTabHook($this,
"addPageTabs");
2888 $ilTabs->setTabActive(
"obj_sty");
2890 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
2891 $lng->loadLanguageModule(
"style");
2893 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2896 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
2899 if ($fixed_style > 0) {
2902 $this->lng->txt(
"global_fixed") .
")");
2903 $this->form->addItem($st);
2911 $st_styles[0] = $this->lng->txt(
"default");
2914 if ($style_id > 0) {
2919 $this->form->addItem($st);
2924 $this->form->addCommandButton(
2926 $lng->txt(
"style_edit_style")
2928 $this->form->addCommandButton(
2930 $lng->txt(
"style_delete_style")
2945 $style_sel->setOptions($st_styles);
2946 $style_sel->setValue($style_id);
2947 $this->form->addItem($style_sel);
2949 $this->form->addCommandButton(
2950 "saveStyleSettings",
2953 $this->form->addCommandButton(
2955 $lng->txt(
"sty_create_ind_style")
2959 $this->form->setTitle(
$lng->txt(
"obj_sty"));
2960 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
2970 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
2980 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
2990 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
3000 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
3001 if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
3003 || $this->object->getStyleSheetId() == 0)) {
3005 $this->
object->update();
3006 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
3008 $this->ctrl->redirect($this,
"editStyleProperties");
3025 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
3027 $item_list_gui->setContainerObject($this);
3029 $item_list_gui->enableComments(
true);
3030 $item_list_gui->enableNotes(
true);
3031 $item_list_gui->enableTags(
true);
3034 $html = $item_list_gui->getListItemHTML(
3045 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
3046 foreach ($pl_names as $pl) {
3048 $gui_class = $ui_plugin->getUIClassInstance();
3049 $resp = $gui_class->getHTML(
"Services/Container",
"async_item_list", array(
"html" => $html));
3051 $html = $gui_class->modifyHTML($html,
$resp);
3075 $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
3078 $btn->setCaption(
'mount_webfolder');
3079 $btn->setOnClick(
"triggerWebDAVModal('$href')");
3080 $ilToolbar->addButtonInstance($btn);
3082 $tpl->setContent($this->form->getHTML());
3091 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3093 $this->form->setFormAction($this->ctrl->getFormAction($this));
3096 $ipass =
new ilPasswordInputGUI($this->lng->txt(
"desired_password"),
"new_password");
3097 $ipass->setRequired(
true);
3099 $this->form->addItem($ipass);
3100 $this->form->addCommandButton(
"savePassword", $this->lng->txt(
"save"));
3101 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
3103 $this->form->setTitle($this->lng->txt(
"chg_ilias_and_webfolder_password"));
3104 $this->form->setFormAction($this->ctrl->getFormAction($this));
3118 if ($form->checkInput()) {
3119 $ilUser->resetPassword($this->form->getInput(
'new_password'), $this->form->getInput(
'new_password'));
3120 ilUtil::sendSuccess($this->lng->txt(
'webdav_pwd_instruction_success'),
true);
3124 $form->setValuesByPost();
3140 $item_data = $this->
object->getSubItems(
false,
false, (
int)
$_GET[
"child_ref_id"]);
3144 include_once
'./Modules/Session/classes/class.ilEventItems.php';
3146 if (in_array((
int)
$_GET[
"child_ref_id"], $event_items)) {
3147 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
3148 foreach ($this->object->items[
"sess"] as $id) {
3150 foreach ($items as $event_item) {
3151 if ($event_item[
"child"] == (
int)
$_GET[
"child_ref_id"]) {
3153 if ((
int)
$_GET[
"parent_ref_id"]) {
3154 $event_item[
"parent"] = (int)
$_GET[
"parent_ref_id"];
3156 $html = $container_view->renderItem($event_item);
3164 foreach ($this->object->items[
"_all"] as $id) {
3165 if ($id[
"child"] == (
int)
$_GET[
"child_ref_id"]) {
3166 $html = $container_view->renderItem($id);
3175 echo
$tpl->getOnLoadCodeForAsynch();
3190 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3193 include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php';
3196 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
'fileManagerLaunch'),
'fm_start',
'_blank');
3210 $tpl =
new ilTemplate(
'tpl.fm_launch_ws.html',
false,
false,
'Services/WebServices/FileManager');
3211 $tpl->setVariable(
'JNLP_URL',
ILIAS_HTTP_PATH .
'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
3212 $tpl->setVariable(
'SESSION_ID',
$_COOKIE[session_name()] .
'::' . CLIENT_ID);
3214 $tpl->setVariable(
'REF_ID', $this->object->getRefId());
3218 $tpl->setVariable(
'FILE_LOCKS', 0);
3221 include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
3222 $header_top_title = ilObjSystemFolder::_getHeaderTitle();
3223 $tpl->setVariable(
'HEADER_TITLE', $header_top_title ? $header_top_title :
'');
3239 $lng->loadLanguageModule($this->object->getType());
3241 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3243 $form->setFormAction($this->ctrl->getFormAction($this,
"update"));
3244 $form->setTitle($this->lng->txt($this->object->getType() .
"_edit"));
3246 $this->initFormTitleDescription($form);
3250 $form->addCommandButton(
"update", $this->lng->txt(
"save"));
3265 $trans = $this->
object->getObjectTranslation();
3268 $title->setRequired(
true);
3273 if ($this->
getCreationMode() !=
true &&
sizeof($trans->getLanguages()) > 1) {
3274 include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
3276 $title->setInfo($this->lng->txt(
"language") .
": " . $languages[$trans->getDefaultLanguage()] .
3277 ' <a href="' . $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"") .
3278 '">» ' . $this->lng->txt(
"obj_more_translations") .
'</a>');
3288 $title->setValue($trans->getDefaultTitle());
3289 $desc->setValue($trans->getDefaultDescription());
3301 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
3302 include_once
'./Services/Container/classes/class.ilContainer.php';
3309 $sort_inherit->setTitle(
3310 $this->lng->txt(
'sort_inherit_prefix') .
3313 $this->object->getId()
3318 $sort_inherit->setInfo($this->lng->txt(
'sorting_info_inherit'));
3319 $sort->addOption($sort_inherit);
3323 $this->lng->txt(
'sorting_title_header'),
3326 $sort_title->setInfo($this->lng->txt(
'sorting_info_title'));
3329 $sort->addOption($sort_title);
3333 $sort_activation->setInfo($this->lng->txt(
'sorting_creation_info'));
3335 $sort->addOption($sort_activation);
3339 $sort_activation->setInfo($this->lng->txt(
'crs_sort_timing_info'));
3341 $sort->addOption($sort_activation);
3345 $this->lng->txt(
'sorting_manual_header'),
3348 $sort_manual->setInfo($this->lng->txt(
'sorting_info_manual'));
3350 $sort->addOption($sort_manual);
3354 if (in_array(
$settings->getSortMode(), $a_sorting_settings)) {
3355 $sort->setValue(
$settings->getSortMode());
3371 $lpres =
new ilRadioGroupInputGUI($this->lng->txt(
'cont_list_presentation'),
"list_presentation");
3373 $item_list =
new ilRadioOption($this->lng->txt(
'cont_item_list'),
"");
3375 $lpres->addOption($item_list);
3377 $tile_view =
new ilRadioOption($this->lng->txt(
'cont_tile_view'),
"tile");
3379 $lpres->addOption($tile_view);
3396 $val = ($form->
getInput(
'list_presentation') ==
"tile")
3409 if ($a_prefix ==
'manual') {
3410 $txt = $this->lng->txt(
'sorting_new_items_direction');
3412 $txt = $this->lng->txt(
'sorting_direction');
3417 $direction->setRequired(
true);
3421 $this->lng->txt(
'sorting_asc'),
3424 $direction->addOption($asc);
3428 $this->lng->txt(
'sorting_desc'),
3431 $direction->addOption($desc);
3433 $element->addSubItem($direction);
3448 $position =
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_position'), $a_prefix .
'_new_items_position');
3449 $position->setValue(
$settings->getSortNewItemsPosition());
3450 $position->setRequired(
true);
3454 $this->lng->txt(
'sorting_new_items_at_top'),
3458 $position->addOption($new_top);
3462 $this->lng->txt(
'sorting_new_items_at_bottom'),
3466 $position->addOption($new_bottom);
3468 $element->addSubItem($position);
3470 $order =
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
3471 $order->setValue(
$settings->getSortNewItemsOrder());
3472 $order->setRequired(
true);
3477 $this->lng->txt(
'sorting_title_header'),
3481 $order->addOption($new_title);
3487 $this->lng->txt(
'sorting_creation_header'),
3491 $order->addOption($new_creation);
3498 $this->lng->txt(
'crs_sort_activation'),
3502 $order->addOption($new_activation);
3505 $element->addSubItem($order);
3518 include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
3522 switch ($form->
getInput(
'sorting')) {
3533 $settings->setSortNewItemsPosition($form->
getInput(
'manual_new_items_position'));
3551 $this->tabs_gui->activateTab(
'trash');
3553 $trash_table = new \ilTrashTableGUI($this,
'trash', $this->object->getRefId());
3554 $trash_table->init();
3555 $trash_table->parse();
3557 $trash_table->setFilterCommand(
'trashApplyFilter');
3558 $trash_table->setResetCommand(
'trashResetFilter');
3560 $tpl->setContent($trash_table->getHTML());
3584 $trash_table = new \ilTrashTableGUI($this,
'trash', $this->object->getRefId());
3585 $trash_table->init();
3586 $trash_table->resetOffset();
3587 if ($action_reset) {
3588 $trash_table->resetFilter();
3590 if ($action_apply) {
3591 $trash_table->writeFilterToSession();
3604 $ru->removeObjectsFromSystem(
$_POST[
"trash_id"]);
3605 $this->ctrl->redirect($this,
"trash");
3613 $this->tabs_gui->activateTab(
'trash');
3615 $ru = new \ilRepUtilGUI($this);
3616 $ru->restoreToNewLocation();
3626 $ru->restoreObjects(
$_GET[
"ref_id"],
$_POST[
"trash_id"]);
3627 $this->ctrl->redirect($this,
"trash");
3636 include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
3638 if (!isset(
$_POST[
"trash_id"])) {
3640 $this->ctrl->redirect($this,
"trash");
3644 $ru->confirmRemoveFromSystemObject(
$_POST[
"trash_id"]);
3653 include_once(
"./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
3659 $exp->setTypeWhiteList(array(
"root",
"cat",
"grp",
"crs",
"fold"));
3663 if (in_array(
$_SESSION[
"clipboard"][
"cmd"], [
"link",
"cut"])) {
3664 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
3665 $refs =
$_SESSION[
"clipboard"][
"ref_ids"];
3667 foreach ($refs as $item_ref_id) {
3669 if (!in_array(
$type, $lso_types)) {
3674 $whitelist = $exp->getTypeWhiteList();
3675 $whitelist[] =
'lso';
3676 $exp->setTypeWhiteList($whitelist);
3680 if ($cmd ==
"link") {
3681 $exp->setSelectMode(
"nodes",
true);
3684 $exp->setSelectMode(
"nodes[]",
false);
3694 $this->ctrl->setReturn($this,
"");
3700 protected function initFilter()
3710 $request =
$DIC->http()->request();
3712 $filter = $filter_service->util()->getFilterForRefId(
3714 $DIC->ctrl()->getLinkTarget($this,
"render",
"",
true),
3715 (
bool) $this->isActiveAdministrationPanel()
3722 if ($request->getMethod() ==
"POST" &&
$_GET[
"cmd"] ==
"render") {
3723 $filter_data =
$DIC->uiService()->filter()->getData($filter);
3726 foreach ($filter->getInputs() as $k =>
$i) {
3727 $filter_data[$k] =
$i->getValue();
3732 $this->container_user_filter = $filter_service->userFilter($filter_data);
3733 $this->ui_filter = $filter;
3740 protected function showContainerFilter()
3744 if (!is_null($this->ui_filter)) {
3745 $renderer =
$DIC->ui()->renderer();
3749 $main_tpl->setFilter($renderer->render($this->ui_filter));
3766 $this->tabs_gui->addTab(
3768 $this->lng->txt(
'view'),
3769 $this->ctrl->getLinkTarget($this,
'view')
3774 $this->tabs_gui->addTab(
3776 $this->lng->txt(
'trash'),
3777 $this->ctrl->getLinkTarget($this,
'trash')
3781 $this->tabs_gui->addTab(
3783 $this->lng->txt(
'perm_settings'),
3784 $this->ctrl->getLinkTargetByClass(
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
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...
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.
Container filter service factory.
clearObject()
clear clipboard and go back to last object
saveSortingObject()
Save Sorting.
afterUpdate()
Post (successful) object update hook.
trashApplyFilterObject()
trash table apply filter
editPageFrameObject()
show page editor frameset
clipboardObject()
show clipboard
initAndDisplayMoveIntoObjectObject()
getAsynchItemListObject()
Get item list command drop down asynchronously.
isActiveAdministrationPanel()
savePasswordObject()
Save password.
cloneWizardPageTreeObject()
@access public
restoreToNewLocationObject(\ilPropertyFormGUI $form=null)
setContentSubTabs()
Set content sub tabs.
setSideColumnReturn()
Set return point for side column actions.
getBucketTitle()
get proper label to add in the background task popover
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.
trashHandleFilter(bool $action_apply, bool $action_reset)
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
$container_filter_service
& 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()
getAdminTabs()
administration tabs show only permissions and trash folder
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
trashResetFilterObject()
trash table reset filter
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)
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.
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.
GUI class for didactic template settings inside repository objects.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
Class ilDownloadContainerFilesBackgroundTask.
static _getItemsOfContainer($a_ref_id)
static getInstance()
Get singleton instance.
special template class to simplify handling of ITX/PEAR
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static showMemberViewSwitch($a_ref_id)
Show member view switch.
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.
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, $add_token=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
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
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 _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.
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 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 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
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc