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();
 
  258        $cmd = $ilCtrl->getCmd();
 
  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");
 
  292        $cmd = $ilCtrl->getCmd();
 
  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(
 
  319                $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui", 
"edit")
 
  324        include_once(
"./Services/Container/classes/class.ilContainerPage.php");
 
  325        include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
 
  327        $lng->loadLanguageModule(
"content");
 
  329        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  337            $this->object->getId()
 
  341            $new_page_object->setParentId($this->object->getId());
 
  342            $new_page_object->setId($this->object->getId());
 
  343            $new_page_object->createFromXML();
 
  347        $this->ctrl->setReturnByClass(
"ilcontainerpagegui", 
"edit");
 
  349        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  351            $this->object->getStyleSheetId(),
 
  352            $this->object->getType()
 
  355        $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
 
  356        $page_gui->setFileDownloadLink(
"");
 
  358        $page_gui->setPresentationTitle(
"");
 
  359        $page_gui->setTemplateOutput(
false);
 
  363            $this->object->getId(),
 
  368                "tpl.cntr_old_editor_message.html",
 
  373            $wtpl->setVariable(
"ALT_WARNING", 
$lng->txt(
"warning"));
 
  378            $wtpl->setVariable(
"TXT_MIGRATION_INFO", 
$lng->txt(
"cntr_switch_to_new_editor_message"));
 
  379            $wtpl->setVariable(
"TXT_MIGRATION_INFO", 
$lng->txt(
"cntr_switch_to_new_editor_message"));
 
  381                "HREF_SWITCH_TO_NEW_EDITOR",
 
  382                $ilCtrl->getLinkTarget($this, 
"useNewEditor")
 
  385                "TXT_MIGRATION_SWITCH",
 
  386                $lng->txt(
"cntr_switch_to_new_editor_cmd")
 
  388            $page_gui->setPrependingHtml($wtpl->get());
 
  392        $page_gui->setTabHook($this, 
"addPageTabs");
 
  394        $ret = $this->ctrl->forwardCommand($page_gui);
 
  410            $ilCtrl->getLinkTarget($this, 
'editStyleProperties'),
 
  411            "editStyleProperties" 
  423        if (!
$ilSetting->get(
"enable_cat_page_edit") || $this->object->filteredSubtree()) {
 
  429            $this->object->getId(),
 
  433            include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
 
  435            return $xpage->getContent();
 
  443        include_once(
"./Services/COPage/classes/class.ilPageUtil.php");
 
  446            $this->object->getId()
 
  450        include_once(
"./Services/Container/classes/class.ilContainerPage.php");
 
  451        include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
 
  453        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  454        $this->tpl->setVariable(
 
  455            "LOCATION_CONTENT_STYLESHEET",
 
  458        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  459        $this->tpl->setVariable(
 
  460            "LOCATION_SYNTAX_STYLESHEET",
 
  463        $this->tpl->parseCurrentBlock();
 
  466        include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
 
  468        $lang = $ot->getEffectiveContentLang(
$ilUser->getCurrentLanguage(), 
"cont");
 
  470        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
  472            $this->object->getStyleSheetId(),
 
  473            $this->object->getType()
 
  476        $page_gui->setPresentationTitle(
"");
 
  477        $page_gui->setTemplateOutput(
false);
 
  478        $page_gui->setHeader(
"");
 
  479        $ret = $page_gui->showPage();
 
  492        if (parent::prepareOutput($a_show_subobjects)) {        
 
  495                #$this->showPossibleSubObjects(); 
  499                include_once 
'./Services/Container/classes/class.ilMemberViewGUI.php';
 
  510        if (
$_GET[
"obj_id"] != 
"") {
 
  514        include_once 
'./Services/Container/classes/class.ilMemberViewSettings.php';
 
  519        $mode = (
$_SESSION[
"il_rep_mode"] == 
"flat")
 
  522        $link = 
"ilias.php?baseClass=ilRepositoryGUI&cmd=frameset&set_mode=" . $mode . 
"&ref_id=" . $this->
object->getRefId();
 
  523        $tpl->setTreeFlatIcon($link, $mode);
 
  532            $this->tpl->setTitle((
string) $this->object->getTitle(), 
true);
 
  534            $this->tpl->setTitle((
string) $this->object->getTitle());
 
  535            $this->tpl->setDescription($this->object->getLongDescription());
 
  539            $this->tpl->setTitleIcon($icon, $this->lng->txt(
"obj_" . $this->object->getType()));
 
  541            include_once 
'./Services/Object/classes/class.ilObjectListGUIFactory.php';
 
  543            $lgui->initItem($this->object->getRefId(), $this->object->getId(), $this->object->getType());
 
  544            $this->tpl->setAlertProperties($lgui->getAlertProperties());
 
  556        include_once 
"Services/Object/classes/class.ilObjectAddNewItemGUI.php";
 
  569        $view_mode = $this->
object->getViewMode();
 
  570        if ($this->object->filteredSubtree()) {
 
  573        switch ($view_mode) {
 
  576                include_once(
"./Services/Container/classes/class.ilContainerSimpleContentGUI.php");
 
  581                include_once(
'./Services/Container/classes/class.ilContainerObjectiveGUI.php');
 
  588                include_once(
"./Services/Container/classes/class.ilContainerSessionsContentGUI.php");
 
  595                include_once(
"./Services/Container/classes/class.ilContainerByTypeContentGUI.php");
 
  599        return $container_view;
 
  620            $ilTabs->activateSubTab(
"manage");
 
  622            $ilTabs->activateSubTab(
"view_content");
 
  625        $container_view->setOutput();
 
  627        $this->adminCommands = $container_view->adminCommands;
 
  631        if ($ilCtrl->getNextClass() != 
"ilcolumngui") {
 
  636                is_object($this->
object) &&
 
  637                $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
 
  639                if (
$ilSetting->get(
"enable_cat_page_edit")) {
 
  644                            $lng->txt(
"cntr_text_media_editor"),
 
  645                            $ilCtrl->getLinkTarget($this, 
"editPageFrame")
 
  652        $this->showContainerFilter();
 
  657        if ((
int) 
$_GET[
"ref_id"] > 1 && 
$ilSetting->get(
"rep_tree_synchronize")) {
 
  658            $ilCtrl->setParameter($this, 
"active_node", (
int) 
$_GET[
"ref_id"]);
 
  673        echo $container_view->getSingleTypeBlockAsynch(
$_GET[
"type"]);
 
  696        $main_tpl = 
$DIC->ui()->mainTemplate();
 
  698        $lng->loadLanguageModule(
'cntr');
 
  700        if (
$_SESSION[
"clipboard"] && !$this->edit_order) {
 
  702            $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
 
  704            include_once 
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
 
  707            $this->ctrl->setParameter($this, 
"type", 
"");
 
  708            $this->ctrl->setParameter($this, 
"item_ref_id", 
"");
 
  711                $this->lng->txt(
'paste_clipboard_items'),
 
  716                $this->lng->txt(
'clear_clipboard'),
 
  720            $main_tpl->addAdminPanelToolbar(
$toolbar, 
true, 
false);
 
  723            $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
 
  725            include_once 
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
 
  728            $this->ctrl->setParameter($this, 
"type", 
"");
 
  729            $this->ctrl->setParameter($this, 
"item_ref_id", 
"");
 
  733            if ($this->object->gotItems()) {
 
  739                    $this->lng->txt(
'delete_selected_items'),
 
  743                    $this->lng->txt(
'move_selected_items'),
 
  747                    $this->lng->txt(
'copy_selected_items'),
 
  751                    $this->lng->txt(
'link_selected_items'),
 
  756                if ((
bool) $folder_set->get(
'enable_multi_download') === 
true) {
 
  759                        $this->lng->txt(
'download_selected_items'),
 
  764            if ($this->object->getType() == 
'crs' or $this->object->getType() == 
'grp') {
 
  765                if ($this->object->gotItems()) {
 
  770                    $this->lng->txt(
'cntr_adopt_content'),
 
  771                    $this->ctrl->getLinkTargetByClass(
 
  791            $main_tpl->addAdminPanelToolbar(
 
  793                ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ? 
true : 
false,
 
  794                ($this->object->gotItems() && !
$_SESSION[
"clipboard"]) ? 
true : 
false 
  798            if ($this->object->gotItems()) {
 
  799                $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
 
  802            if ($this->edit_order) {
 
  803                if ($this->object->gotItems() and $ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
  804                    include_once(
'./Services/Container/classes/class.ilContainer.php');
 
  808                        $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
 
  810                        include_once 
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
 
  812                        $this->ctrl->setParameter($this, 
"type", 
"");
 
  813                        $this->ctrl->setParameter($this, 
"item_ref_id", 
"");
 
  816                            $this->lng->txt(
'sorting_save'),
 
  820                        $main_tpl->addAdminPanelToolbar(
$toolbar, 
true, 
false);
 
  831                $num_files = $this->tree->getChildsByType(
$ref_id, 
"file");
 
  832                $num_folders = $this->tree->getChildsByType(
$ref_id, 
"fold");
 
  833                if (count($num_files) > 0 or count($num_folders) > 0) {
 
  835                    $GLOBALS[
'tpl']->setPageFormAction($this->ctrl->getFormAction($this));
 
  837                    include_once 
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
 
  839                    $this->ctrl->setParameter($this, 
"type", 
"");
 
  840                    $this->ctrl->setParameter($this, 
"item_ref_id", 
"");
 
  843                        $this->lng->txt(
'download_selected_items'),
 
  847                    $GLOBALS[
'tpl']->addAdminPanelToolbar(
 
  849                        $this->object->gotItems() ? 
true : 
false,
 
  850                        $this->object->gotItems() ? 
true : 
false 
  863        if (!
$tree->checkForParentType($this->object->getRefId(), 
'crs')) {
 
  866        $tpl->setCurrentBlock(
"custom_button");
 
  867        $tpl->setVariable(
"ADMIN_MODE_LINK", $this->ctrl->getLinkTargetByClass(
'ilcoursecontentgui', 
'editTimings'));
 
  868        $tpl->setVariable(
"TXT_ADMIN_MODE", $this->lng->txt(
'timings_edit'));
 
  869        $tpl->parseCurrentBlock();
 
  881        $tpl->setPermanentLink(
 
  882            $this->object->getType(),
 
  883            $this->object->getRefId(),
 
  897        $ilCtrl->redirect($this, 
"editPageFrame");
 
  908        $ilCtrl->redirect($this, 
"editPageFrame");
 
  921        if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
  922            include_once(
"./Services/XHTMLPage/classes/class.ilXHTMLPage.php");
 
  934                $this->object->getId(),
 
  939            ilUtil::sendSuccess(
$lng->txt(
"cntr_switched_editor"), 
true);
 
  942        $ilCtrl->redirect($this, 
"editPageFrame");
 
  952            $this->object->getId(),
 
  955        if ($xpage_id > 0 && 
$_SESSION[
"il_cntr_editor"] != 
"std") {
 
  956            $this->ctrl->redirect($this, 
"editPageContent");
 
  958            $this->ctrl->redirectByClass(array(
"ilcontainerpagegui"), 
"edit");
 
  975        if (!
$rbacsystem->checkAccess(
"write", $this->ref_id)) {
 
  976            $ilErr->raiseError($this->lng->txt(
"msg_no_perm_write"), 
$ilErr->MESSAGE);
 
  980            $this->object->getId(),
 
  984            include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
 
  986            $content = $xpage->getContent();
 
  993            "tpl.container_edit_page_content.html",
 
  997        $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  999            "TXT_EDIT_PAGE_CONTENT",
 
 1000            $this->lng->txt(
"edit_page_content")
 
 1002        $tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
 
 1003        $tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
 
 1004        $tpl->setVariable(
"TXT_MIGRATION_INFO", 
$lng->txt(
"cntr_old_editor_warning"));
 
 1005        $tpl->setVariable(
"TXT_MIGRATION_OPEN_STD_EDITOR", 
$lng->txt(
"cntr_old_editor_open_standard_editor"));
 
 1007        $tpl->setVariable(
"HREF_OPEN_STD_EDITOR", $ilCtrl->getLinkTarget($this, 
"switchToStdEditor"));
 
 1008        $tpl->setVariable(
"ALT_WARNING", 
$lng->txt(
"warning"));
 
 1010        include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
 
 1011        include_once(
"./Services/Form/classes/class.ilTextAreaInputGUI.php");
 
 1016        include_once 
"./Services/RTE/classes/class.ilRTE.php";
 
 1018        include_once 
"./Services/RTE/classes/class.$rtestring.php";
 
 1019        $rte = 
new $rtestring();
 
 1021        include_once 
"./Services/Object/classes/class.ilObject.php";
 
 1024        $rte->addRTESupport(
$obj_id, $obj_type);
 
 1031        include_once(
"Services/XHTMLPage/classes/class.ilXHTMLPage.php");
 
 1032        include_once 
"./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
 
 1034            $this->object->getId(),
 
 1053        if ($xpage_id > 0) {
 
 1055            $xpage->setContent($text);
 
 1059            $xpage->setContent($text);
 
 1062                $this->object->getId(),
 
 1068        include_once(
"Services/RTE/classes/class.ilRTE.php");
 
 1071            $this->object->getType() . 
":html",
 
 1072            $this->object->getId()
 
 1075        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1076        $this->ctrl->redirect($this, 
"");
 
 1081        $this->ctrl->redirect($this, 
"");
 
 1090            "tpl.container_link_help.html",
 
 1093            "Services/Container" 
 1096        $type_ordering = array(
 
 1097            "cat", 
"fold", 
"crs", 
"grp", 
"chat", 
"frm", 
"lres",
 
 1098            "glo", 
"webr", 
"file", 
"exc",
 
 1099            "tst", 
"svy", 
"mep", 
"qpl", 
"spl");
 
 1102        foreach ($childs as $child) {
 
 1103            if (in_array($child[
"type"], array(
"lm", 
"sahs", 
"htlm"))) {
 
 1106                $cnt[$child[
"type"]]++;
 
 1111        $tpl->setVariable(
"TXT_HELP_HEADER", 
$lng->txt(
"help"));
 
 1112        foreach ($type_ordering as 
$type) {
 
 1113            $tpl->setCurrentBlock(
"row");
 
 1114            $tpl->setVariable(
"ROWCOL", 
"tblrow" . (((
$i++) % 2) + 1));
 
 1115            if (
$type != 
"lres") {
 
 1117                    " (" . ((
int) $cnt[
$type]) . 
")");
 
 1119                $tpl->setVariable(
"TYPE", 
$lng->txt(
"obj_lrss") .
 
 1120                    " (" . ((
int) $cnt[
"lres"]) . 
")");
 
 1122            $tpl->setVariable(
"TXT_LINK", 
"[list-" . 
$type . 
"]");
 
 1123            $tpl->parseCurrentBlock();
 
 1125        $tpl->printToStdout();
 
 1134        $this->adminCommands = 
false;
 
 1167            "tpl.container_list_block.html",
 
 1170            "Services/Container" 
 1172        $this->cur_row_type = 
"row_type_1";
 
 1186        $title = $this->lng->txt(
"objs_" . $a_type);
 
 1188        if ($a_show_image) {
 
 1189            $a_tpl->setCurrentBlock(
"container_header_row_image");
 
 1190            $a_tpl->setVariable(
"HEADER_IMG", $icon);
 
 1191            $a_tpl->setVariable(
"HEADER_ALT", $title);
 
 1193            $a_tpl->setCurrentBlock(
"container_header_row");
 
 1196        $a_tpl->setVariable(
"BLOCK_HEADER_CONTENT", $title);
 
 1197        $a_tpl->parseCurrentBlock();
 
 1208    public function addStandardRow(
 
 1211        $a_item_ref_id = 
"",
 
 1212        $a_item_obj_id = 
"",
 
 1217        $this->cur_row_type = ($this->cur_row_type == 
"row_type_1")
 
 1221        $a_tpl->touchBlock($this->cur_row_type);
 
 1224        if (
$ilSetting->get(
"icon_position_in_lists") == 
"item_rows") {
 
 1226            $alt = $this->lng->txt(
"obj_" . $a_image_type);
 
 1231                $customIconFactory = 
$DIC[
'object.customicons.factory'];
 
 1232                $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
 
 1234                if ($customIcon->exists()) {
 
 1235                    $icon = $customIcon->getFullPath();
 
 1239            $a_tpl->setCurrentBlock(
"block_row_image");
 
 1240            $a_tpl->setVariable(
"ROW_IMG", $icon);
 
 1241            $a_tpl->setVariable(
"ROW_ALT", $alt);
 
 1242            $a_tpl->parseCurrentBlock();
 
 1247            $a_tpl->setCurrentBlock(
"block_row_check");
 
 1248            $a_tpl->setVariable(
"ITEM_ID", $a_item_ref_id);
 
 1249            $a_tpl->parseCurrentBlock();
 
 1252        include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
 
 1255            $a_tpl->setCurrentBlock(
'block_position');
 
 1256            $a_tpl->setVariable(
'POS_TYPE', $a_image_type);
 
 1257            $a_tpl->setVariable(
'POS_ID', $a_item_ref_id);
 
 1258            $a_tpl->setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
 
 1259            $a_tpl->parseCurrentBlock();
 
 1262            $a_tpl->setVariable(
"ROW_NBSP", 
" ");
 
 1264        $a_tpl->setCurrentBlock(
"container_standard_row");
 
 1265        $a_tpl->setVariable(
"BLOCK_ROW_CONTENT", $a_html);
 
 1266        $a_tpl->parseCurrentBlock();
 
 1267        $a_tpl->touchBlock(
"container_row");
 
 1275        $this->cur_row_type = ($this->cur_row_type == 
"row_type_1")
 
 1279        $a_tpl->touchBlock($this->cur_row_type);
 
 1281        $type = $this->lng->txt(
"obj_" . $a_type);
 
 1282        $a_message = str_replace(
"[type]", 
$type, $a_message);
 
 1284        $a_tpl->setVariable(
"ROW_NBSP", 
" ");
 
 1286        $a_tpl->setCurrentBlock(
"container_standard_row");
 
 1287        $a_tpl->setVariable(
 
 1288            "BLOCK_ROW_CONTENT",
 
 1291        $a_tpl->parseCurrentBlock();
 
 1292        $a_tpl->touchBlock(
"container_row");
 
 1297        $this->cur_row_type = 
"";
 
 1309            || strtolower($this->ctrl->getCmdClass()) != 
"ilcontainerpagegui") {
 
 1313        $lng->loadLanguageModule(
"content");
 
 1318        $this->tabs_gui->setBackTarget(
 
 1319            $this->lng->txt(
"obj_cat"),
 
 1320            $this->ctrl->getLinkTarget($this, 
"frameset"),
 
 1324        $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui", 
"view"), array(
"", 
"view"), 
"ilcontainerpagegui");
 
 1341        if (!is_object($this->
object)) {
 
 1345        if ($a_include_view && $this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
 1347                $ilTabs->addSubTab(
"view_content", 
$lng->txt(
"view"), $ilCtrl->getLinkTarget($this, 
"view"));
 
 1349                $ilTabs->addSubTab(
"view_content", 
$lng->txt(
"view"), $ilCtrl->getLinkTarget($this, 
"disableAdministrationPanel"));
 
 1355                    $this->adminCommands ||
 
 1356                (is_object($this->
object) &&
 
 1357                ($this->rbacsystem->checkAccess(
"write", $this->object->getRefId())))
 
 1359                (is_object($this->
object) &&
 
 1360                ($this->object->getHiddenFilesFound())) ||
 
 1365                $ilTabs->addSubTab(
"manage", 
$lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this, 
""));
 
 1367                $ilTabs->addSubTab(
"manage", 
$lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this, 
"enableAdministrationPanel"));
 
 1371            is_object($this->
object) &&
 
 1372            $this->rbacsystem->checkAccess(
"write", $this->object->getRefId()) 
 
 1375            $ilTabs->addSubTab(
"ordering", 
$lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this, 
"editOrder"));
 
 1390        if (
$rbacsystem->checkAccess(
'edit_permission', $this->ref_id)) {
 
 1391            $this->tabs_gui->addTarget(
 
 1393                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
 1394                array(
"perm",
"info",
"owner"),
 
 1397            if ($ilCtrl->getNextClass() == 
"ilpermissiongui") {
 
 1398                $this->tabs_gui->activateTab(
"perm_settings");
 
 1403        if (strtolower(
$_GET[
"baseClass"]) == 
"ilrepositorygui" && !empty(
$_SESSION[
"clipboard"])) {
 
 1404            $this->tabs_gui->addTarget(
 
 1406                $this->ctrl->getLinkTarget($this, 
"clipboard"),
 
 1423        $_SESSION[
"il_cont_admin_panel"] = 
true;
 
 1424        $this->ctrl->redirect($this, 
"render");
 
 1432        $_SESSION[
"il_cont_admin_panel"] = 
false;
 
 1433        $this->ctrl->redirect($this, 
"render");
 
 1443        $this->edit_order = 
true;
 
 1444        $_SESSION[
"il_cont_admin_panel"] = 
false;
 
 1447        $ilTabs->activateSubTab(
"ordering");
 
 1456        return $this->edit_order ? 
true : 
false;
 
 1477        $this->multi_download_enabled = 
true;
 
 1498        if (
$_GET[
"item_ref_id"] != 
"") {
 
 1504        if (!isset(
$_POST[
"id"])) {
 
 1505            $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 1511            $node_data = $this->tree->getNodeData(
$ref_id);
 
 1512            $subtree_nodes = $this->tree->getSubTree($node_data);
 
 1514            $all_node_data[] = $node_data;
 
 1515            $all_subtree_nodes[] = $subtree_nodes;
 
 1518            foreach ($subtree_nodes as $node) {
 
 1519                if ($node[
'type'] == 
'rolf') {
 
 1523                if (!
$rbacsystem->checkAccess(
'delete', $node[
"ref_id"])) {
 
 1524                    $no_cut[] = $node[
"ref_id"];
 
 1529        if (count($no_cut)) {
 
 1531            foreach ((array) $no_cut as $cut_id) {
 
 1535                $this->lng->txt(
"msg_no_perm_cut") . 
" " . implode(
',', (array) $titles),
 
 1540        $_SESSION[
"clipboard"][
"cmd"] = $ilCtrl->getCmd();
 
 1564        if (
$_GET[
"item_ref_id"] != 
"") {
 
 1568        if (!isset(
$_POST[
"id"])) {
 
 1569            $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 1576            $node_data = $this->tree->getNodeData(
$ref_id);
 
 1583            $subtree_nodes = $this->tree->getSubTree($node_data);
 
 1585            $all_node_data[] = $node_data;
 
 1586            $all_subtree_nodes[] = $subtree_nodes;
 
 1589            foreach ($subtree_nodes as $node) {
 
 1590                if ($node[
'type'] == 
'rolf') {
 
 1594                if (!
$rbacsystem->checkAccess(
'visible,read,copy', $node[
"ref_id"])) {
 
 1595                    $no_copy[] = $node[
"ref_id"];
 
 1600        if ($containers > 0 && count(
$_POST[
"id"]) > 1) {
 
 1601            $ilErr->raiseError($this->lng->txt(
"cntr_container_only_on_their_own"), 
$ilErr->MESSAGE);
 
 1605        if (is_array($no_copy) && count($no_copy)) {
 
 1607            foreach ((array) $no_copy as $copy_id) {
 
 1611                $this->lng->txt(
"msg_no_perm_copy") . 
" " . implode(
',', $titles),
 
 1617        if (count(
$_POST[
"id"]) == 1) {
 
 1618            $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"source_id", 
$_POST[
"id"][0]);
 
 1619            $ilCtrl->redirectByClass(
"ilobjectcopygui", 
"initTargetSelection");
 
 1621            $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"source_ids", implode(
"_", 
$_POST[
"id"]));
 
 1622            $ilCtrl->redirectByClass(
"ilobjectcopygui", 
"initTargetSelection");
 
 1626        $_SESSION[
"clipboard"][
"cmd"] = $ilCtrl->getCmd();
 
 1639        $initiated_by_folder_action = 
false;
 
 1641        if (
$_GET[
"item_ref_id"] != 
"") {
 
 1645        if (!isset(
$_POST[
"id"])) {
 
 1647            $object_type = 
$object->getType();
 
 1648            if ($object_type == 
"fold") {
 
 1650                $initiated_by_folder_action = 
true;
 
 1652                $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 1656        include_once 
'./Services/Container/classes/BackgroundTasks/class.ilDownloadContainerFilesBackgroundTask.php';
 
 1660        if ($download_job->run()) {
 
 1661            ilUtil::sendSuccess($this->lng->txt(
'msg_bt_download_started'), 
true);
 
 1663        $GLOBALS[
'DIC']->ctrl()->redirect($this);
 
 1672        return $bucket_title = ilUtil::getAsciiFilename($this->object->getTitle());
 
 1690        if (
$_GET[
"item_ref_id"] != 
"") {
 
 1694        if (!isset(
$_POST[
"id"])) {
 
 1695            $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 1706            if (!$this->objDefinition->allowLink(
$object->getType())) {
 
 1707                $no_link[] = 
$object->getType();
 
 1712        if (count($no_cut)) {
 
 1713            $ilErr->raiseError($this->lng->txt(
"msg_no_perm_link") . 
" " .
 
 1714                                     implode(
',', $no_cut), 
$ilErr->MESSAGE);
 
 1717        if (count($no_link)) {
 
 1719            $ilErr->raiseError($this->lng->txt(
"msg_obj_no_link"), 
$ilErr->MESSAGE);
 
 1723        $clipboard[
"parent"] = 
$_GET[
"ref_id"];
 
 1724        $clipboard[
"cmd"] = $ilCtrl->getCmd();
 
 1727            $clipboard[
"ref_ids"][] = 
$ref_id;
 
 1733        if (count($clipboard[
"ref_ids"]) == 1) {
 
 1755        if (isset(
$_POST[
"cmd"][
"clear"])) {
 
 1756            ilUtil::sendSuccess($this->lng->txt(
"msg_clear_clipboard"), 
true);
 
 1758            $this->ctrl->redirect($this, 
'render');
 
 1778        $not_allowed_subobject = [];
 
 1781        $command = 
$_SESSION[
'clipboard'][
'cmd'];
 
 1782        if (!in_array($command, array(
'cut', 
'link', 
'copy'))) {
 
 1783            $message = __METHOD__ . 
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
 
 1787        if ($command == 
'cut') {
 
 1793        if (!is_array(
$_POST[
'nodes']) || !count(
$_POST[
'nodes'])) {
 
 1810        $folder_objects_cache = array();
 
 1813            $current_parent_id = 
$tree->getParentId($obj_data->getRefId());
 
 1815            foreach (
$_POST[
'nodes'] as $folder_ref_id) {
 
 1816                if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
 
 1821                if (!
$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
 
 1822                    $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() . 
']');
 
 1826                if ($folder_ref_id == $current_parent_id) {
 
 1827                    $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() . 
']');
 
 1833                    $is_child[] = sprintf($this->lng->txt(
'msg_paste_object_not_in_itself'), $obj_data->getTitle() . 
' [' . $obj_data->getRefId() . 
']');
 
 1837                if (!in_array($obj_data->getType(), array_keys($folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()))) {
 
 1838                    $not_allowed_subobject[] = sprintf(
 
 1839                        $this->lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
 
 1840                        $folder_objects_cache[$folder_ref_id]->getTitle() . 
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() . 
']',
 
 1841                        $lng->txt(
'obj_' . $obj_data->getType())
 
 1849        if (count($exists) && $command != 
"copy") {
 
 1850            $error .= implode(
'<br />', $exists);
 
 1853        if (count($is_child)) {
 
 1855            $error .= implode(
'<br />', $is_child);
 
 1858        if (count($not_allowed_subobject)) {
 
 1860            $error .= implode(
'<br />', $not_allowed_subobject);
 
 1863        if (count($no_paste)) {
 
 1865            $error .= implode(
'<br />', $no_paste);
 
 1885        $ilLog->write(__METHOD__ . 
", cmd: " . $command);
 
 1891        $ref_ids = 
$_SESSION[
'clipboard'][
'ref_ids'];
 
 1892        unset(
$_SESSION[
'clipboard'][
'ref_ids']);
 
 1895        require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1899        if ($command == 
'copy') {
 
 1900            foreach (
$_POST[
'nodes'] as $folder_ref_id) {
 
 1901                foreach ($ref_ids as 
$ref_id) {
 
 1902                    $revIdMapping = array();
 
 1905                    if ($oldNode_data[
'parent'] == $folder_ref_id) {
 
 1906                        require_once 
'Modules/File/classes/class.ilObjFileAccess.php';
 
 1908                        $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
 
 1910                        $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, 
null);
 
 1915                    $newNode_data = 
$tree->getNodeData($newRef);
 
 1917                        $oldNode_data[
'type'],
 
 1919                        $oldNode_data[
'obj_id'],
 
 1923                        $newNode_data[
'obj_id'],
 
 1926                        $ilObjDataCache->lookupObjId($folder_ref_id)
 
 1933            ilUtil::sendSuccess($this->lng->txt(
'msg_cloned'), 
true);
 
 1937        if ($command == 
'cut') {
 
 1938            foreach (
$_POST[
'nodes'] as $folder_ref_id) {
 
 1939                foreach ($ref_ids as 
$ref_id) {
 
 1945                    include_once(
'./Services/Conditions/classes/class.ilConditionHandler.php');
 
 1950                    $old_parent_data = 
$tree->getNodeData($old_parent);
 
 1952                        $node_data[
'obj_id'],
 
 1955                        $old_parent_data[
'obj_id']
 
 1958                        $node_data[
'obj_id'],
 
 1961                        $ilObjDataCache->lookupObjId($folder_ref_id)
 
 1971            ilUtil::sendSuccess($this->lng->txt(
'msg_cut_copied'), 
true);
 
 1975        if ($command == 
'link') {
 
 1976            $linked_to_folders = array();
 
 1978            include_once 
"Services/AccessControl/classes/class.ilRbacLog.php";
 
 1981            foreach (
$_POST[
'nodes'] as $folder_ref_id) {
 
 1982                $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($folder_ref_id));
 
 1984                foreach ($ref_ids as 
$ref_id) {
 
 1993                foreach ($subnodes as $key => $subnode) {
 
 1996                    $new_ref_id = $obj_data->createReference();
 
 1997                    $obj_data->putInTree($folder_ref_id);
 
 1998                    $obj_data->setPermissions($folder_ref_id);
 
 2001                    if ($rbac_log_active) {
 
 2002                        $rbac_log_roles = 
$rbacreview->getParentRoleIds($new_ref_id, 
false);
 
 2008                    $node_data = 
$tree->getNodeData($new_ref_id);
 
 2010                        $node_data[
'obj_id'],
 
 2013                        $ilObjDataCache->lookupObjId($folder_ref_id)
 
 2019                $ilLog->write(__METHOD__ . 
', link finished');
 
 2022            $linked_targets = array();
 
 2024            if (count($linked_to_folders)) {
 
 2025                require_once 
'Services/Link/classes/class.ilLink.php';
 
 2026                foreach ($linked_to_folders as 
$ref_id => $title) {
 
 2033            if (count($ref_ids) == 1) {
 
 2037            $mbox = 
$ui->factory()->messageBox()->success($this->lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix))
 
 2038                ->withLinks($links);
 
 2040            ilUtil::sendSuccess(
$ui->renderer()->render($mbox), 
true);
 
 2046        $this->ctrl->returnToParent($this);
 
 2054        $_SESSION[
'paste_linked_repexpand'] = array();
 
 2060        $path = 
$tree->getPathId((
int) 
$_GET[
'ref_id']);
 
 2061        foreach ((array) $path as $node_id) {
 
 2062            if (!in_array($node_id, 
$_SESSION[
'paste_linked_repexpand'])) {
 
 2063                $_SESSION[
'paste_linked_repexpand'][] = $node_id;
 
 2079        $ilTabs->setTabActive(
'view_content');
 
 2081        if (!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'link', 
'copy', 
'cut'))) {
 
 2082            $message = __METHOD__ . 
": Unknown action.";
 
 2089        if ($exp->handleCommand()) {
 
 2092        $output = $exp->getHTML();
 
 2094        $txt_var = ($cmd == 
"copy")
 
 2100        $t->setFormAction($this->ctrl->getFormAction($this, 
"performPasteIntoMultipleObjects"));
 
 2102        include_once(
"./Services/UIComponent/Button/classes/class.ilSubmitButton.php");
 
 2104        $b->setCaption($txt_var);
 
 2105        $b->setCommand(
"performPasteIntoMultipleObjects");
 
 2108        $t->addStickyItem(
$b);
 
 2111        $this->lng->loadLanguageModule(
'obj');
 
 2112        $t->addFormButton($this->lng->txt(
"obj_insert_into_clipboard"), 
"keepObjectsInClipboard");
 
 2114        $t->addFormButton($this->lng->txt(
"cancel"), 
"cancelMoveLink");
 
 2115        $t->setCloseFormTag(
false);
 
 2117        $output = $t->getHTML() . $output;
 
 2119        $t->setCloseFormTag(
true);
 
 2120        $t->setOpenFormTag(
false);
 
 2121        $output .= 
"<br />" . $t->getHTML();
 
 2123        $this->tpl->setContent($output);
 
 2136        $ilCtrl->returnToParent($this);
 
 2146        ilUtil::sendSuccess($this->lng->txt(
"obj_inserted_clipboard"), 
true);
 
 2147        $ilCtrl->returnToParent($this);
 
 2156        $_SESSION[
'paste_copy_repexpand'] = array();
 
 2162        $path = 
$tree->getPathId((
int) 
$_GET[
'ref_id']);
 
 2163        foreach ((array) $path as $node_id) {
 
 2164            if (!in_array($node_id, 
$_SESSION[
'paste_copy_repexpand'])) {
 
 2165                $_SESSION[
'paste_copy_repexpand'][] = $node_id;
 
 2178        $_SESSION[
'paste_cut_repexpand'] = array();
 
 2184        $path = 
$tree->getPathId((
int) 
$_GET[
'ref_id']);
 
 2185        foreach ((array) $path as $node_id) {
 
 2186            if (!in_array($node_id, 
$_SESSION[
'paste_cut_repexpand'])) {
 
 2187                $_SESSION[
'paste_cut_repexpand'][] = $node_id;
 
 2214        $not_allowed_subobject = [];
 
 2217        require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 2221        if (!in_array(
$_SESSION[
"clipboard"][
"cmd"], array(
"cut",
"link",
"copy"))) {
 
 2222            $message = get_class($this) . 
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
 
 2231            if (!
$rbacsystem->checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
 
 2233                $no_paste_titles[] = $obj_data->getTitle();
 
 2237            if ($this->object->getRefId() == $this->tree->getParentId($obj_data->getRefId())) {
 
 2243            if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
 
 2247            if (
$ref_id == $this->object->getRefId()) {
 
 2252            $obj_type = $obj_data->getType();
 
 2254            if (!in_array($obj_type, array_keys($this->object->getPossibleSubObjects()))) {
 
 2255                $not_allowed_subobject[] = $obj_data->getType();
 
 2262        if (count($exists) > 0 && 
$_SESSION[
"clipboard"][
"cmd"] != 
"copy") {
 
 2264            $ilErr->raiseError($this->lng->txt(
"msg_obj_exists"), 
$ilErr->MESSAGE);
 
 2267        if (count($is_child) > 0) {
 
 2269                $this->lng->txt(
"msg_not_in_itself") . 
" " . implode(
',', $is_child),
 
 2274        if (count($not_allowed_subobject) > 0) {
 
 2276                $this->lng->txt(
"msg_may_not_contain") . 
" " . implode(
',', $not_allowed_subobject),
 
 2281        if (count($no_paste) > 0) {
 
 2282            $ilErr->raiseError($this->lng->txt(
"msg_no_perm_paste") . 
" " .
 
 2283                                     implode(
',', $no_paste), 
$ilErr->MESSAGE);
 
 2287        $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " . 
$_SESSION[
"clipboard"][
"cmd"]);
 
 2293        $ref_ids = 
$_SESSION[
"clipboard"][
"ref_ids"];
 
 2294        unset(
$_SESSION[
"clipboard"][
"ref_ids"]);
 
 2298        if (
$_SESSION[
"clipboard"][
"cmd"] == 
"copy") {
 
 2302            if (count($ref_ids) == 1) {
 
 2303                $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"target", $this->object->getRefId());
 
 2304                $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"source_id", $ref_ids[0]);
 
 2305                $ilCtrl->redirectByClass(
"ilobjectcopygui", 
"saveTarget");
 
 2307                $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"target", $this->object->getRefId());
 
 2308                $ilCtrl->setParameterByClass(
"ilobjectcopygui", 
"source_ids", implode(
"_", $ref_ids));
 
 2309                $ilCtrl->redirectByClass(
"ilobjectcopygui", 
"saveTarget");
 
 2343            $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
 
 2348        if (
$_SESSION[
"clipboard"][
"cmd"] == 
"cut") {
 
 2349            foreach ($ref_ids as 
$ref_id) {
 
 2352                $this->tree->moveTree(
$ref_id, $this->object->getRefId());
 
 2355                include_once(
'./Services/Conditions/classes/class.ilConditionHandler.php');
 
 2360                $old_parent_data = 
$tree->getNodeData($old_parent);
 
 2362                    $node_data[
'obj_id'],
 
 2365                    $old_parent_data[
'obj_id']
 
 2368                    $node_data[
'obj_id'],
 
 2371                    $this->object->getId()
 
 2379        if (
$_SESSION[
"clipboard"][
"cmd"] == 
"link") {
 
 2380            foreach ($ref_ids as 
$ref_id) {
 
 2382                $top_node = $this->tree->getNodeData(
$ref_id);
 
 2385                $subnodes[
$ref_id] = $this->tree->getSubtree($top_node);
 
 2389            foreach ($subnodes as $key => $subnode) {
 
 2392                $new_ref_id = $obj_data->createReference();
 
 2393                $obj_data->putInTree(
$_GET[
"ref_id"]);
 
 2394                $obj_data->setPermissions(
$_GET[
"ref_id"]);
 
 2397                $node_data = 
$tree->getNodeData($new_ref_id);
 
 2399                    $node_data[
'obj_id'],
 
 2402                    $this->object->getId()
 
 2408            $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
 
 2412        $last_cmd = 
$_SESSION[
"clipboard"][
"cmd"];
 
 2418        if ($last_cmd == 
"cut") {
 
 2419            ilUtil::sendSuccess($this->lng->txt(
"msg_cut_copied"), 
true);
 
 2422        elseif ($last_cmd == 
"copy") {
 
 2423            ilUtil::sendSuccess($this->lng->txt(
"msg_cloned"), 
true);
 
 2424        } elseif ($last_cmd == 
'link') {
 
 2426            ilUtil::sendSuccess($this->lng->txt(
"msg_linked"), 
true);
 
 2429        $this->ctrl->returnToParent($this);
 
 2446        $ilTabs->activateTab(
"clipboard");
 
 2450            $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
 
 2451            $ilLog->write(
$message, $ilLog->FATAL);
 
 2452            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->WARNING);
 
 2462                "type" => $tmp_obj->getType(),
 
 2463                "type_txt" => $this->lng->txt(
"obj_" . $tmp_obj->getType()),
 
 2464                "title" => $tmp_obj->getTitle(),
 
 2465                "cmd" => (
$_SESSION[
"clipboard"][
"cmd"] == 
"cut") ? $this->lng->txt(
"move") :$this->lng->txt(
$_SESSION[
"clipboard"][
"cmd"]),
 
 2467                "obj_id" => $tmp_obj->getId()
 
 2473        include_once(
"./Services/Object/classes/class.ilObjClipboardTableGUI.php");
 
 2475        $tab->setData(
$data);
 
 2476        $tpl->setContent($tab->getHTML());
 
 2478        if (count(
$data) > 0) {
 
 2479            $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
 
 2480            $ilToolbar->addFormButton(
 
 2481                $lng->txt(
"insert_object_here"),
 
 2484            $ilToolbar->addFormButton(
 
 2485                $lng->txt(
"clear_clipboard"),
 
 2497            $this->object->getRefId() &&
 
 2498            !$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
 2502        return $_SESSION[
"il_cont_admin_panel"];
 
 2511        parent::setColumnSettings($column_gui);
 
 2514            $this->object->getSubItems($this->isActiveAdministrationPanel(), 
true)
 
 2519        if ($ilAccess->checkAccess(
"write", 
"", $this->object->getRefId())) {
 
 2579        include_once(
'Services/CopyWizard/classes/class.ilCopyWizardPageFactory.php');
 
 2584        if (!$_REQUEST[
'clone_source']) {
 
 2586            if (isset(
$_SESSION[
'wizard_search_title'])) {
 
 2587                $this->searchCloneSourceObject();
 
 2593        $source_id = $_REQUEST[
'clone_source'];
 
 2594        $new_type = $_REQUEST[
'new_type'];
 
 2595        $this->ctrl->setParameter($this, 
'clone_source', (
int) $_REQUEST[
'clone_source']);
 
 2596        $this->ctrl->setParameter($this, 
'new_type', $new_type);
 
 2600        $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
 
 2601        $this->tpl->setVariable(
'BODY_ATTRIBUTES', 
'onload="ilDisableChilds(\'cmd\');"');
 
 2604        $this->tpl->addBlockFile(
 
 2607            'tpl.container_wizard_page.html',
 
 2608            "Services/Container" 
 2610        $this->tpl->setVariable(
'FORMACTION', $this->ctrl->getFormAction($this));
 
 2612        $this->tpl->setVariable(
'ALT_IMG', $this->lng->txt(
'obj_' . $new_type));
 
 2613        $this->tpl->setVariable(
'TXT_DUPLICATE', $this->lng->txt($new_type . 
'_wizard_page'));
 
 2614        $this->tpl->setVariable(
'INFO_DUPLICATE', $this->lng->txt($new_type . 
'_copy_threads_info'));
 
 2615        $this->tpl->setVariable(
'BTN_COPY', $this->lng->txt(
'obj_' . $new_type . 
'_duplicate'));
 
 2616        $this->tpl->setVariable(
'BTN_BACK', $this->lng->txt(
'btn_back'));
 
 2617        if (isset(
$_SESSION[
'wizard_search_title'])) {
 
 2618            $this->tpl->setVariable(
'CMD_BACK', 
'searchCloneSource');
 
 2620            $this->tpl->setVariable(
'CMD_BACK', 
'create');
 
 2623        $this->tpl->setVariable(
'BTN_TREE', $this->lng->txt(
'treeview'));
 
 2624        $this->tpl->setVariable(
'BTN_LIST', $this->lng->txt(
'flatview'));
 
 2631            foreach ($subnodes = 
$tree->getSubtree($source_node = 
$tree->getNodeData($source_id), 
true) as $node) {
 
 2632                if ($first == 
true) {
 
 2637                if ($node[
'type'] == 
'rolf') {
 
 2643                for (
$i = $source_node[
'depth'];
$i < $node[
'depth']; 
$i++) {
 
 2644                    $this->tpl->touchBlock(
'padding');
 
 2645                    $this->tpl->touchBlock(
'end_padding');
 
 2649                $copy_wizard_page->fillTreeSelection($node[
'ref_id'], $node[
'type'], $node[
'depth']);
 
 2651                $this->tpl->setCurrentBlock(
'tree_row');
 
 2653                $this->tpl->setVariable(
'TREE_ALT_IMG', $this->lng->txt(
'obj_' . $node[
'type']));
 
 2654                $this->tpl->setVariable(
'TREE_TITLE', $node[
'title']);
 
 2655                $this->tpl->parseCurrentBlock();
 
 2658                $this->tpl->setCurrentBlock(
'no_content');
 
 2659                $this->tpl->setVariable(
'TXT_NO_CONTENT', $this->lng->txt(
'container_no_items'));
 
 2660                $this->tpl->parseCurrentBlock();
 
 2662                $this->tpl->setCurrentBlock(
'tree_footer');
 
 2663                $this->tpl->setVariable(
'TXT_COPY_ALL', $this->lng->txt(
'copy_all'));
 
 2664                $this->tpl->setVariable(
'TXT_LINK_ALL', $this->lng->txt(
'link_all'));
 
 2665                $this->tpl->setVariable(
'TXT_OMIT_ALL', $this->lng->txt(
'omit_all'));
 
 2666                $this->tpl->parseCurrentBlock();
 
 2669            foreach (
$tree->getSubTreeTypes($source_id, array(
'rolf',
'crs')) as 
$type) {
 
 2671                if (strlen($html = $copy_wizard_page->getWizardPageBlockHTML())) {
 
 2672                    $this->tpl->setCurrentBlock(
'obj_row');
 
 2673                    $this->tpl->setVariable(
'ITEM_BLOCK', $html);
 
 2674                    $this->tpl->parseCurrentBlock();
 
 2692        include_once(
'./Services/Link/classes/class.ilLink.php');
 
 2693        include_once(
'Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
 
 2701        $new_type = $_REQUEST[
'new_type'];
 
 2703        $clone_source = (int) $_REQUEST[
'clone_source'];
 
 2706            $ilErr->raiseError($this->lng->txt(
'permission_denied'));
 
 2708        if (!$clone_source) {
 
 2713        if (!$ilAccess->checkAccess(
'write', 
'', $clone_source, $new_type)) {
 
 2714            $ilErr->raiseError($this->lng->txt(
'permission_denied'));
 
 2717        $options = 
$_POST[
'cp_options'] ? 
$_POST[
'cp_options'] : array();
 
 2721        include_once 
'./Services/CopyWizard/classes/class.ilCopyWizardOptions.php';
 
 2723            ilUtil::sendSuccess($this->lng->txt(
"object_duplicated"), 
true);
 
 2724            $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", 
$result[
'ref_id']);
 
 2725            $ilCtrl->redirectByClass(
"ilrepositorygui", 
"");
 
 2728            $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", 
$ref_id);
 
 2729            $ilCtrl->redirectByClass(
"ilrepositorygui", 
"");
 
 2743        include_once(
'Services/Container/classes/class.ilContainerSorting.php');
 
 2747        $positions = str_replace(
',', 
'.', 
$_POST[
'position']);
 
 2749        $sorting->savePost($positions);
 
 2750        ilUtil::sendSuccess($this->lng->txt(
'cntr_saved_sorting'), 
true);
 
 2751        $this->ctrl->redirect($this, 
"editOrder");
 
 2765    public function cloneNodes($srcRef, $dstRef, &$mapping, $newName = 
null)
 
 2771        error_log(__METHOD__ . 
' cloning srcRef=' . $srcRef . 
' dstRef=' . $dstRef . 
'...');
 
 2772        $newRef = $srcObj->cloneObject($dstRef)->getRefId();
 
 2773        error_log(__METHOD__ . 
' ...cloning... newRef=' . $newRef . 
'...');
 
 2778        if (!is_null($newName)) {
 
 2780            $newObj->setTitle($newName);
 
 2785        $mapping[$newRef] = $srcRef;
 
 2788        $children = 
$tree->getChilds($srcRef);
 
 2789        foreach (
$tree->getChilds($srcRef) as $child) {
 
 2792            if ($child[
"type"] != 
'rolf') {
 
 2793                $this->
cloneNodes($child[
"ref_id"], $newRef, $mapping);
 
 2795                if (count($rolf = 
$tree->getChildsByType($newRef, 
"rolf"))) {
 
 2796                    $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
 
 2800        error_log(__METHOD__ . 
' ...cloned srcRef=' . $srcRef . 
' dstRef=' . $dstRef . 
' newRef=' . $newRef);
 
 2816            $a_item_list_gui->addCustomProperty(
 
 2818                ilContainer::buildPath($a_item_data[
'ref_id'], $this->object->getRefId()),
 
 2834        $path_arr = 
$tree->getPathFull($a_ref_id, $a_course_ref_id);
 
 2836        foreach ($path_arr as 
$data) {
 
 2840            $path .= 
$data[
'title'];
 
 2861        $tpl->setContent($this->form->getHTML());
 
 2863        $ilTabs->activateTab(
"obj_sty");
 
 2877        $tpl->setTreeFlatIcon(
"", 
"");
 
 2878        $ilTabs->clearTargets();
 
 2880            $this->object->getId(),
 
 2883        if ($xpage_id > 0) {
 
 2884            $ilTabs->setBackTarget(
 
 2885                $lng->txt(
"cntr_back_to_old_editor"),
 
 2886                $ilCtrl->getLinkTarget($this, 
"switchToOldEditor"),
 
 2890            $ilTabs->setBackTarget(
 
 2892                $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui", 
"edit")
 
 2896        include_once(
"./Services/Container/classes/class.ilContainerPageGUI.php");
 
 2898        $style_id = $this->
object->getStyleSheetId();
 
 2900            $page_gui->setStyleId($style_id);
 
 2904        $page_gui->setTabHook($this, 
"addPageTabs");
 
 2905        $ilCtrl->getHTML($page_gui);
 
 2906        $ilTabs->setTabActive(
"obj_sty");
 
 2908        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 2909        $lng->loadLanguageModule(
"style");
 
 2911        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 2914        $fixed_style = 
$ilSetting->get(
"fixed_content_style_id");
 
 2917        if ($fixed_style > 0) {
 
 2920                $this->lng->txt(
"global_fixed") . 
")");
 
 2921            $this->form->addItem($st);
 
 2929            $st_styles[0] = $this->lng->txt(
"default");
 
 2932            if ($style_id > 0) {
 
 2937                    $this->form->addItem($st);
 
 2942                    $this->form->addCommandButton(
 
 2944                        $lng->txt(
"style_edit_style")
 
 2946                    $this->form->addCommandButton(
 
 2948                        $lng->txt(
"style_delete_style")
 
 2963                $style_sel->setOptions($st_styles);
 
 2964                $style_sel->setValue($style_id);
 
 2965                $this->form->addItem($style_sel);
 
 2967                $this->form->addCommandButton(
 
 2968                    "saveStyleSettings",
 
 2971                $this->form->addCommandButton(
 
 2973                    $lng->txt(
"sty_create_ind_style")
 
 2977        $this->form->setTitle(
$lng->txt(
"obj_sty"));
 
 2978        $this->form->setFormAction($ilCtrl->getFormAction($this));
 
 2988        $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"create");
 
 2998        $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
 3008        $ilCtrl->redirectByClass(
"ilobjstylesheetgui", 
"delete");
 
 3018        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3019        if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
 
 3021            || $this->object->getStyleSheetId() == 0)) {
 
 3023            $this->
object->update();
 
 3024            ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 3026        $this->ctrl->redirect($this, 
"editStyleProperties");
 
 3043        include_once 
'Services/Object/classes/class.ilObjectListGUIFactory.php';
 
 3045        $item_list_gui->setContainerObject($this);
 
 3047        $item_list_gui->enableComments(
true);
 
 3048        $item_list_gui->enableNotes(
true);
 
 3049        $item_list_gui->enableTags(
true);
 
 3052        $html = $item_list_gui->getListItemHTML(
 
 3063        $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE, 
"UIComponent", 
"uihk");
 
 3064        foreach ($pl_names as $pl) {
 
 3066            $gui_class = $ui_plugin->getUIClassInstance();
 
 3067            $resp = $gui_class->getHTML(
"Services/Container", 
"async_item_list", array(
"html" => $html));
 
 3069                $html = $gui_class->modifyHTML($html, 
$resp);
 
 3093        $href = $uri_builder->getUriToMountInstructionModalByRef($this->object->getRefId());
 
 3096        $btn->setCaption(
'mount_webfolder');
 
 3097        $btn->setOnClick(
"triggerWebDAVModal('$href')");
 
 3098        $ilToolbar->addButtonInstance($btn);
 
 3100        $tpl->setContent($this->form->getHTML());
 
 3109        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3111        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 3114        $ipass = 
new ilPasswordInputGUI($this->lng->txt(
"desired_password"), 
"new_password");
 
 3115        $ipass->setRequired(
true);
 
 3117        $this->form->addItem($ipass);
 
 3118        $this->form->addCommandButton(
"savePassword", $this->lng->txt(
"save"));
 
 3119        $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
 
 3121        $this->form->setTitle($this->lng->txt(
"chg_ilias_and_webfolder_password"));
 
 3122        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 3136        if ($form->checkInput()) {
 
 3137            $ilUser->resetPassword($this->form->getInput(
'new_password'), $this->form->getInput(
'new_password'));
 
 3138            ilUtil::sendSuccess($this->lng->txt(
'webdav_pwd_instruction_success'), 
true);
 
 3142        $form->setValuesByPost();
 
 3158        $item_data = $this->
object->getSubItems(
false, 
false, (
int) 
$_GET[
"child_ref_id"]);
 
 3162        include_once 
'./Modules/Session/classes/class.ilEventItems.php';
 
 3164        if (in_array((
int) 
$_GET[
"child_ref_id"], $event_items)) {
 
 3165            include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
 
 3166            foreach ($this->object->items[
"sess"] as $id) {
 
 3168                foreach ($items as $event_item) {
 
 3169                    if ($event_item[
"child"] == (
int) 
$_GET[
"child_ref_id"]) {
 
 3171                        if ((
int) 
$_GET[
"parent_ref_id"]) {
 
 3172                            $event_item[
"parent"] = (int) 
$_GET[
"parent_ref_id"];
 
 3174                        $html = $container_view->renderItem($event_item);
 
 3182            foreach ($this->object->items[
"_all"] as $id) {
 
 3183                if ($id[
"child"] == (
int) 
$_GET[
"child_ref_id"]) {
 
 3184                    $html = $container_view->renderItem($id);
 
 3193            echo 
$tpl->getOnLoadCodeForAsynch();
 
 3208        $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
 
 3220        $tpl = 
new ilTemplate(
'tpl.fm_launch_ws.html', 
false, 
false, 
'Services/WebServices/FileManager');
 
 3221        $tpl->setVariable(
'JNLP_URL', ILIAS_HTTP_PATH . 
'/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
 
 3224        $tpl->setVariable(
'REF_ID', $this->object->getRefId());
 
 3225        $tpl->setVariable(
'WSDL_URI', ILIAS_HTTP_PATH . 
'/webservice/soap/server.php?wsdl');
 
 3226        $tpl->setVariable(
'LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
 
 3227        $tpl->setVariable(
'REST_URI', ILIAS_HTTP_PATH . 
'/Services/WebServices/Rest/server.php');
 
 3228        $tpl->setVariable(
'FILE_LOCKS', 0);
 
 3229        $tpl->setVariable(
'UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
 
 3231        include_once(
"./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
 
 3232        $header_top_title = ilObjSystemFolder::_getHeaderTitle();
 
 3233        $tpl->setVariable(
'HEADER_TITLE', $header_top_title ? $header_top_title : 
'');
 
 3249        $lng->loadLanguageModule($this->object->getType());
 
 3251        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3253        $form->setFormAction($this->ctrl->getFormAction($this, 
"update"));
 
 3254        $form->setTitle($this->lng->txt($this->object->getType() . 
"_edit"));
 
 3256        $this->initFormTitleDescription($form);
 
 3260        $form->addCommandButton(
"update", $this->lng->txt(
"save"));
 
 3274            $trans = $this->
object->getObjectTranslation();
 
 3277        $title->setRequired(
true);
 
 3282        if ($this->
getCreationMode() != 
true && 
sizeof($trans->getLanguages()) > 1) {
 
 3283            include_once(
'Services/MetaData/classes/class.ilMDLanguageItem.php');
 
 3285            $title->setInfo($this->lng->txt(
"language") . 
": " . $languages[$trans->getDefaultLanguage()] .
 
 3286                ' <a href="' . $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui", 
"") .
 
 3287                '">» ' . $this->lng->txt(
"obj_more_translations") . 
'</a>');
 
 3297            $title->setValue($trans->getDefaultTitle());
 
 3298            $desc->setValue($trans->getDefaultDescription());
 
 3310        include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
 
 3311        include_once 
'./Services/Container/classes/class.ilContainer.php';
 
 3318            $sort_inherit->setTitle(
 
 3319                $this->lng->txt(
'sort_inherit_prefix') .
 
 3322                            $this->object->getId()
 
 3327            $sort_inherit->setInfo($this->lng->txt(
'sorting_info_inherit'));
 
 3328            $sort->addOption($sort_inherit);
 
 3332                $this->lng->txt(
'sorting_title_header'),
 
 3335            $sort_title->setInfo($this->lng->txt(
'sorting_info_title'));
 
 3338            $sort->addOption($sort_title);
 
 3342            $sort_activation->setInfo($this->lng->txt(
'sorting_creation_info'));
 
 3344            $sort->addOption($sort_activation);
 
 3348            $sort_activation->setInfo($this->lng->txt(
'crs_sort_timing_info'));
 
 3350            $sort->addOption($sort_activation);
 
 3354                $this->lng->txt(
'sorting_manual_header'),
 
 3357            $sort_manual->setInfo($this->lng->txt(
'sorting_info_manual'));
 
 3359            $sort->addOption($sort_manual);
 
 3363        if (in_array(
$settings->getSortMode(), $a_sorting_settings)) {
 
 3364            $sort->setValue(
$settings->getSortMode());
 
 3380        $lpres = 
new ilRadioGroupInputGUI($this->lng->txt(
'cont_list_presentation'), 
"list_presentation");
 
 3382        $item_list = 
new ilRadioOption($this->lng->txt(
'cont_item_list'), 
"");
 
 3383        $item_list->setInfo($this->lng->txt(
'cont_item_list_info'));
 
 3384        $lpres->addOption($item_list);
 
 3386        $tile_view = 
new ilRadioOption($this->lng->txt(
'cont_tile_view'), 
"tile");
 
 3387        $tile_view->setInfo($this->lng->txt(
'cont_tile_view_info'));
 
 3388        $lpres->addOption($tile_view);
 
 3405        $val = ($form->
getInput(
'list_presentation') == 
"tile")
 
 3418        if ($a_prefix == 
'manual') {
 
 3419            $txt = $this->lng->txt(
'sorting_new_items_direction');
 
 3421            $txt = $this->lng->txt(
'sorting_direction');
 
 3426        $direction->setRequired(
true);
 
 3430            $this->lng->txt(
'sorting_asc'),
 
 3433        $direction->addOption($asc);
 
 3437            $this->lng->txt(
'sorting_desc'),
 
 3440        $direction->addOption($desc);
 
 3442        $element->addSubItem($direction);
 
 3457        $position = 
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_position'), $a_prefix . 
'_new_items_position');
 
 3458        $position->setValue(
$settings->getSortNewItemsPosition());
 
 3459        $position->setRequired(
true);
 
 3463            $this->lng->txt(
'sorting_new_items_at_top'),
 
 3467        $position->addOption($new_top);
 
 3471            $this->lng->txt(
'sorting_new_items_at_bottom'),
 
 3475        $position->addOption($new_bottom);
 
 3477        $element->addSubItem($position);
 
 3479        $order = 
new ilRadioGroupInputGUI($this->lng->txt(
'sorting_new_items_order'), $a_prefix . 
'_new_items_order');
 
 3480        $order->setValue(
$settings->getSortNewItemsOrder());
 
 3481        $order->setRequired(
true);
 
 3486                $this->lng->txt(
'sorting_title_header'),
 
 3490            $order->addOption($new_title);
 
 3496                $this->lng->txt(
'sorting_creation_header'),
 
 3500            $order->addOption($new_creation);
 
 3507                $this->lng->txt(
'crs_sort_activation'),
 
 3511            $order->addOption($new_activation);
 
 3514        $element->addSubItem($order);
 
 3527        include_once(
'Services/Container/classes/class.ilContainerSortingSettings.php');
 
 3531        switch ($form->
getInput(
'sorting')) {
 
 3542                $settings->setSortNewItemsPosition($form->
getInput(
'manual_new_items_position'));
 
 3561        $this->tabs_gui->activateTab(
'trash');
 
 3563        $trash_table = new \ilTrashTableGUI($this, 
'trash', $this->object->getRefId());
 
 3564        $trash_table->init();
 
 3565        $trash_table->parse();
 
 3567        $trash_table->setFilterCommand(
'trashApplyFilter');
 
 3568        $trash_table->setResetCommand(
'trashResetFilter');
 
 3570        $tpl->setContent($trash_table->getHTML());
 
 3594        $trash_table = new \ilTrashTableGUI($this, 
'trash', $this->object->getRefId());
 
 3595        $trash_table->init();
 
 3596        $trash_table->resetOffset();
 
 3597        if ($action_reset) {
 
 3598            $trash_table->resetFilter();
 
 3600        if ($action_apply) {
 
 3601            $trash_table->writeFilterToSession();
 
 3615        $ru->removeObjectsFromSystem(
$_POST[
"trash_id"]);
 
 3616        $this->ctrl->redirect($this, 
"trash");
 
 3624        $this->tabs_gui->activateTab(
'trash');
 
 3626        $ru = new \ilRepUtilGUI($this);
 
 3627        $ru->restoreToNewLocation();
 
 3637        $ru->restoreObjects(
$_GET[
"ref_id"], 
$_POST[
"trash_id"]);
 
 3638        $this->ctrl->redirect($this, 
"trash");
 
 3648        include_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
 
 3650        if (!isset(
$_POST[
"trash_id"])) {
 
 3652            $this->ctrl->redirect($this, 
"trash");
 
 3656        $ru->confirmRemoveFromSystemObject(
$_POST[
"trash_id"]);
 
 3665        include_once(
"./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
 
 3671        $exp->setTypeWhiteList(array(
"root", 
"cat", 
"grp", 
"crs", 
"fold"));
 
 3675        if (in_array(
$_SESSION[
"clipboard"][
"cmd"], [
"link", 
"cut"])) {
 
 3676            $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
 
 3677            $refs = 
$_SESSION[
"clipboard"][
"ref_ids"];
 
 3679            foreach ($refs as $item_ref_id) {
 
 3681                if (!in_array(
$type, $lso_types)) {
 
 3686                $whitelist = $exp->getTypeWhiteList();
 
 3687                $whitelist[] = 
'lso';
 
 3688                $exp->setTypeWhiteList($whitelist);
 
 3692        if ($cmd == 
"link") {
 
 3693            $exp->setSelectMode(
"nodes", 
true);
 
 3696            $exp->setSelectMode(
"nodes[]", 
false);
 
 3706        $this->ctrl->setReturn($this, 
"");
 
 3724        $filter = $filter_service->util()->getFilterForRefId(
 
 3726            $DIC->ctrl()->getLinkTarget($this, 
"render", 
"", 
true),
 
 3727            (
bool) $this->isActiveAdministrationPanel()
 
 3731        $filter_data = 
$DIC->uiService()->filter()->getData($filter);
 
 3734        $this->container_user_filter = $filter_service->userFilter($filter_data);
 
 3735        $this->ui_filter = $filter;
 
 3742    protected function showContainerFilter()
 
 3746        if (!is_null($this->ui_filter)) {
 
 3747            $renderer = 
$DIC->ui()->renderer();
 
 3751            $main_tpl->setFilter($renderer->render($this->ui_filter));
 
 3768            $this->tabs_gui->addTab(
 
 3770                $this->lng->txt(
'view'),
 
 3771                $this->ctrl->getLinkTarget($this, 
'view')
 
 3776        $this->tabs_gui->addTab(
 
 3778            $this->lng->txt(
'trash'),
 
 3779            $this->ctrl->getLinkTarget($this, 
'trash')
 
 3783            $this->tabs_gui->addTab(
 
 3785                $this->lng->txt(
'perm_settings'),
 
 3786                $this->ctrl->getLinkTargetByClass(
 
 3804        $ctrl->redirectByClass([
"ilContainerSkillGUI", 
"ilContSkillPresentationGUI"]);
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.
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
competencesObject()
Redirect to competences.
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)
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( $type, $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 _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
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