4define(
"IL_PAGE_PRESENTATION", 
"presentation");
 
    5define(
"IL_PAGE_EDIT", 
"edit");
 
    6define(
"IL_PAGE_PREVIEW", 
"preview");
 
    7define(
"IL_PAGE_OFFLINE", 
"offline");
 
    8define(
"IL_PAGE_PRINT", 
"print");
 
   10include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
 
   11include_once(
"./Services/COPage/classes/class.ilPageObject.php");
 
   12include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
 
   13include_once(
"./Services/Utilities/classes/class.ilDOMUtil.php");
 
  131        $a_prevent_get_id = 
false,
 
  137        $this->tpl = 
$DIC[
"tpl"];
 
  138        $this->ctrl = 
$DIC->ctrl();
 
  139        $this->lng = 
$DIC->language();
 
  140        $this->tabs_gui = 
$DIC->tabs();
 
  141        $this->plugin_admin = 
$DIC[
"ilPluginAdmin"];
 
  142        $this->access = 
$DIC->access();
 
  143        $this->
user = $DIC->user();
 
  144        $this->help = 
$DIC[
"ilHelp"];
 
  148        if ($a_old_nr == 0 && !$a_prevent_get_id && 
$_GET[
"old_nr"] > 0) {
 
  149            $a_old_nr = 
$_GET[
"old_nr"];
 
  153        if ($a_lang == 
"" && 
$_GET[
"transl"] != 
"") {
 
  168        $this->output2template = 
true;
 
  169        $this->question_xml = 
"";
 
  170        $this->question_html = 
"";
 
  172        $this->template_output_var = 
"PAGE_CONTENT";
 
  173        $this->change_comments = 
false;
 
  174        $this->page_back_title = $this->lng->txt(
"page");
 
  175        $this->lng->loadLanguageModule(
"content");
 
  176        $this->lng->loadLanguageModule(
"copg");
 
  180        $this->ctrl->saveParameter($this, 
"transl");
 
  198        include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
 
  215        $this->parent_type = $a_val;
 
  255        $this->old_nr = $a_val;
 
  265        return $this->old_nr;
 
  275        $this->language = $a_val;
 
  285        if ($this->language == 
"") {
 
  289        return $this->language;
 
  319        $this->page_config = $a_val;
 
  339        $this->obj = $a_pg_obj;
 
  359        $this->output_mode = $a_mode;
 
  369        $this->output2template = $a_output;
 
  379        $this->presentation_title = $a_title;
 
  389        $this->header = $a_title;
 
  399        $this->link_params = $l_params;
 
  409        $this->link_frame = $l_frame;
 
  414        return $this->link_frame;
 
  419        $this->link_xml = $link_xml;
 
  420        $this->link_xml_set = 
true;
 
  425        return $this->link_xml;
 
  430        $this->question_xml = $question_xml;
 
  440        return $this->question_xml;
 
  450        $this->target_var = $a_variable;
 
  460        $this->template_output_var = $a_value;
 
  475        $this->sourcecode_download_script = $script_name;
 
  490        $this->locator = $a_locator;
 
  495        $this->tabs_gui = $a_tabs;
 
  500        $this->page_back_title = $a_title;
 
  510        $this->file_download_link = $a_download_link;
 
  520        return $this->file_download_link;
 
  530        $this->fullscreen_link = $a_fullscreen_link;
 
  540        return $this->fullscreen_link;
 
  545        $this->int_link_return = $a_return;
 
  550        $this->change_comments = $a_enabled;
 
  560        $this->notes_enabled = $a_enabled;
 
  561        $this->notes_parent_id = $a_parent_id;
 
  566        return $this->notes_enabled;
 
  576        $this->offline_directory = $offdir;
 
  586        return $this->offline_directory;
 
  598        $this->view_page_link = $a_link;
 
  599        $this->view_page_target = $a_target;
 
  607        return $this->view_page_link;
 
  615        return $this->view_page_target;
 
  625        return $this->lng->txt(
"cont_presentation_view");
 
  630        $this->act_obj = $a_obj;
 
  631        $this->act_meth = $a_meth;
 
  639    public function setEnabledNews($a_enabled, $a_news_obj_id = 0, $a_news_obj_type = 0)
 
  641        $this->enabled_news = $a_enabled;
 
  642        $this->news_obj_id = $a_news_obj_id;
 
  643        $this->news_obj_type = $a_news_obj_type;
 
  653        return $this->enabled_news;
 
  661        $this->tab_hook = array(
"obj" => $a_object, 
"func" => $a_function);
 
  671        $this->editpreview = $a_editpreview;
 
  691        $this->tabs_enabled = $a_enabledtabs;
 
  711        $this->enabledpagefocus = $a_enabledpagefocus;
 
  721        return $this->enabledpagefocus;
 
  732        $this->exp_frame = $a_exp_frame;
 
  733        $this->exp_id = $a_exp_id;
 
  734        $this->exp_target_script = $a_exp_target_script;
 
  744        $this->prependinghtml = $a_prependinghtml;
 
  754        return $this->prependinghtml;
 
  764        $this->enableediting = $a_enableediting;
 
  784        $this->rawpagecontent = $a_rawpagecontent;
 
  804        $this->styleid = $a_styleid;
 
  814        return $this->styleid;
 
  824        $this->compare_mode = $a_val;
 
  844        $this->abstract_only = $a_val;
 
  864        $this->render_page_container = $a_val;
 
  885        return $this->lng->txt(
"inactive");
 
  902        $a_observer_obj = 
null,
 
  903        $a_observer_func = 
"" 
  905        $this->use_meta_data = 
true;
 
  906        $this->meta_data_rep_obj = $a_rep_obj;
 
  907        $this->meta_data_sub_obj_id = $a_sub_obj_id;
 
  908        $this->meta_data_type = 
$a_type;
 
  909        $this->meta_data_observer_obj = $a_observer_obj;
 
  910        $this->meta_data_observer_func = $a_observer_func;
 
  922            $file_download_link = $this->ctrl->getLinkTarget($this, 
"downloadFile");
 
  924        return $file_download_link;
 
  936            $fullscreen_link = $this->ctrl->getLinkTarget($this, 
"displayMediaFullscreen", 
"", 
false, 
false);
 
  938        return $fullscreen_link;
 
  949        if ($this->sourcecode_download_script == 
"" && $this->
getOutputMode() != 
"offline") {
 
  950            $l = $this->ctrl->getLinkTarget($this, 
"");
 
  962            $pl_names = $this->plugin_admin->getActivePluginsForSlot(
 
  967            foreach ($pl_names as $pl_name) {
 
  968                $plugin = $this->plugin_admin->getPluginObject(
 
  974                if ($plugin->isValidParentType($this->getPageObject()->getParentType())) {
 
  975                    $xml.= 
'<ComponentPlugin Name="' . $plugin->getPluginName() .
 
  981            $xml = 
"<ComponentPlugins>" . 
$xml . 
"</ComponentPlugins>";
 
  994        $this->ctrl->setReturn($this, 
"edit");
 
  996        $next_class = $this->ctrl->getNextClass($this);
 
  997        $this->log->debug(
"next_class: " . $next_class);
 
  998        switch ($next_class) {
 
  999            case 'ilobjectmetadatagui':
 
 1000                $this->tabs_gui->activateTab(
"meta_data");
 
 1001                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
 1002                $md_gui = 
new ilObjectMetaDataGUI($this->meta_data_rep_obj, $this->meta_data_type, $this->meta_data_sub_obj_id);
 
 1003                if (is_object($this->meta_data_observer_obj)) {
 
 1004                    $md_gui->addMDObserver(
 
 1005                        $this->meta_data_observer_obj,
 
 1006                        $this->meta_data_observer_func,
 
 1010                $this->ctrl->forwardCommand($md_gui);
 
 1013            case "ileditclipboardgui":
 
 1015                $clip_gui->setPageBackTitle($this->page_back_title);
 
 1016                $ret = $this->ctrl->forwardCommand($clip_gui);
 
 1021                switch (
$_GET[
"notes_mode"]) {
 
 1024                        $this->tabs_gui->setTabActive(
"edit");
 
 1029            case 'ilpublicuserprofilegui':
 
 1030                require_once 
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
 
 1032                $ret = $this->ctrl->forwardCommand($profile_gui);
 
 1035            case "ilpageeditorgui":
 
 1038                    $this->ctrl->redirect($this, 
"preview");
 
 1041                $page_editor->setLocator($this->locator);
 
 1042                $page_editor->setHeader($this->
getHeader());
 
 1043                $page_editor->setPageBackTitle($this->page_back_title);
 
 1044                $page_editor->setIntLinkReturn($this->int_link_return);
 
 1046                $ret = $this->ctrl->forwardCommand($page_editor);
 
 1049            case 'ilnewsitemgui':
 
 1050                include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
 
 1052                $news_item_gui->setEnableEdit(
true);
 
 1053                $news_item_gui->setContextObjId($this->news_obj_id);
 
 1054                $news_item_gui->setContextObjType($this->news_obj_type);
 
 1055                $news_item_gui->setContextSubObjId($this->obj->getId());
 
 1056                $news_item_gui->setContextSubObjType(
"pg");
 
 1058                $ret = $this->ctrl->forwardCommand($news_item_gui);
 
 1062                $ret = $this->ctrl->forwardCommand($profile_gui);
 
 1065            case "ilpropertyformgui":
 
 1066                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1068                $this->ctrl->forwardCommand(
$form);
 
 1071            case "ilinternallinkgui":
 
 1072                $this->lng->loadLanguageModule(
"content");
 
 1073                require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
 
 1076                $link_gui->filterLinkType(
"PageObject_FAQ");
 
 1077                $link_gui->filterLinkType(
"GlossaryItem");
 
 1078                $link_gui->filterLinkType(
"Media_Media");
 
 1079                $link_gui->filterLinkType(
"Media_FAQ");
 
 1081                $link_gui->setFilterWhiteList(
true);
 
 1082                $this->ctrl->forwardCommand($link_gui);
 
 1085            case "ilquestioneditgui":
 
 1087                include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionEditGUI.php");
 
 1091                $edit_gui->setSelfAssessmentEditingMode(
true);
 
 1092                $ret = $this->ctrl->forwardCommand($edit_gui);
 
 1093                $this->tpl->setContent(
$ret);
 
 1096            case 'ilassquestionfeedbackeditinggui':
 
 1104                $this->lng->loadLanguageModule(
"assessment");
 
 1107                require_once 
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
 
 1108                require_once 
'Modules/TestQuestionPool/classes/class.assQuestion.php';
 
 1110                $questionGUI->object->setObjId(0);
 
 1111                $questionGUI->object->setSelfAssessmentEditingMode(
true);
 
 1112                $questionGUI->object->setPreventRteUsage($this->
getPageConfig()->getPreventRteUsage());
 
 1115                require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
 
 1117                $this->ctrl->forwardCommand($gui);
 
 1131                $cmd = $this->ctrl->getCmd(
"preview");
 
 1132                $ret = $this->$cmd();
 
 1147        include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
 
 1149        $this->tabs_gui->clearTargets();
 
 1151        $this->tabs_gui->setBackTarget(
 
 1152            $this->lng->txt(
"back"),
 
 1153            $this->ctrl->getLinkTarget($this, 
"edit")
 
 1156        $this->ctrl->setParameterByClass(
"ilquestioneditgui", 
"q_id", 
$_GET[
"q_id"]);
 
 1157        $this->tabs_gui->addTab(
 
 1159            $this->lng->txt(
"question"),
 
 1160            $this->ctrl->getLinkTargetByClass(
"ilquestioneditgui", 
"editQuestion")
 
 1163        require_once 
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
 
 1164        $this->ctrl->setParameterByClass(
"ilAssQuestionFeedbackEditingGUI", 
"q_id", 
$_GET[
"q_id"]);
 
 1165        $this->tabs_gui->addTab(
 
 1167            $this->lng->txt(
"feedback"),
 
 1171        $this->tabs_gui->activateTab($a_active);
 
 1188        $this->ctrl->redirect($this, 
"edit");
 
 1197        $this->ctrl->redirect($this, 
"edit");
 
 1206        include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
 1212        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
 1215        $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilCOPagePres.js");
 
 1218        include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
 
 1221        include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
 
 1228            $this->log->debug(
"ilPageObjectGUI, showPage() in edit mode.");
 
 1231            $tpl = 
new ilTemplate(
"tpl.page_edit_wysiwyg.html", 
true, 
true, 
"Services/COPage");
 
 1235            $tpl->setVariable(
"CLASS_PAGE_TD", 
"ilc_Page");
 
 1239                $tpl->setCurrentBlock(
"change_comment");
 
 1240                $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
 
 1241                $tpl->parseCurrentBlock();
 
 1246                $this->ctrl->getFormActionByClass(
"ilpageeditorgui", 
"", 
"", 
true)
 
 1250            $sel_media_mode = ($this->
user->getPref(
"ilPageEditor_MediaMode") == 
"disable")
 
 1253            $sel_html_mode = ($this->
user->getPref(
"ilPageEditor_HTMLMode") == 
"disable")
 
 1256            $sel_js_mode = 
"disable";
 
 1266            $tpl->setVariable(
"TXT_CONFIRM_DELETE", $this->lng->txt(
"cont_confirm_delete"));
 
 1270                $this->tabs_gui->addNonTabbedLink(
 
 1282            if ($sel_js_mode == 
"enable") {
 
 1284                include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
 
 1288                $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
 
 1289                $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing.js");
 
 1291                include_once(
"./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
 
 1293                $this->lng->toJS(
"cont_error");
 
 1294                $this->lng->toJS(
"cont_sel_el_cut_use_paste");
 
 1295                $this->lng->toJS(
"cont_sel_el_copied_use_paste");
 
 1297                include_once 
'./Services/Style/Content/classes/class.ilObjStyleSheet.php';
 
 1298                $GLOBALS[
"tpl"]->addOnloadCode(
"var preloader = new Image(); 
 1299                                                preloader.src = './templates/default/images/loader.svg'; 
 1300                                                ilCOPage.setUser('" . $this->
user->getLogin() . 
"'); 
 1301                                                ilCOPage.setContentCss('" .
 
 1304                        ", ./Services/COPage/css/tiny_extra.css" .
 
 1306                include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
 
 1308                    $GLOBALS[
"tpl"]->addOnloadCode(
"ilCOPage.addTextFormat('" . $c . 
"');");
 
 1311                $GLOBALS[
"tpl"]->addJavascript(
"./libs/bower/bower_components/tinymce/tinymce.min.js");
 
 1312                $tpl->touchBlock(
"init_dragging");
 
 1319                        $cfg->getEnableInternalLinks(),
 
 1320                        $cfg->getEnableWikiLinks(),
 
 1321                        $cfg->getEnableKeywords(),
 
 1322                        $this->getStyleId(),
 
 1325                        $cfg->getEnableAnchors(),
 
 1327                        $cfg->getEnableUserLinks()
 
 1332                include_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
 
 1333                $tpl->setCurrentBlock(
"int_link_prep");
 
 1335                    $this->ctrl->getLinkTargetByClass(
 
 1336                        array(
"ilpageeditorgui", 
"ilinternallinkgui"),
 
 1343                $tpl->parseCurrentBlock();
 
 1345                include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
 
 1347                $GLOBALS[
"tpl"]->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
 
 1354                $tpl->setCurrentBlock(
"multi_actions");
 
 1355                if ($sel_js_mode == 
"enable") {
 
 1356                    $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED", 
'onclick="return ilEditMultiAction(\'activateSelected\');"');
 
 1357                    $tpl->setVariable(
"ONCLICK_DELETE_SELECTED", 
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
 
 1358                    $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC", 
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
 
 1359                    $tpl->setVariable(
"ONCLICK_COPY_SELECTED", 
'onclick="return ilEditMultiAction(\'copySelected\');"');
 
 1360                    $tpl->setVariable(
"ONCLICK_CUT_SELECTED", 
'onclick="return ilEditMultiAction(\'cutSelected\');"');
 
 1361                    $tpl->setVariable(
"TXT_SELECT_ALL", $this->lng->txt(
"select_all"));
 
 1362                    $tpl->setVariable(
"ONCLICK_SELECT_ALL", 
'onclick="return ilEditMultiAction(\'selectAll\');"');
 
 1364                $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
 
 1365                $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
 
 1366                $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
 
 1367                $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
 
 1368                $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
 
 1370                $tpl->parseCurrentBlock();
 
 1375            $tpl = 
new ilTemplate(
"tpl.page.html", 
true, 
true, 
"Services/COPage");
 
 1377                $tpl->touchBlock(
"page_focus");
 
 1380            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 1384                $tpl->touchBlock(
"page_container_1");
 
 1385                $tpl->touchBlock(
"page_container_2");
 
 1386                $tpl->touchBlock(
"page_container_3");
 
 1396                    $this->ctrl->setParameter($this, 
"history_mode", 
"1");
 
 1399                    if (is_array($hist_info[
"previous"])) {
 
 1400                        $tpl->setCurrentBlock(
"previous_rev");
 
 1401                        $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
 
 1402                        $this->ctrl->setParameter($this, 
"old_nr", $hist_info[
"previous"][
"nr"]);
 
 1405                            $this->ctrl->getLinkTarget($this, 
"preview")
 
 1407                        $tpl->parseCurrentBlock();
 
 1409                        $tpl->setCurrentBlock(
"previous_rev_disabled");
 
 1410                        $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
 
 1411                        $tpl->parseCurrentBlock();
 
 1415                    if ($c_old_nr > 0) {
 
 1416                        $tpl->setCurrentBlock(
"next_rev");
 
 1417                        $tpl->setVariable(
"TXT_NEXT_REV", $this->lng->txt(
"cont_next_rev"));
 
 1418                        $this->ctrl->setParameter($this, 
"old_nr", $hist_info[
"next"][
"nr"]);
 
 1421                            $this->ctrl->getLinkTarget($this, 
"preview")
 
 1423                        $tpl->parseCurrentBlock();
 
 1426                        $tpl->setCurrentBlock(
"latest_rev");
 
 1427                        $tpl->setVariable(
"TXT_LATEST_REV", $this->lng->txt(
"cont_latest_rev"));
 
 1428                        $this->ctrl->setParameter($this, 
"old_nr", 
"");
 
 1431                            $this->ctrl->getLinkTarget($this, 
"preview")
 
 1433                        $tpl->parseCurrentBlock();
 
 1436                    $this->ctrl->setParameter($this, 
"history_mode", 
"");
 
 1439                    if ($c_old_nr > 0 && $this->
user->getId() != ANONYMOUS_USER_ID) {
 
 1440                        $tpl->setCurrentBlock(
"rollback");
 
 1441                        $this->ctrl->setParameter($this, 
"old_nr", $c_old_nr);
 
 1444                            $this->ctrl->getLinkTarget($this, 
"rollbackConfirmation")
 
 1446                        $this->ctrl->setParameter($this, 
"old_nr", 
"");
 
 1449                            $this->lng->txt(
"cont_rollback")
 
 1451                        $tpl->parseCurrentBlock();
 
 1455                $tpl->setCurrentBlock(
"hist_nav");
 
 1456                $tpl->setVariable(
"TXT_REVISION", $this->lng->txt(
"cont_revision"));
 
 1458                    "VAL_REVISION_DATE",
 
 1465                $tpl->parseCurrentBlock();
 
 1472            $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
 
 1478                $this->obj->getParentType() . 
":pg",
 
 1479                $this->obj->getId(),
 
 1480                $this->obj->getLanguage()
 
 1482            $mob_links = array();
 
 1483            foreach (
$links as $link) {
 
 1484                if ($link[
"type"] == 
"mob") {
 
 1492            if (count($mob_links) > 0) {
 
 1493                $tpl->setCurrentBlock(
"med_link");
 
 1494                $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
 
 1499                $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
 
 1500                $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
 
 1502                $tpl->parseCurrentBlock();
 
 1506            include_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
 
 1511            if (count($snippets) > 0) {
 
 1512                foreach ($snippets as 
$s) {
 
 1513                    include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
 
 1516                $tpl->setCurrentBlock(
"med_link");
 
 1517                $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
 
 1522                $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
 
 1523                $tpl->parseCurrentBlock();
 
 1530                $tpl->setCurrentBlock(
"activation_txt");
 
 1531                $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $this->lng->txt(
"cont_scheduled_activation"));
 
 1550                $tpl->parseCurrentBlock();
 
 1554        if (
$_GET[
"reloadTree"] == 
"y") {
 
 1555            $tpl->setCurrentBlock(
"reload_tree");
 
 1558                $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui", 
"explorer", 
"", 
false, 
false)
 
 1560            $tpl->parseCurrentBlock();
 
 1564        $builded = $this->obj->buildDom();
 
 1570            if (!$this->obj->checkPCIds()) {
 
 1571                $this->obj->insertPCIds();
 
 1572                $this->obj->update(
true, 
true);
 
 1575            $this->obj->addFileSizes();
 
 1576            $this->obj->addHierIDs();
 
 1578            $hids = $this->obj->getHierIds();
 
 1579            $row1_ids = $this->obj->getFirstRowIds();
 
 1580            $col1_ids = $this->obj->getFirstColumnIds();
 
 1581            $litem_ids = $this->obj->getListItemIds();
 
 1582            $fitem_ids = $this->obj->getFileItemIds();
 
 1585            $hids = $this->obj->getHierIds();
 
 1586            foreach ($hids as $hid) {
 
 1587                $tpl->setCurrentBlock(
"add_dhtml");
 
 1588                $tpl->setVariable(
"CONTEXTMENU", 
"contextmenu_" . $hid);
 
 1589                $tpl->parseCurrentBlock();
 
 1593            foreach ($col1_ids as $hid) {
 
 1594                $tpl->setCurrentBlock(
"add_dhtml");
 
 1595                $tpl->setVariable(
"CONTEXTMENU", 
"contextmenu_r" . $hid);
 
 1596                $tpl->parseCurrentBlock();
 
 1600            foreach ($row1_ids as $hid) {
 
 1601                $tpl->setCurrentBlock(
"add_dhtml");
 
 1602                $tpl->setVariable(
"CONTEXTMENU", 
"contextmenu_c" . $hid);
 
 1603                $tpl->parseCurrentBlock();
 
 1607            foreach ($litem_ids as $hid) {
 
 1608                $tpl->setCurrentBlock(
"add_dhtml");
 
 1609                $tpl->setVariable(
"CONTEXTMENU", 
"contextmenu_i" . $hid);
 
 1610                $tpl->parseCurrentBlock();
 
 1614            foreach ($fitem_ids as $hid) {
 
 1615                $tpl->setCurrentBlock(
"add_dhtml");
 
 1616                $tpl->setVariable(
"CONTEXTMENU", 
"contextmenu_i" . $hid);
 
 1617                $tpl->parseCurrentBlock();
 
 1620            $this->obj->addFileSizes();
 
 1627        if (!$this->link_xml_set) {
 
 1638                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1640                $template_xml = 
$style->getTemplateXML();
 
 1641                $disable_auto_margins = 
"n";
 
 1642                if (
$style->lookupStyleSetting(
"disable_auto_margins")) {
 
 1643                    $disable_auto_margins = 
"y";
 
 1649            $content = 
"<dummy><PageObject><PageContent><Paragraph>" .
 
 1650                $this->obj->getFirstParagraphText() . $link_xml .
 
 1651                "</Paragraph></PageContent></PageObject></dummy>";
 
 1653            $content = $this->obj->getXMLFromDom(
 
 1662        if ($builded !== 
true) {
 
 1683            $enlarge_path = 
"images/enlarge.svg";
 
 1687            ? 
"ilc_PrintPageTitle" 
 1692        $enable_split_new = ($this->obj->getParentType() == 
"lm")
 
 1698        if (($this->obj->getParentType() == 
"lm") &&
 
 1700                $this->obj->getParentId(),
 
 1703            $enable_split_next = 
"y";
 
 1705            $enable_split_next = 
"n";
 
 1714            include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
 
 1726            ? $this->
user->getPref(
"ilPageEditor_MediaMode")
 
 1729        include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
 
 1733        include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
 
 1741        $current_ts = time();
 
 1742        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 1745        include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
 
 1746        $params = array(
'mode' => $this->
getOutputMode(), 
'pg_title' => htmlentities($pg_title, ENT_QUOTES, 
"UTF-8"),
 
 1747                         'enable_placeholder' => 
$cfg->getEnablePCType(
"PlaceHolder") ? 
"y" : 
"n",
 
 1748                         'pg_id' => $this->obj->getId(), 
'pg_title_class' => $pg_title_class,
 
 1749                         'webspace_path' => $wb_path, 
'enlarge_path' => $enlarge_path,
 
 1750                         'img_col' => $col_path,
 
 1751                         'img_row' => $row_path,
 
 1752                         'img_cell' => $cell_path,
 
 1753                         'img_item' => $item_path,
 
 1754                         'compare_mode' => $this->getCompareMode() ? 
"y" : 
"n",
 
 1755                         'enable_split_new' => $enable_split_new,
 
 1756                         'enable_split_next' => $enable_split_next,
 
 1757                         'link_params' => $this->link_params,
 
 1758                         'file_download_link' => $file_download_link,
 
 1759                         'fullscreen_link' => $fullscreen_link,
 
 1760                         'img_path' => $img_path,
 
 1761                         'parent_id' => $this->obj->getParentId(),
 
 1762                         'download_script' => $this->sourcecode_download_script,
 
 1763                         'encoded_download_script' => urlencode($this->sourcecode_download_script),
 
 1764                         'enable_rep_objects' => 
$cfg->getEnablePCType(
"Resources") ? 
"y" : 
"n",
 
 1765                         'enable_login_page' => 
$cfg->getEnablePCType(
"LoginPageElement") ? 
"y" : 
"n",
 
 1767                         'enable_tabs' => 
$cfg->getEnablePCType(
"Tabs") ? 
"y" : 
"n",
 
 1768                         'enable_sa_qst' => 
$cfg->getEnableSelfAssessment() ? 
"y" : 
"n",
 
 1769                         'enable_file_list' => 
$cfg->getEnablePCType(
"FileList") ? 
"y" : 
"n",
 
 1770                         'enable_content_includes' => 
$cfg->getEnablePCType(
"ContentInclude") ? 
"y" : 
"n",
 
 1771                         'enable_content_templates' => (count($this->
getPageObject()->getContentTemplates()) > 0) ? 
"y" : 
"n",
 
 1772                         'paste' => $paste ? 
"y" : 
"n",
 
 1773                         'media_mode' => $media_mode,
 
 1774                         'javascript' => $sel_js_mode,
 
 1775                         'paragraph_plugins' => $paragraph_plugin_string,
 
 1776                         'disable_auto_margins' => $disable_auto_margins,
 
 1777                         'page_toc' => 
$cfg->getEnablePageToc() ? 
"y" : 
"n",
 
 1778                         'enable_profile' =>  
$cfg->getEnablePCType(
"Profile") ? 
"y" : 
"n",
 
 1779                         'enable_verification' =>  
$cfg->getEnablePCType(
"Verification") ? 
"y" : 
"n",
 
 1780                         'enable_blog' =>  
$cfg->getEnablePCType(
"Blog") ? 
"y" : 
"n",
 
 1781                         'enable_skills' =>  
$cfg->getEnablePCType(
"Skills") ? 
"y" : 
"n",
 
 1782                         'enable_qover' =>  
$cfg->getEnablePCType(
"QuestionOverview") ? 
"y" : 
"n",
 
 1783                         'enable_consultation_hours' =>  
$cfg->getEnablePCType(
"ConsultationHours") ? 
"y" : 
"n",
 
 1784                         'enable_my_courses' =>  
$cfg->getEnablePCType(
"MyCourses") ? 
"y" : 
"n",
 
 1785                         'enable_amd_page_list' =>  
$cfg->getEnablePCType(
"AMDPageList") ? 
"y" : 
"n",
 
 1786                         'current_ts' => $current_ts,
 
 1788                         'flv_video_player' => $flv_video_player,
 
 1789                         'page_perma_link' => $this->getPagePermaLink()
 
 1791        if ($this->link_frame != 
"") {          
 
 1792            $params[
"pg_frame"] = $this->link_frame;
 
 1800        $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
 
 1804        include_once(
"./Services/COPage/classes/class.ilPCSection.php");
 
 1808        $md5 = md5(serialize(
$params) . $link_xml . $template_xml . $md5_adds);
 
 1817            $md5 == $this->obj->getRenderMd5() &&
 
 1818            ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
 
 1819            $this->obj->getRenderedTime() != 
"" &&
 
 1820            $this->obj->old_nr == 0) {
 
 1822            $output = $this->obj->getRenderedContent();
 
 1824            $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
 1826            $this->log->debug(
"Calling XSLT, content: " . substr($content, 0, 100));
 
 1827            $args = array( 
'/_xml' => $content, 
'/_xsl' => $xsl );
 
 1829            $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
$params);
 
 1833                && $this->obj->old_nr == 0) {
 
 1834                $this->obj->writeRenderedContent(
$output, $md5);
 
 1841                $this->
user->getPref(
"ilPageEditor_HTMLMode") != 
"disable")
 
 1842            && !$this->getPageConfig()->getPreventHTMLUnmasking()) {
 
 1848        include_once 
'./Services/MathJax/classes/class.ilMathJax.php';
 
 1882        include_once(
"./Services/COPage/classes/class.ilCOPagePCDef.php");
 
 1884        foreach ($defs as 
$def) {
 
 1886            $pc_class = 
$def[
"pc_class"];
 
 1896            $js_files = $pc_obj->getJavascriptFiles($this->
getOutputMode());
 
 1897            foreach ($js_files as 
$js) {
 
 1903            foreach ($css_files as $css) {
 
 1908            $onload_code = $pc_obj->getOnloadCode($this->
getOutputMode());
 
 1909            foreach ($onload_code as 
$code) {
 
 1917        if ($this->ctrl->isAsynch() && !$this->getRawPageContent() &&
 
 1918            $this->getOutputMode() == 
"edit") {
 
 1920            if (
$_GET[
"updated_pc_id_str"] != 
"") {
 
 1921                echo 
$_GET[
"updated_pc_id_str"];
 
 1924            $tpl->setCurrentBlock(
"edit_page");
 
 1925            $tpl->parseCurrentBlock();
 
 1926            echo 
$tpl->get(
"edit_page");
 
 1953        while (is_int($start = strpos(
$output, 
"<!--ParStart-->")) &&
 
 1954            is_int(
$end = strpos(
$output, 
"<!--ParEnd-->", $start))) {
 
 1958                    array(
"{",
"}"),
 
 1959                    substr(
$output, $start + 15, 
$end - ($start + 15))
 
 1975        return array(
"deactivatePage" => $this->lng->txt(
"cont_deactivate_page"),
 
 1976                "activatePage" => $this->lng->txt(
"cont_activate_page"));
 
 1982    public function addActionsMenu($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 
 1989        include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
 1993        $list->setListTitle($this->lng->txt(
"actions"));
 
 1994        $list->setId(
"copage_act");
 
 2002                    $captions[
"deactivatePage"],
 
 2004                    $this->ctrl->getLinkTarget($this, 
"deactivatePage")
 
 2008                    $captions[
"activatePage"],
 
 2010                    $this->ctrl->getLinkTarget($this, 
"activatePage")
 
 2014            $a_tpl->setVariable(
"PAGE_ACTIONS", 
$list->getHTML());
 
 2021                $this->lng->txt(
"cont_initial_attached_content"),
 
 2023                $this->ctrl->getLinkTarget($this, 
"initialOpenedContent")
 
 2033            $items = 
$list->getItems();
 
 2034            if (count($items) > 1) {
 
 2035                $a_tpl->setVariable(
"PAGE_ACTIONS", 
$list->getHTML());
 
 2036            } elseif (count($items) == 1) {
 
 2037                $b = $ui->factory()->button()->standard($items[0][
"title"], $items[0][
"link"]);
 
 2038                $a_tpl->setVariable(
"PAGE_ACTIONS", $ui->renderer()->render($b));
 
 2042        $this->lng->loadLanguageModule(
"content");
 
 2044        $list->setListTitle($this->lng->txt(
"cont_edit_mode"));
 
 2045        $list->setId(
"copage_ed_mode");
 
 2048        if ($sel_media_mode == 
"enable") {
 
 2049            $this->ctrl->setParameter($this, 
"media_mode", 
"disable");
 
 2051                $this->lng->txt(
"cont_deactivate_media"),
 
 2053                $this->ctrl->getLinkTarget($this, 
"setEditMode")
 
 2056            $this->ctrl->setParameter($this, 
"media_mode", 
"enable");
 
 2058                $this->lng->txt(
"cont_activate_media"),
 
 2060                $this->ctrl->getLinkTarget($this, 
"setEditMode")
 
 2063        $this->ctrl->setParameter($this, 
"media_mode", 
"");
 
 2067            if ($sel_html_mode == 
"enable") {
 
 2068                $this->ctrl->setParameter($this, 
"html_mode", 
"disable");
 
 2070                    $this->lng->txt(
"cont_deactivate_html"),
 
 2072                    $this->ctrl->getLinkTarget($this, 
"setEditMode")
 
 2075                $this->ctrl->setParameter($this, 
"html_mode", 
"enable");
 
 2077                    $this->lng->txt(
"cont_activate_html"),
 
 2079                    $this->ctrl->getLinkTarget($this, 
"setEditMode")
 
 2083        $this->ctrl->setParameter($this, 
"html_mode", 
"");
 
 2086        if ($sel_js_mode == 
"enable") {
 
 2087            $this->ctrl->setParameter($this, 
"js_mode", 
"disable");
 
 2089                $this->lng->txt(
"cont_deactivate_js"),
 
 2091                $this->ctrl->getLinkTarget($this, 
"setEditMode")
 
 2094            $this->ctrl->setParameter($this, 
"js_mode", 
"enable");
 
 2096                $this->lng->txt(
"cont_activate_js"),
 
 2098                $this->ctrl->getLinkTarget($this, 
"setEditMode")
 
 2101        $this->ctrl->setParameter($this, 
"js_mode", 
"");
 
 2103        $a_tpl->setVariable(
"EDIT_MODE", 
$list->getHTML());
 
 2119        if (
$cfg->getMultiLangSupport()) {
 
 2124            include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
 
 2127            if (!$ot->getContentActivated()) {
 
 2136                $this->lng->loadLanguageModule(
"meta");
 
 2139                    $l = $ot->getMasterLanguage();
 
 2141                        $this->lng->txt(
"cont_edit_language_version") . 
": " .
 
 2142                        $this->lng->txt(
"meta_l_" . 
$l),
 
 2144                        $this->ctrl->getLinkTarget($this, 
"editMasterLanguage")
 
 2148                foreach ($ot->getLanguages() as $al => 
$lang) {
 
 2150                        $al != $ot->getMasterLanguage()) {
 
 2151                        $this->ctrl->setParameter($this, 
"totransl", $al);
 
 2153                            $this->lng->txt(
"cont_edit_language_version") . 
": " .
 
 2154                            $this->lng->txt(
"meta_l_" . $al),
 
 2156                            $this->ctrl->getLinkTarget($this, 
"switchToLanguage")
 
 2158                        $this->ctrl->setParameter($this, 
"totransl", 
$_GET[
"totransl"]);
 
 2168                include_once(
"./Services/COPage/classes/class.ilPageMultiLangGUI.php");
 
 2173                $a_tpl->setVariable(
"MULTI_LANG_INFO", $ml_gui->getMultiLangInfo($this->getPageObject()->getLanguage()));
 
 2188        if (
$_GET[
"media_mode"] != 
"") {
 
 2189            if (
$_GET[
"media_mode"] == 
"disable") {
 
 2190                $this->
user->writePref(
"ilPageEditor_MediaMode", 
"disable");
 
 2192                $this->
user->writePref(
"ilPageEditor_MediaMode", 
"");
 
 2195        if (
$_GET[
"html_mode"] != 
"") {
 
 2196            if (
$_GET[
"html_mode"] == 
"disable") {
 
 2197                $this->
user->writePref(
"ilPageEditor_HTMLMode", 
"disable");
 
 2199                $this->
user->writePref(
"ilPageEditor_HTMLMode", 
"");
 
 2202        if (
$_GET[
"js_mode"] != 
"") {
 
 2203            if (
$_GET[
"js_mode"] == 
"disable") {
 
 2204                $this->
user->writePref(
"ilPageEditor_JavaScript", 
"disable");
 
 2206                $this->
user->writePref(
"ilPageEditor_JavaScript", 
"");
 
 2210        $this->ctrl->redirect($this, 
"edit");
 
 2219        $a_int_links = 
false,
 
 2220        $a_wiki_links = 
false,
 
 2221        $a_keywords = 
false,
 
 2223        $a_paragraph_styles = 
true,
 
 2224        $a_save_return = 
true,
 
 2227        $a_user_links = 
false 
 2236        include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
 
 2238        include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
 
 2240        $btpl = 
new ilTemplate(
"tpl.tiny_menu.html", 
true, 
true, 
"Services/COPage");
 
 2244            $btpl->touchBlock(
"debug_ghost");
 
 2248        $btpl->touchBlock(
"blist_button");
 
 2251            $lng->txt(
"cont_blist"),
 
 2256        $btpl->touchBlock(
"nlist_button");
 
 2259            $lng->txt(
"cont_nlist"),
 
 2264        $btpl->touchBlock(
"list_indent");
 
 2267            $lng->txt(
"cont_list_indent"),
 
 2272        $btpl->touchBlock(
"list_outdent");
 
 2275            $lng->txt(
"cont_list_outdent"),
 
 2280            $btpl->touchBlock(
"bb_ilink_button");
 
 2282                "iosEditInternalLinkTrigger",
 
 2283                $lng->txt(
"cont_link_to_internal"),
 
 2289            $lng->txt(
"cont_link_to_external"),
 
 2293        if ($a_user_links) {
 
 2294            $btpl->touchBlock(
"bb_ulink_button");
 
 2298        $btpl->touchBlock(
"rformat_button");
 
 2301            $lng->txt(
"cont_remove_format"),
 
 2305        if ($a_paragraph_styles) {
 
 2307            $btpl->setCurrentBlock(
"new_par");
 
 2308            $btpl->setVariable(
"IMG_NEWPAR", 
"+");
 
 2309            $btpl->parseCurrentBlock();
 
 2312                $lng->txt(
"cont_insert_new_paragraph"),
 
 2316            $btpl->setCurrentBlock(
"par_edit");
 
 2317            $btpl->setVariable(
"TXT_PAR_FORMAT", 
$lng->txt(
"cont_par_format"));
 
 2318            include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
 
 2326                "ilAdvSelListAnchorText_style_selection",
 
 2327                $lng->txt(
"cont_paragraph_styles"),
 
 2331            $btpl->parseCurrentBlock();
 
 2335            $btpl->setCurrentBlock(
"bb_kw_button");
 
 2336            $btpl->setVariable(
"CC_KW", 
"kw");
 
 2337            $btpl->parseCurrentBlock();
 
 2340                $lng->txt(
"cont_text_keyword"),
 
 2345        if ($a_wiki_links) {
 
 2346            $btpl->setCurrentBlock(
"bb_wikilink_button2");
 
 2347            $btpl->setVariable(
"TXT_WIKI_BUTTON2", 
$lng->txt(
"obj_wiki"));
 
 2348            $btpl->setVariable(
"WIKI_BUTTON2_URL", 
$ctrl->getLinkTargetByClass(
"ilwikipagegui", 
""));
 
 2349            $btpl->parseCurrentBlock();
 
 2352                $lng->txt(
"cont_wiki_link_dialog"),
 
 2356            $btpl->setCurrentBlock(
"bb_wikilink_button");
 
 2357            $btpl->setVariable(
"TXT_WLN2", 
$lng->txt(
"obj_wiki"));
 
 2358            $btpl->parseCurrentBlock();
 
 2361                $lng->txt(
"cont_link_to_wiki"),
 
 2368        include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
 
 2371            if (in_array($c, array(
"com", 
"quot", 
"acc", 
"code"))) {
 
 2380                if ($aset->get(
"use_physical")) {
 
 2381                    $cc_code = str_replace(array(
"str", 
"emp", 
"imp"), array(
"B", 
"I", 
"U"), $cc_code);
 
 2385                    $btpl->setCurrentBlock(
"bb_" . $c . 
"_button");
 
 2386                    $btpl->setVariable(
"CC_" . strtoupper($c), $cc_code);
 
 2387                    $btpl->parseCurrentBlock();
 
 2390                        $lng->txt(
"cont_cc_" . $c),
 
 2402                $lng->txt(
"cont_tex"),
 
 2408            $lng->txt(
"cont_fn"),
 
 2412        include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
 
 2414        $sdd->setPullRight(
false);
 
 2415        $sdd->setListTitle(
$lng->txt(
"save") . 
"...");
 
 2417        if ($a_save_return) {
 
 2418            $btpl->setCurrentBlock(
"save_return");
 
 2419            $btpl->setVariable(
"TXT_SAVE_RETURN", 
$lng->txt(
"save_return"));
 
 2420            $btpl->parseCurrentBlock();
 
 2421            $sdd->addItem(
$lng->txt(
"save_return"), 
"", 
"#", 
"", 
"", 
"", 
"", 
"", 
"ilCOPage.cmdSaveReturn(false); return false;");
 
 2425            $btpl->setCurrentBlock(
"save_new");
 
 2426            $btpl->setVariable(
"TXT_SAVE_NEW", 
$lng->txt(
"save_new"));
 
 2427            $btpl->parseCurrentBlock();
 
 2428            $sdd->addItem(
$lng->txt(
"save_new"), 
"", 
"#", 
"", 
"", 
"", 
"", 
"", 
"ilCOPage.cmdSaveReturn(true); return false;");
 
 2431        $sdd->addItem(
$lng->txt(
"save"), 
"", 
"#", 
"", 
"", 
"", 
"", 
"", 
"ilCOPage.cmdSave(null); return false;");
 
 2432        $sdd->addItem(
$lng->txt(
"cancel"), 
"", 
"#", 
"", 
"", 
"", 
"", 
"", 
"ilCOPage.cmdCancel(); return false;");
 
 2435            $btpl->setCurrentBlock(
"bb_anc_button");
 
 2436            $btpl->setVariable(
"CC_ANC", 
"anc");
 
 2437            $btpl->parseCurrentBlock();
 
 2440                $lng->txt(
"cont_anchor"),
 
 2445        $btpl->setVariable(
"SAVE_DROPDOWN", $sdd->getHTML());
 
 2454        $btpl->setVariable(
"TXT_SAVE", 
$lng->txt(
"save"));
 
 2455        $btpl->setVariable(
"TXT_CANCEL", 
$lng->txt(
"cancel"));
 
 2457        $btpl->setVariable(
"TXT_CHAR_FORMAT", 
$lng->txt(
"cont_char_format"));
 
 2458        $btpl->setVariable(
"TXT_LISTS", 
$lng->txt(
"cont_lists"));
 
 2459        $btpl->setVariable(
"TXT_LINKS", 
$lng->txt(
"cont_links"));
 
 2460        $btpl->setVariable(
"TXT_MORE_FUNCTIONS", 
$lng->txt(
"cont_more_functions"));
 
 2461        $btpl->setVariable(
"TXT_SAVING", 
$lng->txt(
"cont_saving"));
 
 2463        include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
 
 2467            "ilAdvSelListAnchorElement_char_style_selection",
 
 2468            $lng->txt(
"cont_more_character_styles"),
 
 2472        return $btpl->get();
 
 2482        $link_info = 
"<IntLinkInfos>";
 
 2483        $targetframe = 
"None";
 
 2484        foreach ($int_links as $int_link) {
 
 2485            $target = $int_link[
"Target"];
 
 2486            if (substr(
$target, 0, 4) == 
"il__") {
 
 2489                $type = $int_link[
"Type"];
 
 2491                $targetframe = ($int_link[
"TargetFrame"] != 
"")
 
 2492                    ? $int_link[
"TargetFrame"]
 
 2496                if ($targetframe != 
"None") {
 
 2501                $anc = $anc_add = 
"";
 
 2502                if ($int_link[
"Anchor"] != 
"") {
 
 2503                    $anc = $int_link[
"Anchor"];
 
 2504                    $anc_add = 
"_" . rawurlencode($int_link[
"Anchor"]);
 
 2511                    case "StructureObject":
 
 2513                        if (
$type == 
"PageObject") {
 
 2514                            $href = 
"./goto.php?target=pg_" . 
$target_id . $anc_add;
 
 2516                            $href = 
"./goto.php?target=st_" . 
$target_id;
 
 2523                    case "GlossaryItem":
 
 2524                        if ($targetframe == 
"None") {
 
 2525                            $targetframe = 
"Glossary";
 
 2527                        $href = 
"./goto.php?target=git_" . 
$target_id;
 
 2531                        $this->ctrl->setParameter($this, 
"mob_id", 
$target_id);
 
 2533                        $href = $this->ctrl->getLinkTarget($this, 
"displayMedia");
 
 2534                        $this->ctrl->setParameter($this, 
"mob_id", 
"");
 
 2538                        include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
 2542                    case "PortfolioPage":
 
 2543                        include_once(
"./Modules/Portfolio/classes/class.ilPortfolioPage.php");
 
 2547                    case "RepositoryItem":
 
 2550                        $href = 
"./goto.php?target=" . $obj_type . 
"_" . 
$target_id;
 
 2555                        if ($obj_type == 
"usr") {
 
 2556                            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 2559                            $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
$target_id);
 
 2560                            $this->ctrl->setParameterByClass(
 
 2561                                "ilpublicuserprofilegui",
 
 2566                            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 2568                                $href = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui", 
"getHTML");
 
 2570                            $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
"");
 
 2572                            $lcontent = str_replace(
"&", 
"&" ,htmlentities($lcontent));
 
 2578                    $anc_par = 
'Anchor="' . $anc . 
'"';
 
 2579                    $link_info .= 
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " . $anc_par . 
" " .
 
 2580                        "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" />";
 
 2584        $link_info.= 
"</IntLinkInfos>";
 
 2593        return $this->ctrl->getLinkTargetByClass(strtolower(get_class($this)), 
"preview");
 
 2602        $download_ok = 
false;
 
 2604        require_once(
"./Modules/File/classes/class.ilObjFile.php");
 
 2606        $pg_obj->buildDom();
 
 2607        $int_links = $pg_obj->getInternalLinks();
 
 2608        foreach ($int_links as $il) {
 
 2609            if ($il[
"Target"] == str_replace(
"_file_", 
"_dfile_", 
$_GET[
"file_id"])) {
 
 2612                $download_ok = 
true;
 
 2615        if (in_array(
$_GET[
"file_id"], $pg_obj->getAllFileObjIds())) {
 
 2618            $download_ok = 
true;
 
 2622        foreach ($pcs as $pc) {
 
 2626            if (in_array($file_id, 
$files)) {
 
 2627                $download_ok = 
true;
 
 2632            $fileObj = 
new ilObjFile($file_id, 
false);
 
 2633            $fileObj->sendFile();
 
 2653        $tpl = 
new ilTemplate(
"tpl.fullscreen.html", 
true, 
true, 
"Modules/LearningModule");
 
 2654        $tpl->setCurrentBlock(
"ilMedia");
 
 2662        require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 2664        require_once(
"./Services/COPage/classes/class.ilPageObject.php");
 
 2666        $pg_obj->buildDom();
 
 2668        if (!empty(
$_GET[
"pg_id"])) {
 
 2670            $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
 
 2682        $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
 2683        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
 2687        if ($a_fullscreen) {
 
 2688            $mode = 
"fullscreen";
 
 2695        $params = array(
'mode' => $mode, 
'enlarge_path' => $enlarge_path,
 
 2696            'link_params' => 
"ref_id=" . 
$_GET[
"ref_id"],
'fullscreen_link' => 
"",
 
 2697            'ref_id' => 
$_GET[
"ref_id"], 
'webspace_path' => $wb_path);
 
 2698        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
$params);
 
 2704        require_once(
'./Services/Style/Content/classes/class.ilObjStyleSheet.php');
 
 2706            "LOCATION_CONTENT_STYLESHEET",
 
 2713        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
 2715        $tpl->fillJavaScriptFiles();
 
 2716        $tpl->fillCssFiles();
 
 2728        $pg_obj->send_paragraph(
$_GET[
"par_id"], 
$_GET[
"downloadtitle"]);
 
 2739        include_once(
"./Services/Utilities/classes/class.ilStr.php");
 
 2743        $page_heads = array();
 
 2744        foreach ($offsets as $os) {
 
 2745            $level = (int) substr($a_output, $os + 10, 1);
 
 2746            if (in_array($level, array(1,2,3))) {
 
 2747                $anchor = str_replace(
 
 2750                    substr($a_output, $os, strpos($a_output, 
"<", $os) - $os - 4)
 
 2754                $tag_start = stripos($a_output, 
"<h" . $level . 
" ", $os);
 
 2755                $tag_end = stripos($a_output, 
"</h" . $level . 
">", $tag_start);
 
 2756                $head = substr($a_output, $tag_start, $tag_end - $tag_start);
 
 2759                $text_start = stripos($head, 
">") + 1;
 
 2760                $text_end = strripos($head, 
"<!--", $text_start);
 
 2761                $text = substr($head, $text_start, $text_end - $text_start);
 
 2762                $page_heads[] = array(
"level" => $level, 
"text" => 
$text,
 
 2763                    "anchor" => $anchor);
 
 2767        if (count($page_heads) > 1) {
 
 2768            include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
 
 2770            $list->setAutoNumbering(
true);
 
 2771            $list->setListClass(
"ilc_page_toc_PageTOCList");
 
 2772            $list->setItemClass(
"ilc_page_toc_PageTOCItem");
 
 2780            foreach ($page_heads as $ind => 
$h) {
 
 2786                if (
$h[
"level"] == 2 && $c_par[1] > 0) {
 
 2789                if (
$h[
"level"] == 3 && $c_par[2] > 0) {
 
 2793                $h[
"text"] = str_replace(
"<!--PageTocPH-->", 
"", 
$h[
"text"]);
 
 2797                    "<a href='#" . 
$h[
"anchor"] . 
"' class='ilc_page_toc_PageTOCLink'>" . 
$h[
"text"] . 
"</a>",
 
 2803                if (
$h[
"level"] == 1) {
 
 2807                if (
$h[
"level"] == 2) {
 
 2813                "tpl.page_toc.html",
 
 2818            $tpl->setVariable(
"PAGE_TOC", 
$list->getHTML());
 
 2819            $tpl->setVariable(
"TXT_PAGE_TOC", $this->lng->txt(
"cont_page_toc"));
 
 2820            $tpl->setVariable(
"TXT_HIDE", $this->lng->txt(
"hide"));
 
 2821            $tpl->setVariable(
"TXT_SHOW", $this->lng->txt(
"show"));
 
 2823            $a_output = str_replace(
 
 2824                "{{{{{PageTOC}}}}}",
 
 2828            $numbers = 
$list->getNumbers();
 
 2830            if (count($numbers) > 0) {
 
 2831                include_once(
"./Services/Utilities/classes/class.ilStr.php");
 
 2832                foreach ($numbers as 
$n) {
 
 2838            $a_output = str_replace(
 
 2839                "{{{{{PageTOC}}}}}",
 
 2860            include_once(
"./Services/COPage/classes/class.ilPCResourcesGUI.php");
 
 2877            $a_output = str_replace(
 
 2878                "{{{{{LV_show_adv}}}}}",
 
 2879                $this->lng->txt(
"cont_show_adv"),
 
 2882            $a_output = str_replace(
 
 2883                "{{{{{LV_hide_adv}}}}}",
 
 2884                $this->lng->txt(
"cont_hide_adv"),
 
 2888            $a_output = str_replace(
 
 2889                "{{{{{LV_show_adv}}}}}",
 
 2893            $a_output = str_replace(
 
 2894                "{{{{{LV_hide_adv}}}}}",
 
 2918        $a_tpl->setCurrentBlock(
"help");
 
 2919        $a_tpl->setVariable(
"TXT_ADD_EL", $this->lng->txt(
"cont_add_elements"));
 
 2920        include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
 2923        $a_tpl->setVariable(
"TXT_DRAG", $this->lng->txt(
"cont_drag_and_drop_elements"));
 
 2924        $a_tpl->setVariable(
"TXT_SEL", $this->lng->txt(
"cont_double_click_to_delete"));
 
 2925        $a_tpl->parseCurrentBlock();
 
 2953            $this->ctrl->redirect($this, 
"preview");
 
 2958        if ($ptype == 
"cont" && 
$_GET[
"ref_id"] > 0) {
 
 2961        $this->help->setScreenId(
"edit_" . $ptype);
 
 2963        require_once 
'Services/Captcha/classes/class.ilCaptchaUtil.php';
 
 2965            $this->
user->isAnonymous() &&
 
 2966            !$this->user->isCaptchaVerified() &&
 
 2967            ilCaptchaUtil::isActiveForWiki()
 
 2970            if (
$_POST[
'captcha_code'] && 
$form->checkInput()) {
 
 2971                $this->
user->setCaptchaVerified(
true);
 
 2973                return $form->getHTML();
 
 2979            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 2980            $info = $this->lng->txt(
"content_no_edit_lock");
 
 2982            $info .= 
"</br>" . $this->lng->txt(
"content_until") . 
": " .
 
 2984            $info .= 
"</br>" . $this->lng->txt(
"obj_usr") . 
": " .
 
 2986            if (!$this->ctrl->isAsynch()) {
 
 2990                echo $this->tpl->getMessageHTML(
$info);
 
 2994            if ($this->
getPageObject()->getEffectiveEditLockTime() > 0) {
 
 2995                include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 2997                $info = $this->lng->txt(
"cont_got_lock_until");
 
 3003                include_once(
"./Services/UIComponent/Button/classes/class.ilLinkButton.php");
 
 3005                $but->setCaption(
"cont_finish_editing");
 
 3006                $but->setUrl($this->ctrl->getLinkTarget($this, 
"releasePageLock"));
 
 3007                $info = str_replace(
"%2", $but->render(), 
$info);
 
 3033        if (
$_GET[
"pl_hier_id"] == 
"") {
 
 3034            $this->obj->buildDom();
 
 3035            $this->obj->addHierIDs();
 
 3036            $hid = $this->obj->getHierIdsForPCIds(array(
$_GET[
"pl_pc_id"]));
 
 3037            $_GET[
"pl_hier_id"] = $hid[
$_GET[
"pl_pc_id"]];
 
 3044        $tpl->addOnLoadCode(
"ilCOPage.insertJSAtPlaceholder('" .
 
 3045            $_GET[
"pl_hier_id"] . 
":" . 
$_GET[
"pl_pc_id"] .
 
 3056        require_once  
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
 3059        require_once 
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
 
 3060        $ci = 
new ilCaptchaInputGUI($this->lng->txt(
'cont_captcha_code'), 
'captcha_code');
 
 3061        $ci->setRequired(
true);
 
 3062        $form->addItem($ci);
 
 3064        $form->addCommandButton(
'edit', $this->lng->txt(
'ok'));
 
 3066        $form->setTitle($this->lng->txt(
'cont_captcha_verification'));
 
 3067        $form->setFormAction($this->ctrl->getFormAction($this));
 
 3093        $this->tpl = 
new ilTemplate(
"tpl.fullscreen.html", 
true, 
true, 
"Services/COPage");
 
 3094        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 3095        $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
 
 3096        $this->tpl->parseCurrentBlock();
 
 3100        $this->tpl->setCurrentBlock(
"ilMedia");
 
 3102        require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 3104        if (!empty(
$_GET[
"pg_id"])) {
 
 3105            include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
 
 3107            $pg_obj->buildDom();
 
 3112            $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
 
 3124        $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
 3125        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
 3132        $mode = 
"fullscreen";
 
 3133        $params = array(
'mode' => $mode, 
'webspace_path' => $wb_path);
 
 3134        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
$params);
 
 3139        $this->tpl->setVariable(
"MEDIA_CONTENT", 
$output);
 
 3149        if (is_array($a_error)) {
 
 3150            $error_str = 
"<b>Error(s):</b><br>";
 
 3151            foreach ($a_error as 
$error) {
 
 3152                $err_mess = implode(
$error, 
" - ");
 
 3153                if (!is_int(strpos($err_mess, 
":0:"))) {
 
 3154                    $error_str .= htmlentities($err_mess) . 
"<br />";
 
 3157            $this->tpl->setVariable(
"MESSAGE", $error_str);
 
 3170        $this->tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
 
 3172        include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
 
 3174        $table_gui->setId(
"hist_table");
 
 3181            'sortkey' => 999999,
 
 3183        $table_gui->setData($entries);
 
 3184        return $table_gui->getHTML();
 
 3196        include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 3200        $this->ctrl->setParameter($this, 
"rollback_nr", 
$_GET[
"old_nr"]);
 
 3201        $c_gui->setFormAction($this->ctrl->getFormAction($this, 
"rollback"));
 
 3202        $c_gui->setHeaderText($this->lng->txt(
"cont_rollback_confirmation"));
 
 3203        $c_gui->setCancel($this->lng->txt(
"cancel"), 
"history");
 
 3204        $c_gui->setConfirm($this->lng->txt(
"confirm"), 
"rollback");
 
 3206        $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
 
 3214        $this->tpl->setContent($c_gui->getHTML());
 
 3226        $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
 
 3228        if ($hentry[
"content"] != 
"") {
 
 3229            $this->obj->setXMLContent($hentry[
"content"]);
 
 3230            $this->obj->buildDom(
true);
 
 3231            if ($this->obj->update()) {
 
 3232                $this->ctrl->redirect($this, 
"history");
 
 3235        $this->ctrl->redirect($this, 
"history");
 
 3246        $this->help->setScreenIdComponent(
"copg");
 
 3264            $this->tabs_gui->addTarget(
"pg", $this->ctrl->getLinkTarget($this, 
"preview"), array(
"", 
"preview"));
 
 3267                $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this, 
"edit"), array(
"", 
"edit"));
 
 3271                $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this, 
"edit"), array(
"", 
"edit"));
 
 3274            $this->tabs_gui->addTarget(
"cont_preview", $this->ctrl->getLinkTarget($this, 
"preview"), array(
"", 
"preview"));
 
 3280        if ($this->use_meta_data) {
 
 3281            include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
 3283                $this->meta_data_rep_obj,
 
 3284                $this->meta_data_type,
 
 3285                $this->meta_data_sub_obj_id
 
 3287            $mdtab = $mdgui->getTab();
 
 3289                $this->tabs_gui->addTarget(
 
 3293                    "ilobjectmetadatagui" 
 3301            $this->tabs_gui->addTarget(
"history", $this->ctrl->getLinkTarget($this, 
"history"), 
"history", get_class($this));
 
 3302            if (
$_GET[
"history_mode"] == 
"1" || $this->ctrl->getCmd() == 
"compareVersion") {
 
 3303                $this->tabs_gui->activateTab(
"history");
 
 3315            $this->tabs_gui->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(array(get_class($this), 
"ilEditClipboardGUI"), 
"view"), 
"view", 
"ilEditClipboardGUI");
 
 3318        if ($this->
getPageConfig()->getEnableScheduledActivation()) {
 
 3319            $this->tabs_gui->addTarget(
 
 3321                $this->ctrl->getLinkTarget($this, 
"editActivation"),
 
 3328            $this->tabs_gui->addTarget(
 
 3330                $this->ctrl->getLinkTargetByClass(
"ilnewsitemgui", 
"editNews"),
 
 3337        if (is_array($this->tab_hook)) {
 
 3338            $func = $this->tab_hook[
"func"];
 
 3339            $this->tab_hook[
"obj"]->$func();
 
 3353        $tpl = 
new ilTemplate(
"tpl.page_compare.html", 
true, 
true, 
"Services/COPage");
 
 3354        $compare = $this->obj->compareVersion((
int) 
$_POST[
"left"], (
int) 
$_POST[
"right"]);
 
 3357        $lpage = $compare[
"l_page"];
 
 3359        $cfg->setPreventHTMLUnmasking(
true);
 
 3368        $lhtml = str_replace(
"<br />", 
"<br />", $lhtml);
 
 3369        $tpl->setVariable(
"LEFT", $lhtml);
 
 3372        $rpage = $compare[
"r_page"];
 
 3380        $rhtml = str_replace(
"<br />", 
"<br />", $rhtml);
 
 3381        $tpl->setVariable(
"RIGHT", $rhtml);
 
 3383        $tpl->setVariable(
"TXT_NEW", $this->lng->txt(
"cont_pc_new"));
 
 3384        $tpl->setVariable(
"TXT_MODIFIED", $this->lng->txt(
"cont_pc_modified"));
 
 3385        $tpl->setVariable(
"TXT_DELETED", $this->lng->txt(
"cont_pc_deleted"));
 
 3395        $a_html = str_replace(
"[ilDiffInsStart]", 
'<span class="ilDiffIns">', $a_html);
 
 3396        $a_html = str_replace(
"[ilDiffDelStart]", 
'<span class="ilDiffDel">', $a_html);
 
 3397        $a_html = str_replace(
"[ilDiffInsEnd]", 
'</span>', $a_html);
 
 3398        $a_html = str_replace(
"[ilDiffDelEnd]", 
'</span>', $a_html);
 
 3408        $atpl = 
new ilTemplate(
"tpl.page_activation.php", 
true, 
true, 
"Services/COPage");
 
 3411        $atpl->setVariable(
"FORM", $this->form->getHTML());
 
 3412        $atpl->setCurrentBlock(
"updater");
 
 3413        $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
 
 3414        $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
 
 3415        $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
 
 3416        $atpl->parseCurrentBlock();
 
 3417        $this->tpl->setContent($atpl->get());
 
 3425        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3427        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 3428        $this->form->setTitle($this->lng->txt(
"cont_page_activation"));
 
 3432        $rad_op1 = 
new ilRadioOption($this->lng->txt(
"cont_activated"), 
"activated");
 
 3434        $rad->addOption($rad_op1);
 
 3435        $rad_op2 = 
new ilRadioOption($this->lng->txt(
"cont_deactivated"), 
"deactivated");
 
 3436        $rad->addOption($rad_op2);
 
 3437        $rad_op3 = 
new ilRadioOption($this->lng->txt(
"cont_scheduled_activation"), 
"scheduled");
 
 3440        $dt_prop->setRequired(
true);
 
 3441        $dt_prop->setShowTime(
true);
 
 3442        $rad_op3->addSubItem($dt_prop);
 
 3444        $dt_prop2->setRequired(
true);
 
 3445        $dt_prop2->setShowTime(
true);
 
 3446        $rad_op3->addSubItem($dt_prop2);
 
 3449        $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_show_activation_info"), 
"show_activation_info");
 
 3450        $cb->setInfo($this->lng->txt(
"cont_show_activation_info_info"));
 
 3451        $rad_op3->addSubItem($cb);
 
 3454        $rad->addOption($rad_op3);
 
 3456        $this->form->addCommandButton(
"saveActivation", $this->lng->txt(
"save"));
 
 3458        $this->form->addItem($rad);
 
 3471        $dt_prop = $this->form->getItemByPostVar(
"start");
 
 3479        $dt_prop = $this->form->getItemByPostVar(
"end");
 
 3488        $this->form->getItemByPostVar(
"activation")->setValue(
$activation);
 
 3489        $this->form->getItemByPostVar(
"show_activation_info")->setChecked($this->
getPageObject()->getShowActivationInfo());
 
 3499        if ($this->form->checkInput()) {
 
 3504            if (
$_POST[
"activation"] == 
"deactivated") {
 
 3507            if (
$_POST[
"activation"] == 
"scheduled") {
 
 3510                    $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME)
 
 3518            $this->ctrl->redirect($this, 
"editActivation");
 
 3520        $this->form->setValuesByPost();
 
 3521        $this->tpl->setContent($this->form->getHTML());
 
 3533    public function getNotesHTML($a_content_object = 
null, $a_enable_private_notes = 
true, $a_enable_public_notes = 
false, $a_enable_notes_deletion = 
false, $a_callback = 
null)
 
 3535        include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
 3538        if (!$a_content_object) {
 
 3540                $this->notes_parent_id,
 
 3541                (
int) $this->obj->getId(),
 
 3545            $a_enable_private_notes = 
true;
 
 3546            $a_enable_public_notes = 
true;
 
 3547            $a_enable_notes_deletion = 
false;
 
 3552                $a_content_object->getParentId(),
 
 3553                $a_content_object->getId(),
 
 3554                $a_content_object->getParentType()
 
 3558        if ($a_enable_private_notes) {
 
 3559            $notes_gui->enablePrivateNotes();
 
 3561        if ($a_enable_public_notes) {
 
 3562            $notes_gui->enablePublicNotes();
 
 3563            if ((
bool) $a_enable_notes_deletion) {
 
 3564                $notes_gui->enablePublicNotesDeletion(
true);
 
 3569            $notes_gui->addObserver($a_callback);
 
 3572        $next_class = $this->ctrl->getNextClass($this);
 
 3573        if ($next_class == 
"ilnotegui") {
 
 3574            $html = $this->ctrl->forwardCommand($notes_gui);
 
 3576            $html = $notes_gui->getNotesHTML();
 
 3586        include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
 
 3609        $this->tabs_gui->activateTab(
"edit");
 
 3612        $this->tpl->setContent(
$form->getHTML());
 
 3623        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3627        include_once 
'Services/Form/classes/class.ilLinkInputGUI.php';
 
 3628        $ac = 
new ilLinkInputGUI($this->lng->txt(
'cont_resource'), 
'opened_content');
 
 3630        $ac->setInternalLinkDefault(
"Media_Media", 0);
 
 3631        $ac->setInternalLinkFilterTypes(array(
"PageObject_FAQ", 
"GlossaryItem", 
"Media_Media", 
"Media_FAQ"));
 
 3632        $val = $this->obj->getInitialOpenedContent();
 
 3633        if ($val[
"id"] != 
"" && $val[
"type"] != 
"") {
 
 3634            $ac->setValue($val[
"type"] . 
"|" . $val[
"id"] . 
"|" . $val[
"target"]);
 
 3637        $form->addItem($ac);
 
 3639        $form->addCommandButton(
"saveInitialOpenedContent", $this->lng->txt(
"save"));
 
 3640        $form->addCommandButton(
"edit", $this->lng->txt(
"cancel"));
 
 3641        $form->setTitle($this->lng->txt(
"cont_initial_attached_content"));
 
 3642        $form->setFormAction($this->ctrl->getFormAction($this));
 
 3655        $this->obj->saveInitialOpenedContent(
 
 3662        $this->ctrl->redirect($this, 
"edit");
 
 3681        $this->ctrl->setParameter($this, 
"transl", 
$_GET[
"totransl"]);
 
 3682        $this->ctrl->redirect($this, 
"edit");
 
 3691        $this->ctrl->setParameter($this, 
"totransl", 
$l);
 
 3692        $this->lng->loadLanguageModule(
"meta");
 
 3694        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
 3696        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 3697        $cgui->setHeaderText($this->lng->txt(
"cont_page_translation_does_not_exist") . 
": " .
 
 3698            $this->lng->txt(
"meta_l_" . 
$l));
 
 3699        $cgui->setCancel($this->lng->txt(
"cancel"), 
"editMasterLanguage");
 
 3700        $cgui->setConfirm($this->lng->txt(
"confirm"), 
"createPageTranslation");
 
 3701        $this->tpl->setContent($cgui->getHTML());
 
 3709        $this->ctrl->setParameter($this, 
"transl", 
"");
 
 3710        $this->ctrl->redirect($this, 
"edit");
 
 3720        include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
 
 3727        $p->copyPageToTranslation(
$l);
 
 3728        $this->ctrl->setParameter($this, 
"transl", 
$l);
 
 3729        $this->ctrl->redirect($this, 
"edit");
 
 3739        $this->ctrl->redirect($this, 
"preview");
 
if(strpos( $jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting
An exception for terminatinating execution or to throw for unit testing.
const IL_PAGE_PRESENTATION
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
static _getQuestionType($question_id)
Returns the question type of a question with a given id.
static addCss()
Add required css.
static addJavaScript(ilTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
User interface class for advanced drop-down selection lists.
const CMD_SHOW
command constants
static getPCDefinitions()
Get PC definitions.
static requirePCClassByName($a_name)
Get instance.
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
@classDescription Date and time handling
Class ilEditClipboardGUI.
static get($a_glyph, $a_text="")
Get glyph html.
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static getLogger($a_component_id)
Get component logger.
static isActivated()
Checks whether Map feature is activated.
static getInstance()
Singleton: get instance.
static lookupTitle($a_page_id)
Lookup title.
static initJS(ilTemplate $a_main_tpl=null)
Init javascript.
User Interface for NewsItem entities.
static hasSuccessorPage($a_cont_obj_id, $a_page_id)
checks if page has a successor page
static _getFilesOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-")
get all files of an object
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static getInstance($a_obj_id)
Get instance.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static initJavascript()
Init javascript.
static collectContentIncludes($a_page, $a_domdoc)
get all content includes that are used within the page
static _getCharacteristics($a_style_id)
Get characteristics.
static _getTextCharacteristics($a_style_id, $a_include_core=false)
Get text characteristics.
static getStyleSelector($a_selected, $a_chars, $a_use_callback=false)
Get style selector.
static getCharStyleSelector($a_par_type, $a_use_callback=true, $a_style_id=0)
Get character style selector.
static insertResourcesIntoPageContent($a_content)
Insert resources (see also ilContainerContentGUI::determinePageEmbeddedBlocks for presentation)
static getCacheTriggerString($a_page)
Get page cache update trigger string.
static _getCommonBBButtons()
Get common bb buttons.
static getUsagesOfPage($a_usage_id, $a_usage_type, $a_hist_nr=0, $a_all_hist_nrs=false, $a_lang="-")
Get page content usages for page.
static _doJSEditing()
checks if current user has activated js editing and if browser is js capable
static lookupSettingByParentType($a_par_type, $a_name, $a_default=false)
Lookup setting by parent type.
Page History Table GUI Class.
Page multilinguality GUI class.
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
afterConstructor()
After constructor.
getRawPageContent()
Get Get raw page content only.
setTemplateOutputVar($a_value)
setPrependingHtml($a_prependinghtml)
Set Prepending HTML.
onFeedbackEditingForwarding()
On feedback editing forwarding.
setPresentationTitle($a_title="")
getEditPreview()
Get Display first Edit tab, then Preview tab, instead of Page and Edit.
rollback()
Rollback to a previous version.
getTabs($a_activate="")
adds tabs to tab gui object
determineSourcecodeDownloadScript()
Determine source code download script.
setOldNr($a_val)
Set old nr (historic page)
setIntLinkReturn($a_return)
showMediaFullscreen($a_style_id=0)
show fullscreen view of media object
processAnswer()
Process answer.
showPage()
display content of page
getEnablePCType($a_pc_type)
Get enable pc type.
getViewPageText()
get view page text
insertPageToc($a_output)
Insert page toc.
getProfileBackUrl()
Get profile back url.
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
getDisabledText()
Get disabled text.
setQuestionHTML($question_html)
displayValidationError($a_error)
display validation error
addMultiLangActionsAndInfo($a_list, $a_tpl)
Add multi-language actions to menu.
setEditMode()
Set edit mode.
saveActivation()
Save Activation.
insertResources($a_output)
Insert resources.
setRenderPageContainer($a_val)
Set render page container.
getEnabledNews()
Get enabled news.
getLanguage()
Get language.
setEnabledTabs($a_enabledtabs)
Set Output tabs.
getNotesHTML($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
Get html for public and/or private notes.
isPageContainerToBeRendered()
setQuestionXML($question_xml)
getCompareMode()
Get compare mode.
releasePageLock()
Release page lock.
getActivationFormValues()
Get values for activation form.
initOpenedContentForm()
Init form for initially opened content.
enableChangeComments($a_enabled)
setParentType($a_val)
Set parent type.
setPageConfig($a_val)
Set page config object.
initialOpenedContent()
Initially opened content.
addActionsMenu($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
Add actions menu.
confirmPageTranslationCreation()
Confirm page translation creation.
editActivation()
Edit activation (only, if scheduled page activation is activated in administration)
getPrependingHtml()
Get Prepending HTML.
determineFullscreenLink()
Determine fullscreen link.
setExplorerUpdater($a_exp_frame, $a_exp_id, $a_exp_target_script)
Set Explorer Updater.
setViewPageLink($a_link, $a_target="")
set link for "view page" button
setEnabledNews($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
Set enabled news.
compareVersion()
Compares two revisions of the page.
getParentType()
Get parent type.
displayMedia($a_fullscreen=false)
Display media.
getAbstractOnly()
Get abstract only.
setTabHook($a_object, $a_function)
Set tab hook.
$sourcecode_download_script
setAbstractOnly($a_val)
Set abstract only.
determineFileDownloadLink()
Determine file download link.
getViewPageTarget()
get view page target frame
getPagePermaLink()
Get page perma link.
getPageObject()
Get Page Object.
getFullscreenLink()
Get fullscreen link.
setCompareMode($a_val)
Set compare mode.
insertAdvTrigger($a_output)
Insert adv content trigger.
replaceCurlyBrackets($output)
Replace curly brackets.
__construct( $a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
activateMetaDataEditor( $a_rep_obj, $a_type, $a_sub_obj_id, $a_observer_obj=null, $a_observer_func="")
Activate meda data editor.
setEnableEditing($a_enableediting)
Set Enable Editing.
getEnabledTabs()
Get Output tabs.
editMasterLanguage()
Edit master language.
setScreenIdComponent()
Set screen id component.
previewHistory()
Preview history.
getStyleId()
Get Style Id.
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
postOutputProcessing($a_output)
Finalizing output processing.
setTemplateOutput($a_output=true)
getPageConfig()
Get page config object.
createPageTranslation()
Create page translation.
initCaptchaForm()
Init captcha form.
setPageBackTitle($a_title)
setFileDownloadLink($a_download_link)
Set file download link.
setEnablePCType($a_pc_type, $a_val)
Set enable pc type.
history()
Get history table as HTML.
displayMediaFullscreen()
Show media in fullscreen mode.
setDefaultLinkXml()
Set standard link xml.
saveInitialOpenedContent()
Save initial opened content.
setFullscreenLink($a_fullscreen_link)
Set fullscreen link.
insertHelp($a_tpl)
Insert help texts.
setStyleId($a_styleid)
Set Style Id.
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
getOfflineDirectory()
get offline directory
rollbackConfirmation()
Rollback confirmation.
presentation($a_mode=IL_PAGE_PRESENTATION)
static getTinyMenu( $a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false)
Get Tiny Menu.
setLanguage($a_val)
Set language.
executeCommand()
execute command
initPageObject()
Init page object.
getEnableEditing()
Get Enable Editing.
setLinkParams($l_params="")
switchToLanguage()
Switch to language.
getEnabledPageFocus()
Get Enable page focus.
getComponentPluginsXML()
Put information about activated plugins into XML.
enableNotes($a_enabled, $a_parent_id)
setLinkFrame($l_frame="")
getFileDownloadLink()
Get file download link.
setSourcecodeDownloadScript($script_name)
Set sourcecode download script.
setPageObject(ilPageObject $a_pg_obj)
Set Page Object.
setTemplateTargetVar($a_variable)
getActivationCaptions()
Get captions for activation action menu entries.
initActivationForm()
Init activation form.
insertJSAtPlaceholder()
InsertJS at placeholder.
downloadFile()
Download file of file lists.
getViewPageLink()
get view page link
download_paragraph()
download source code paragraph
setActivationListener(&$a_obj, $a_meth)
edit()
edit ("view" before)
setQEditTabs($a_active)
Set question editing tabs.
getSourcecodeDownloadScript()
Get sourcecode download script.
setOfflineDirectory($offdir)
set offline directory to offdir
isEnabledChangeComments()
setEnabledPageFocus($a_enabledpagefocus)
Set Enable page focus.
getOldNr()
Get old nr (historic page)
getRenderPageContainer()
Get render page container.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static saveQuestionAnswer($a_type, $a_id, $a_answer)
Save question answer.
static getFlashVideoPlayerFilename($a_fullpath=false)
Get flash video player file name.
static initMediaElementJs($a_tpl=null)
Init mediaelement.js scripts.
static getGotoForPortfolioPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
GUI class for public user profile presentation.
This class represents an option in a radio group.
static strPosAll($a_haystack, $a_needle)
Get all positions of a string.
static replaceFirsOccurence($a_old, $a_new, $a_str)
Replaces the first occurence of $a_old in $a_str with $a_new.
special template class to simplify handling of ITX/PEAR
static hasPublicProfile($a_user_id)
Has public profile.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getWebspaceDir($mode="filesystem")
get webspace directory
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 getGotoForWikiPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
static initDragDrop()
Init YUI Drag and Drop.
static initConnection(ilTemplate $a_main_tpl=null)
Init YUI Connection module.
static initPanel($a_resize=false, ilTemplate $a_main_tpl=null)
Init yui panel.
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if(!array_key_exists('StateId', $_REQUEST)) $id
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
catch(Exception $e) if(isset( $_POST[ 'cancel'])) if(isset($_POST['continue'])) $cfg