135 $a_prevent_get_id =
false,
141 $this->tpl =
$DIC->ui()->mainTemplate();
142 $this->ctrl =
$DIC->ctrl();
143 $this->lng =
$DIC->language();
144 $this->tabs_gui =
$DIC->tabs();
145 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
146 $this->access =
$DIC->access();
147 $this->
user = $DIC->user();
148 $this->
help = $DIC[
"ilHelp"];
149 $this->
ui = $DIC->ui();
153 if ($a_old_nr == 0 && !$a_prevent_get_id &&
$_GET[
"old_nr"] > 0) {
154 $a_old_nr =
$_GET[
"old_nr"];
158 if ($a_lang ==
"" &&
$_GET[
"transl"] !=
"") {
173 $this->page_linker =
new ilPageLinker(get_class($this));
175 $this->output2template =
true;
176 $this->question_xml =
"";
177 $this->question_html =
"";
179 $this->template_output_var =
"PAGE_CONTENT";
180 $this->change_comments =
false;
181 $this->page_back_title = $this->lng->txt(
"page");
182 $this->lng->loadLanguageModule(
"content");
183 $this->lng->loadLanguageModule(
"copg");
185 $this->tool_context =
$DIC->globalScreen()->tool()->context();
189 $this->ctrl->saveParameter($this,
"transl");
207 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
224 $this->parent_type = $a_val;
264 $this->old_nr = $a_val;
274 return $this->old_nr;
298 return $this->language;
328 $this->page_config = $a_val;
348 $this->obj = $a_pg_obj;
368 $this->output_mode = $a_mode;
378 $this->output2template = $a_output;
388 $this->presentation_title = $a_title;
398 $this->header = $a_title;
403 return $this->header;
408 $this->link_params = $l_params;
418 $this->link_frame = $l_frame;
423 return $this->link_frame;
433 return $this->link_xml;
438 $this->question_xml = $question_xml;
448 return $this->question_xml;
458 $this->target_var = $a_variable;
468 $this->template_output_var = $a_value;
483 $this->sourcecode_download_script = $script_name;
498 $this->locator = $a_locator;
503 $this->tabs_gui = $a_tabs;
508 $this->page_back_title = $a_title;
518 $this->file_download_link = $a_download_link;
528 return $this->file_download_link;
538 $this->fullscreen_link = $a_fullscreen_link;
548 return $this->fullscreen_link;
553 $this->int_link_return = $a_return;
558 $this->change_comments = $a_enabled;
568 $this->notes_enabled = $a_enabled;
569 $this->notes_parent_id = $a_parent_id;
574 return $this->notes_enabled;
584 $this->offline_directory = $offdir;
594 return $this->offline_directory;
606 $this->view_page_link = $a_link;
607 $this->view_page_target = $a_target;
615 return $this->view_page_link;
623 return $this->view_page_target;
633 return $this->lng->txt(
"cont_presentation_view");
638 $this->act_obj = $a_obj;
639 $this->act_meth = $a_meth;
647 public function setEnabledNews($a_enabled, $a_news_obj_id = 0, $a_news_obj_type = 0)
649 $this->enabled_news = $a_enabled;
650 $this->news_obj_id = $a_news_obj_id;
651 $this->news_obj_type = $a_news_obj_type;
661 return $this->enabled_news;
669 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
679 $this->editpreview = $a_editpreview;
699 $this->tabs_enabled = $a_enabledtabs;
719 $this->enabledpagefocus = $a_enabledpagefocus;
729 return $this->enabledpagefocus;
740 $this->exp_frame = $a_exp_frame;
741 $this->exp_id = $a_exp_id;
742 $this->exp_target_script = $a_exp_target_script;
752 $this->prependinghtml = $a_prependinghtml;
762 return $this->prependinghtml;
772 $this->enableediting = $a_enableediting;
792 $this->rawpagecontent = $a_rawpagecontent;
812 $this->styleid = $a_styleid;
822 return $this->styleid;
832 $this->compare_mode = $a_val;
852 $this->abstract_only = $a_val;
872 $this->render_page_container = $a_val;
893 return $this->lng->txt(
"inactive");
910 $a_observer_obj =
null,
911 $a_observer_func =
""
913 $this->use_meta_data =
true;
914 $this->meta_data_rep_obj = $a_rep_obj;
915 $this->meta_data_sub_obj_id = $a_sub_obj_id;
916 $this->meta_data_type =
$a_type;
917 $this->meta_data_observer_obj = $a_observer_obj;
918 $this->meta_data_observer_func = $a_observer_func;
930 $file_download_link = $this->ctrl->getLinkTarget($this,
"downloadFile");
932 return $file_download_link;
944 $fullscreen_link = $this->ctrl->getLinkTarget($this,
"displayMediaFullscreen",
"",
false,
false);
946 return $fullscreen_link;
957 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline") {
958 $l = $this->ctrl->getLinkTarget($this,
"");
970 $pl_names = $this->plugin_admin->getActivePluginsForSlot(
975 foreach ($pl_names as $pl_name) {
976 $plugin = $this->plugin_admin->getPluginObject(
982 if (
$plugin->isValidParentType($this->getPageObject()->getParentType())) {
983 $xml .=
'<ComponentPlugin Name="' .
$plugin->getPluginName() .
989 $xml =
"<ComponentPlugins>" .
$xml .
"</ComponentPlugins>";
1002 $this->ctrl->setReturn($this,
"edit");
1004 $next_class = $this->ctrl->getNextClass($this);
1005 $this->log->debug(
"next_class: " . $next_class);
1006 switch ($next_class) {
1007 case 'ilobjectmetadatagui':
1008 $this->tabs_gui->activateTab(
"meta_data");
1009 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
1010 $md_gui =
new ilObjectMetaDataGUI($this->meta_data_rep_obj, $this->meta_data_type, $this->meta_data_sub_obj_id);
1011 if (is_object($this->meta_data_observer_obj)) {
1012 $md_gui->addMDObserver(
1013 $this->meta_data_observer_obj,
1014 $this->meta_data_observer_func,
1018 $this->ctrl->forwardCommand($md_gui);
1021 case "ileditclipboardgui":
1023 $clip_gui->setPageBackTitle($this->page_back_title);
1024 $ret = $this->ctrl->forwardCommand($clip_gui);
1029 switch (
$_GET[
"notes_mode"]) {
1031 $html = $this->
edit();
1032 $this->tabs_gui->setTabActive(
"edit");
1037 case 'ilpublicuserprofilegui':
1038 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1040 $ret = $this->ctrl->forwardCommand($profile_gui);
1043 case "ilpageeditorgui":
1046 $this->ctrl->redirect($this,
"preview");
1049 $page_editor->setLocator($this->locator);
1050 $page_editor->setHeader($this->
getHeader());
1051 $page_editor->setPageBackTitle($this->page_back_title);
1052 $page_editor->setIntLinkReturn($this->int_link_return);
1054 $ret = $this->ctrl->forwardCommand($page_editor);
1057 case 'ilnewsitemgui':
1058 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
1060 $news_item_gui->setEnableEdit(
true);
1061 $news_item_gui->setContextObjId($this->news_obj_id);
1062 $news_item_gui->setContextObjType($this->news_obj_type);
1063 $news_item_gui->setContextSubObjId($this->obj->getId());
1064 $news_item_gui->setContextSubObjType(
"pg");
1066 $ret = $this->ctrl->forwardCommand($news_item_gui);
1070 $ret = $this->ctrl->forwardCommand($profile_gui);
1073 case "ilpropertyformgui":
1074 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1076 $this->ctrl->forwardCommand($form);
1079 case "ilinternallinkgui":
1080 $this->lng->loadLanguageModule(
"content");
1081 require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
1084 $link_gui->filterLinkType(
"PageObject_FAQ");
1085 $link_gui->filterLinkType(
"GlossaryItem");
1086 $link_gui->filterLinkType(
"Media_Media");
1087 $link_gui->filterLinkType(
"Media_FAQ");
1089 $link_gui->setFilterWhiteList(
true);
1090 $this->ctrl->forwardCommand($link_gui);
1093 case "ilquestioneditgui":
1095 include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionEditGUI.php");
1099 $edit_gui->setSelfAssessmentEditingMode(
true);
1100 $ret = $this->ctrl->forwardCommand($edit_gui);
1101 $this->tpl->setContent(
$ret);
1104 case 'ilassquestionfeedbackeditinggui':
1112 $this->lng->loadLanguageModule(
"assessment");
1115 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
1116 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
1118 $questionGUI->object->setObjId(0);
1119 $questionGUI->object->setSelfAssessmentEditingMode(
true);
1120 $questionGUI->object->setPreventRteUsage($this->
getPageConfig()->getPreventRteUsage());
1123 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1125 $this->ctrl->forwardCommand($gui);
1139 case 'ilLearninghistorygui':
1145 $hist_gui->setUserId($user_id);
1146 $this->ctrl->forwardCommand($hist_gui);
1150 $cmd = $this->ctrl->getCmd(
"preview");
1151 $ret = $this->$cmd();
1166 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
1168 $this->tabs_gui->clearTargets();
1170 $this->tabs_gui->setBackTarget(
1171 $this->lng->txt(
"back"),
1172 $this->ctrl->getLinkTarget($this,
"edit")
1175 $this->ctrl->setParameterByClass(
"ilquestioneditgui",
"q_id",
$_GET[
"q_id"]);
1176 $this->tabs_gui->addTab(
1178 $this->lng->txt(
"question"),
1179 $this->ctrl->getLinkTargetByClass(
"ilquestioneditgui",
"editQuestion")
1182 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1183 $this->ctrl->setParameterByClass(
"ilAssQuestionFeedbackEditingGUI",
"q_id",
$_GET[
"q_id"]);
1184 $this->tabs_gui->addTab(
1186 $this->lng->txt(
"feedback"),
1190 $this->tabs_gui->activateTab($a_active);
1207 $this->ctrl->redirect($this,
"edit");
1216 $this->ctrl->redirect($this,
"edit");
1227 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1233 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1236 $main_tpl->addJavaScript(
"./Services/COPage/js/ilCOPagePres.js");
1239 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
1242 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1249 $this->log->debug(
"ilPageObjectGUI, showPage() in edit mode.");
1252 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1256 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1260 $tpl->setCurrentBlock(
"change_comment");
1261 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1262 $tpl->parseCurrentBlock();
1267 $this->ctrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true)
1271 $sel_media_mode = ($this->
user->getPref(
"ilPageEditor_MediaMode") ==
"disable")
1274 $sel_html_mode = ($this->
user->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
1277 $sel_js_mode =
"disable";
1287 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $this->lng->txt(
"cont_confirm_delete"));
1291 $this->tabs_gui->addNonTabbedLink(
1303 if ($sel_js_mode ==
"enable") {
1304 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1308 $main_tpl->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
1309 $main_tpl->addJavascript(
"Services/COPage/js/page_editing.js");
1311 include_once(
"./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
1313 $this->lng->toJS(
"cont_error");
1314 $this->lng->toJS(
"cont_sel_el_cut_use_paste");
1315 $this->lng->toJS(
"cont_sel_el_copied_use_paste");
1317 include_once
'./Services/Style/Content/classes/class.ilObjStyleSheet.php';
1318 $main_tpl->addOnloadCode(
"var preloader = new Image();
1319 preloader.src = './templates/default/images/loader.svg';
1320 ilCOPage.setUser('" . $this->
user->getLogin() .
"');
1321 ilCOPage.setContentCss('" .
1324 ", ./Services/COPage/css/tiny_extra.css" .
1326 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
1328 $main_tpl->addOnloadCode(
"ilCOPage.addTextFormat('" .
$c .
"');");
1331 $main_tpl->addJavascript(
"./libs/bower/bower_components/tinymce/tinymce.min.js");
1332 $tpl->touchBlock(
"init_dragging");
1339 $cfg->getEnableInternalLinks(),
1340 $cfg->getEnableWikiLinks(),
1341 $cfg->getEnableKeywords(),
1342 $this->getStyleId(),
1345 $cfg->getEnableAnchors(),
1347 $cfg->getEnableUserLinks()
1352 include_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
1353 $tpl->setCurrentBlock(
"int_link_prep");
1355 $this->ctrl->getLinkTargetByClass(
1356 array(
"ilpageeditorgui",
"ilinternallinkgui"),
1363 $tpl->parseCurrentBlock();
1365 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1367 $main_tpl->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
1374 $tpl->setCurrentBlock(
"multi_actions");
1375 if ($sel_js_mode ==
"enable") {
1376 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1377 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1378 $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC",
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
1379 $tpl->setVariable(
"ONCLICK_COPY_SELECTED",
'onclick="return ilEditMultiAction(\'copySelected\');"');
1380 $tpl->setVariable(
"ONCLICK_CUT_SELECTED",
'onclick="return ilEditMultiAction(\'cutSelected\');"');
1381 $tpl->setVariable(
"TXT_SELECT_ALL", $this->lng->txt(
"select_all"));
1382 $tpl->setVariable(
"ONCLICK_SELECT_ALL",
'onclick="return ilEditMultiAction(\'selectAll\');"');
1384 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1385 $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
1386 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1387 $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
1388 $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
1390 $tpl->parseCurrentBlock();
1395 $tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
"Services/COPage");
1397 $tpl->touchBlock(
"page_focus");
1400 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1404 $tpl->touchBlock(
"page_container_1");
1405 $tpl->touchBlock(
"page_container_2");
1406 $tpl->touchBlock(
"page_container_3");
1416 $this->ctrl->setParameter($this,
"history_mode",
"1");
1419 if (is_array($hist_info[
"previous"])) {
1420 $tpl->setCurrentBlock(
"previous_rev");
1421 $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
1422 $this->ctrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1425 $this->ctrl->getLinkTarget($this,
"preview")
1427 $tpl->parseCurrentBlock();
1429 $tpl->setCurrentBlock(
"previous_rev_disabled");
1430 $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
1431 $tpl->parseCurrentBlock();
1435 if ($c_old_nr > 0) {
1436 $tpl->setCurrentBlock(
"next_rev");
1437 $tpl->setVariable(
"TXT_NEXT_REV", $this->lng->txt(
"cont_next_rev"));
1438 $this->ctrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1441 $this->ctrl->getLinkTarget($this,
"preview")
1443 $tpl->parseCurrentBlock();
1446 $tpl->setCurrentBlock(
"latest_rev");
1447 $tpl->setVariable(
"TXT_LATEST_REV", $this->lng->txt(
"cont_latest_rev"));
1448 $this->ctrl->setParameter($this,
"old_nr",
"");
1451 $this->ctrl->getLinkTarget($this,
"preview")
1453 $tpl->parseCurrentBlock();
1456 $this->ctrl->setParameter($this,
"history_mode",
"");
1459 if ($c_old_nr > 0 && $this->
user->getId() != ANONYMOUS_USER_ID) {
1460 $tpl->setCurrentBlock(
"rollback");
1461 $this->ctrl->setParameter($this,
"old_nr", $c_old_nr);
1464 $this->ctrl->getLinkTarget($this,
"rollbackConfirmation")
1466 $this->ctrl->setParameter($this,
"old_nr",
"");
1469 $this->lng->txt(
"cont_rollback")
1471 $tpl->parseCurrentBlock();
1475 $tpl->setCurrentBlock(
"hist_nav");
1476 $tpl->setVariable(
"TXT_REVISION", $this->lng->txt(
"cont_revision"));
1478 "VAL_REVISION_DATE",
1485 $tpl->parseCurrentBlock();
1492 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1498 $this->obj->getParentType() .
":pg",
1499 $this->obj->getId(),
1500 $this->obj->getLanguage()
1502 $mob_links = array();
1503 foreach ($links as $link) {
1504 if ($link[
"type"] ==
"mob") {
1512 if (count($mob_links) > 0) {
1513 $tpl->setCurrentBlock(
"med_link");
1514 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1519 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1520 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1522 $tpl->parseCurrentBlock();
1526 include_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
1531 if (count($snippets) > 0) {
1532 foreach ($snippets as $s) {
1533 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1536 $tpl->setCurrentBlock(
"med_link");
1537 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1542 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1543 $tpl->parseCurrentBlock();
1550 $tpl->setCurrentBlock(
"activation_txt");
1551 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $this->lng->txt(
"cont_scheduled_activation"));
1570 $tpl->parseCurrentBlock();
1574 if (
$_GET[
"reloadTree"] ==
"y") {
1575 $tpl->setCurrentBlock(
"reload_tree");
1578 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer",
"",
false,
false)
1580 $tpl->parseCurrentBlock();
1584 $builded = $this->obj->buildDom();
1590 if (!$this->obj->checkPCIds()) {
1591 $this->obj->insertPCIds();
1592 $this->obj->update(
true,
true);
1595 $this->obj->addFileSizes();
1596 $this->obj->addHierIDs();
1598 $hids = $this->obj->getHierIds();
1599 $row1_ids = $this->obj->getFirstRowIds();
1600 $col1_ids = $this->obj->getFirstColumnIds();
1601 $litem_ids = $this->obj->getListItemIds();
1602 $fitem_ids = $this->obj->getFileItemIds();
1605 $hids = $this->obj->getHierIds();
1606 foreach ($hids as $hid) {
1607 $tpl->setCurrentBlock(
"add_dhtml");
1608 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_" . $hid);
1609 $tpl->parseCurrentBlock();
1613 foreach ($col1_ids as $hid) {
1614 $tpl->setCurrentBlock(
"add_dhtml");
1615 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r" . $hid);
1616 $tpl->parseCurrentBlock();
1620 foreach ($row1_ids as $hid) {
1621 $tpl->setCurrentBlock(
"add_dhtml");
1622 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c" . $hid);
1623 $tpl->parseCurrentBlock();
1627 foreach ($litem_ids as $hid) {
1628 $tpl->setCurrentBlock(
"add_dhtml");
1629 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i" . $hid);
1630 $tpl->parseCurrentBlock();
1634 foreach ($fitem_ids as $hid) {
1635 $tpl->setCurrentBlock(
"add_dhtml");
1636 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i" . $hid);
1637 $tpl->parseCurrentBlock();
1640 $this->obj->addFileSizes();
1647 if (!$this->link_xml_set) {
1658 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1660 $template_xml = $style->getTemplateXML();
1661 $disable_auto_margins =
"n";
1662 if ($style->lookupStyleSetting(
"disable_auto_margins")) {
1663 $disable_auto_margins =
"y";
1669 $content =
"<dummy><PageObject><PageContent><Paragraph>" .
1670 $this->obj->getFirstParagraphText() . $link_xml .
1671 "</Paragraph></PageContent></PageObject></dummy>";
1673 $content = $this->obj->getXMLFromDom(
1682 if ($builded !==
true) {
1703 $enlarge_path =
"images/enlarge.svg";
1707 ?
"ilc_PrintPageTitle"
1712 $enable_split_new = ($this->obj->getParentType() ==
"lm")
1718 if (($this->obj->getParentType() ==
"lm") &&
1720 $this->obj->getParentId(),
1723 $enable_split_next =
"y";
1725 $enable_split_next =
"n";
1734 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1749 ? $this->
user->getPref(
"ilPageEditor_MediaMode")
1752 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1756 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1764 $current_ts = time();
1765 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1768 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1769 $params = array(
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title, ENT_QUOTES,
"UTF-8"),
1770 'enable_placeholder' => $cfg->getEnablePCType(
"PlaceHolder") ?
"y" :
"n",
1771 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1772 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1773 'img_col' => $col_path,
1774 'img_row' => $row_path,
1775 'img_cell' => $cell_path,
1776 'img_item' => $item_path,
1777 'compare_mode' => $this->getCompareMode() ?
"y" :
"n",
1778 'enable_split_new' => $enable_split_new,
1779 'enable_split_next' => $enable_split_next,
1780 'link_params' => $this->link_params,
1781 'file_download_link' => $file_download_link,
1782 'fullscreen_link' => $fullscreen_link,
1783 'img_path' => $img_path,
1784 'parent_id' => $this->obj->getParentId(),
1785 'download_script' => $this->sourcecode_download_script,
1786 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1787 'enable_rep_objects' => $cfg->getEnablePCType(
"Resources") ?
"y" :
"n",
1788 'enable_login_page' => $cfg->getEnablePCType(
"LoginPageElement") ?
"y" :
"n",
1790 'enable_tabs' => $cfg->getEnablePCType(
"Tabs") ?
"y" :
"n",
1791 'enable_sa_qst' => $cfg->getEnableSelfAssessment() ?
"y" :
"n",
1792 'enable_file_list' => $cfg->getEnablePCType(
"FileList") ?
"y" :
"n",
1793 'enable_content_includes' => $cfg->getEnablePCType(
"ContentInclude") ?
"y" :
"n",
1794 'enable_content_templates' => (count($this->
getPageObject()->getContentTemplates()) > 0) ?
"y" :
"n",
1795 'paste' => $paste ?
"y" :
"n",
1796 'media_mode' => $media_mode,
1797 'javascript' => $sel_js_mode,
1798 'paragraph_plugins' => $paragraph_plugin_string,
1799 'disable_auto_margins' => $disable_auto_margins,
1800 'page_toc' => $cfg->getEnablePageToc() ?
"y" :
"n",
1801 'enable_profile' => $cfg->getEnablePCType(
"Profile") ?
"y" :
"n",
1802 'enable_verification' => $cfg->getEnablePCType(
"Verification") ?
"y" :
"n",
1803 'enable_blog' => $cfg->getEnablePCType(
"Blog") ?
"y" :
"n",
1804 'enable_skills' => $cfg->getEnablePCType(
"Skills") ?
"y" :
"n",
1805 'enable_learning_history' => $cfg->getEnablePCType(
"LearningHistory") ?
"y" :
"n",
1806 'enable_qover' => $cfg->getEnablePCType(
"QuestionOverview") ?
"y" :
"n",
1807 'enable_consultation_hours' => $cfg->getEnablePCType(
"ConsultationHours") ?
"y" :
"n",
1808 'enable_my_courses' => $cfg->getEnablePCType(
"MyCourses") ?
"y" :
"n",
1809 'enable_amd_page_list' => $cfg->getEnablePCType(
"AMDPageList") ?
"y" :
"n",
1810 'current_ts' => $current_ts,
1812 'flv_video_player' => $flv_video_player,
1813 'page_perma_link' => $this->getPagePermaLink()
1815 if ($this->link_frame !=
"") {
1816 $params[
"pg_frame"] = $this->link_frame;
1824 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1828 include_once(
"./Services/COPage/classes/class.ilPCSection.php");
1832 $md5 = md5(serialize($params) . $link_xml . $template_xml . $md5_adds);
1842 $md5 == $this->obj->getRenderMd5() &&
1843 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1844 $this->obj->getRenderedTime() !=
"" &&
1845 $this->obj->old_nr == 0) {
1847 $output = $this->obj->getRenderedContent();
1849 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1850 $this->log->debug(
"Calling XSLT, content: " . substr($content, 0, 100));
1852 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1854 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args, $params);
1855 }
catch (Exception
$e) {
1858 $output =
"<pre>".$e->getMessage().
"<br>".htmlentities($content).
"</pre>";
1864 && $this->obj->old_nr == 0) {
1865 $this->obj->writeRenderedContent($output, $md5);
1873 $this->
user->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
1874 && !$this->getPageConfig()->getPreventHTMLUnmasking()) {
1875 $output = str_replace(
"<",
"<", $output);
1876 $output = str_replace(
">",
">", $output);
1878 $output = str_replace(
"&",
"&", $output);
1880 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
1903 $output = str_replace(
"\n",
"", $output);
1910 $output =
'<div class="il_editarea_disabled"><div class="ilCopgDisabledText">' . $this->
getDisabledText() .
'</div>' . $output .
'</div>';
1914 include_once(
"./Services/COPage/classes/class.ilCOPagePCDef.php");
1916 foreach ($defs as $def) {
1918 $pc_class = $def[
"pc_class"];
1935 if ($this->ctrl->isAsynch() && !$this->getRawPageContent() &&
1936 $this->getOutputMode() ==
"edit") {
1938 if (
$_GET[
"updated_pc_id_str"] !=
"") {
1939 echo
$_GET[
"updated_pc_id_str"];
1942 $tpl->setCurrentBlock(
"edit_page");
1943 $tpl->parseCurrentBlock();
1944 echo
$tpl->get(
"edit_page");
1971 while (is_int($start = strpos($output,
"<!--ParStart-->")) &&
1972 is_int($end = strpos($output,
"<!--ParEnd-->", $start))) {
1973 $output = substr($output, 0, $start) .
1976 array(
"{",
"}"),
1977 substr($output, $start + 15, $end - ($start + 15))
1979 substr($output, $end + 13);
1993 return array(
"deactivatePage" => $this->lng->txt(
"cont_deactivate_page"),
1994 "activatePage" => $this->lng->txt(
"cont_activate_page"));
2000 public function addActionsMenu($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
2007 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2011 $list->setListTitle($this->lng->txt(
"actions"));
2012 $list->setId(
"copage_act");
2020 $captions[
"deactivatePage"],
2022 $this->ctrl->getLinkTarget($this,
"deactivatePage")
2026 $captions[
"activatePage"],
2028 $this->ctrl->getLinkTarget($this,
"activatePage")
2032 $a_tpl->setVariable(
"PAGE_ACTIONS", $list->getHTML());
2039 $this->lng->txt(
"cont_initial_attached_content"),
2041 $this->ctrl->getLinkTarget($this,
"initialOpenedContent")
2051 $items = $list->getItems();
2052 if (count($items) > 1) {
2053 $a_tpl->setVariable(
"PAGE_ACTIONS", $list->getHTML());
2054 } elseif (count($items) == 1) {
2055 $b =
$ui->factory()->button()->standard($items[0][
"title"], $items[0][
"link"]);
2056 $a_tpl->setVariable(
"PAGE_ACTIONS",
$ui->renderer()->render(
$b));
2060 $this->lng->loadLanguageModule(
"content");
2062 $list->setListTitle($this->lng->txt(
"cont_edit_mode"));
2063 $list->setId(
"copage_ed_mode");
2066 if ($sel_media_mode ==
"enable") {
2067 $this->ctrl->setParameter($this,
"media_mode",
"disable");
2069 $this->lng->txt(
"cont_deactivate_media"),
2071 $this->ctrl->getLinkTarget($this,
"setEditMode")
2074 $this->ctrl->setParameter($this,
"media_mode",
"enable");
2076 $this->lng->txt(
"cont_activate_media"),
2078 $this->ctrl->getLinkTarget($this,
"setEditMode")
2081 $this->ctrl->setParameter($this,
"media_mode",
"");
2085 if ($sel_html_mode ==
"enable") {
2086 $this->ctrl->setParameter($this,
"html_mode",
"disable");
2088 $this->lng->txt(
"cont_deactivate_html"),
2090 $this->ctrl->getLinkTarget($this,
"setEditMode")
2093 $this->ctrl->setParameter($this,
"html_mode",
"enable");
2095 $this->lng->txt(
"cont_activate_html"),
2097 $this->ctrl->getLinkTarget($this,
"setEditMode")
2101 $this->ctrl->setParameter($this,
"html_mode",
"");
2104 if ($sel_js_mode ==
"enable") {
2105 $this->ctrl->setParameter($this,
"js_mode",
"disable");
2107 $this->lng->txt(
"cont_deactivate_js"),
2109 $this->ctrl->getLinkTarget($this,
"setEditMode")
2112 $this->ctrl->setParameter($this,
"js_mode",
"enable");
2114 $this->lng->txt(
"cont_activate_js"),
2116 $this->ctrl->getLinkTarget($this,
"setEditMode")
2119 $this->ctrl->setParameter($this,
"js_mode",
"");
2121 $a_tpl->setVariable(
"EDIT_MODE", $list->getHTML());
2137 if ($cfg->getMultiLangSupport()) {
2142 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
2145 if (!$ot->getContentActivated()) {
2154 $this->lng->loadLanguageModule(
"meta");
2157 $l = $ot->getMasterLanguage();
2159 $this->lng->txt(
"cont_edit_language_version") .
": " .
2160 $this->lng->txt(
"meta_l_" . $l),
2162 $this->ctrl->getLinkTarget($this,
"editMasterLanguage")
2166 foreach ($ot->getLanguages() as $al =>
$lang) {
2168 $al != $ot->getMasterLanguage()) {
2169 $this->ctrl->setParameter($this,
"totransl", $al);
2171 $this->lng->txt(
"cont_edit_language_version") .
": " .
2172 $this->lng->txt(
"meta_l_" . $al),
2174 $this->ctrl->getLinkTarget($this,
"switchToLanguage")
2176 $this->ctrl->setParameter($this,
"totransl",
$_GET[
"totransl"]);
2186 include_once(
"./Services/COPage/classes/class.ilPageMultiLangGUI.php");
2191 $a_tpl->setVariable(
"MULTI_LANG_INFO", $ml_gui->getMultiLangInfo($this->getPageObject()->getLanguage()));
2206 if (
$_GET[
"media_mode"] !=
"") {
2207 if (
$_GET[
"media_mode"] ==
"disable") {
2208 $this->
user->writePref(
"ilPageEditor_MediaMode",
"disable");
2210 $this->
user->writePref(
"ilPageEditor_MediaMode",
"");
2213 if (
$_GET[
"html_mode"] !=
"") {
2214 if (
$_GET[
"html_mode"] ==
"disable") {
2215 $this->
user->writePref(
"ilPageEditor_HTMLMode",
"disable");
2217 $this->
user->writePref(
"ilPageEditor_HTMLMode",
"");
2220 if (
$_GET[
"js_mode"] !=
"") {
2221 if (
$_GET[
"js_mode"] ==
"disable") {
2222 $this->
user->writePref(
"ilPageEditor_JavaScript",
"disable");
2224 $this->
user->writePref(
"ilPageEditor_JavaScript",
"");
2228 $this->ctrl->redirect($this,
"edit");
2237 $a_int_links =
false,
2238 $a_wiki_links =
false,
2239 $a_keywords =
false,
2241 $a_paragraph_styles =
true,
2242 $a_save_return =
true,
2245 $a_user_links =
false
2254 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
2256 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
2258 $btpl =
new ilTemplate(
"tpl.tiny_menu.html",
true,
true,
"Services/COPage");
2266 $btpl->touchBlock(
"blist_button");
2269 $lng->txt(
"cont_blist"),
2274 $btpl->touchBlock(
"nlist_button");
2277 $lng->txt(
"cont_nlist"),
2282 $btpl->touchBlock(
"list_indent");
2285 $lng->txt(
"cont_list_indent"),
2290 $btpl->touchBlock(
"list_outdent");
2293 $lng->txt(
"cont_list_outdent"),
2298 $btpl->touchBlock(
"bb_ilink_button");
2300 "iosEditInternalLinkTrigger",
2301 $lng->txt(
"cont_link_to_internal"),
2307 $lng->txt(
"cont_link_to_external"),
2311 if ($a_user_links) {
2312 $btpl->touchBlock(
"bb_ulink_button");
2316 $btpl->touchBlock(
"rformat_button");
2319 $lng->txt(
"cont_remove_format"),
2323 if ($a_paragraph_styles) {
2325 $btpl->setCurrentBlock(
"new_par");
2326 $btpl->setVariable(
"IMG_NEWPAR",
"+");
2327 $btpl->parseCurrentBlock();
2330 $lng->txt(
"cont_insert_new_paragraph"),
2334 $btpl->setCurrentBlock(
"par_edit");
2335 $btpl->setVariable(
"TXT_PAR_FORMAT",
$lng->txt(
"cont_par_format"));
2336 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2344 "ilAdvSelListAnchorText_style_selection",
2345 $lng->txt(
"cont_paragraph_styles"),
2349 $btpl->parseCurrentBlock();
2353 $btpl->setCurrentBlock(
"bb_kw_button");
2354 $btpl->setVariable(
"CC_KW",
"kw");
2355 $btpl->parseCurrentBlock();
2358 $lng->txt(
"cont_text_keyword"),
2363 if ($a_wiki_links) {
2364 $btpl->setCurrentBlock(
"bb_wikilink_button2");
2365 $btpl->setVariable(
"TXT_WIKI_BUTTON2",
$lng->txt(
"obj_wiki"));
2366 $btpl->setVariable(
"WIKI_BUTTON2_URL",
$ctrl->getLinkTargetByClass(
"ilwikipagegui",
""));
2367 $btpl->parseCurrentBlock();
2370 $lng->txt(
"cont_wiki_link_dialog"),
2374 $btpl->setCurrentBlock(
"bb_wikilink_button");
2375 $btpl->setVariable(
"TXT_WLN2",
$lng->txt(
"obj_wiki"));
2376 $btpl->parseCurrentBlock();
2379 $lng->txt(
"cont_link_to_wiki"),
2386 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
2389 if (in_array(
$c, array(
"com",
"quot",
"acc",
"code"))) {
2398 if ($aset->get(
"use_physical")) {
2399 $cc_code = str_replace(array(
"str",
"emp",
"imp"), array(
"B",
"I",
"U"), $cc_code);
2403 $btpl->setCurrentBlock(
"bb_" .
$c .
"_button");
2404 $btpl->setVariable(
"CC_" . strtoupper(
$c), $cc_code);
2405 $btpl->parseCurrentBlock();
2408 $lng->txt(
"cont_cc_" .
$c),
2420 $lng->txt(
"cont_tex"),
2426 $lng->txt(
"cont_fn"),
2430 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2433 $split_button->isPrimary(
true);
2434 $split_button_items = [];
2438 $sdd->setPullRight(
false);
2439 $sdd->setListTitle(
$lng->txt(
"save") .
"...");
2441 if ($a_save_return) {
2445 $sdd->addItem(
$lng->txt(
"save_return"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdSaveReturn(false); return false;");
2448 $item->setCaption(
'save_return');
2449 $item->setOnClick(
"ilCOPage.cmdSaveReturn(false); return false;");
2450 $split_button_items[] = $item;
2457 $sdd->addItem(
$lng->txt(
"save_new"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdSaveReturn(true); return false;");
2459 $item->setCaption(
'save_new');
2460 $item->setOnClick(
"ilCOPage.cmdSaveReturn(true); return false;");
2461 $split_button_items[] = $item;
2464 $sdd->addItem(
$lng->txt(
"save"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdSave(null); return false;");
2466 $item->setCaption(
'save');
2467 $item->setOnClick(
"ilCOPage.cmdSave(null); return false;");
2468 $split_button_items[] = $item;
2470 $sdd->addItem(
$lng->txt(
"cancel"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdCancel(); return false;");
2479 $btpl->setCurrentBlock(
"bb_anc_button");
2480 $btpl->setVariable(
"CC_ANC",
"anc");
2481 $btpl->parseCurrentBlock();
2484 $lng->txt(
"cont_anchor"),
2490 foreach ($split_button_items as $item) {
2492 $item->setPrimary(
true);
2493 $split_button->setDefaultButton($item);
2499 $btpl->setVariable(
"SPLIT_BUTTON", $split_button->render());
2509 $btpl->setVariable(
"TXT_SAVE",
$lng->txt(
"save"));
2510 $btpl->setVariable(
"TXT_CANCEL",
$lng->txt(
"cancel"));
2512 $btpl->setVariable(
"TXT_CHAR_FORMAT",
$lng->txt(
"cont_char_format"));
2513 $btpl->setVariable(
"TXT_LISTS",
$lng->txt(
"cont_lists"));
2514 $btpl->setVariable(
"TXT_LINKS",
$lng->txt(
"cont_links"));
2515 $btpl->setVariable(
"TXT_MORE_FUNCTIONS",
$lng->txt(
"cont_more_functions"));
2516 $btpl->setVariable(
"TXT_SAVING",
$lng->txt(
"cont_saving"));
2518 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2522 "ilAdvSelListAnchorElement_char_style_selection",
2523 $lng->txt(
"cont_more_character_styles"),
2527 return $btpl->get();
2536 $this->page_linker->setOffline($this->
getOutputMode() == self::OFFLINE);
2537 $this->setLinkXML($this->page_linker->getLinkXml($this->getPageObject()->getInternalLinks()));
2547 $this->link_xml =
$xml;
2548 $this->link_xml_set =
true;
2557 if ($this->profile_back_url !=
"") {
2563 return $this->ctrl->getLinkTargetByClass(strtolower(get_class($this)),
"preview");
2571 $this->profile_back_url =
$url;
2580 $download_ok =
false;
2582 require_once(
"./Modules/File/classes/class.ilObjFile.php");
2584 $pg_obj->buildDom();
2585 $int_links = $pg_obj->getInternalLinks();
2586 foreach ($int_links as $il) {
2587 if ($il[
"Target"] == str_replace(
"_file_",
"_dfile_",
$_GET[
"file_id"])) {
2588 $file = explode(
"_",
$_GET[
"file_id"]);
2589 $file_id = (int) $file[count($file) - 1];
2590 $download_ok =
true;
2593 if (in_array(
$_GET[
"file_id"], $pg_obj->getAllFileObjIds())) {
2594 $file = explode(
"_",
$_GET[
"file_id"]);
2595 $file_id = (int) $file[count($file) - 1];
2596 $download_ok =
true;
2600 foreach ($pcs as $pc) {
2602 $file = explode(
"_",
$_GET[
"file_id"]);
2603 $file_id = (int) $file[count($file) - 1];
2604 if (in_array($file_id, $files)) {
2605 $download_ok =
true;
2610 $fileObj =
new ilObjFile($file_id,
false);
2611 $fileObj->sendFile();
2632 $tpl->setCurrentBlock(
"ilMedia");
2638 $link_xml = $this->page_linker->getLinkXML($med_links);
2640 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2642 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2644 $pg_obj->buildDom();
2646 if (!empty(
$_GET[
"pg_id"])) {
2648 $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2660 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2661 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
2665 if ($a_fullscreen) {
2666 $mode =
"fullscreen";
2673 $params = array(
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2674 'link_params' =>
"ref_id=" .
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
2675 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
2676 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args, $params);
2682 require_once(
'./Services/Style/Content/classes/class.ilObjStyleSheet.php');
2684 "LOCATION_CONTENT_STYLESHEET",
2688 $tpl->setVariable(
"MEDIA_CONTENT", $output);
2691 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
2693 $tpl->fillJavaScriptFiles();
2694 $tpl->fillCssFiles();
2706 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
2717 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2721 $page_heads = array();
2722 foreach ($offsets as $os) {
2723 $level = (int) substr($a_output, $os + 10, 1);
2724 if (in_array($level, array(1,2,3))) {
2725 $anchor = str_replace(
2728 substr($a_output, $os, strpos($a_output,
"<", $os) - $os - 4)
2732 $tag_start = stripos($a_output,
"<h" . $level .
" ", $os);
2733 $tag_end = stripos($a_output,
"</h" . $level .
">", $tag_start);
2734 $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2737 $text_start = stripos($head,
">") + 1;
2738 $text_end = strripos($head,
"<!--", $text_start);
2739 $text = substr($head, $text_start, $text_end - $text_start);
2740 $page_heads[] = array(
"level" => $level,
"text" => $text,
2741 "anchor" => $anchor);
2745 if (count($page_heads) > 1) {
2746 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
2748 $list->setAutoNumbering(
true);
2749 $list->setListClass(
"ilc_page_toc_PageTOCList");
2750 $list->setItemClass(
"ilc_page_toc_PageTOCItem");
2758 foreach ($page_heads as $ind => $h) {
2764 if ($h[
"level"] == 2 && $c_par[1] > 0) {
2767 if ($h[
"level"] == 3 && $c_par[2] > 0) {
2771 $h[
"text"] = str_replace(
"<!--PageTocPH-->",
"", $h[
"text"]);
2775 "<a href='#" . $h[
"anchor"] .
"' class='ilc_page_toc_PageTOCLink'>" . $h[
"text"] .
"</a>",
2781 if ($h[
"level"] == 1) {
2785 if ($h[
"level"] == 2) {
2791 "tpl.page_toc.html",
2796 $tpl->setVariable(
"PAGE_TOC", $list->getHTML());
2797 $tpl->setVariable(
"TXT_PAGE_TOC", $this->lng->txt(
"cont_page_toc"));
2798 $tpl->setVariable(
"TXT_HIDE", $this->lng->txt(
"hide"));
2799 $tpl->setVariable(
"TXT_SHOW", $this->lng->txt(
"show"));
2801 $a_output = str_replace(
2802 "{{{{{PageTOC}}}}}",
2806 $numbers = $list->getNumbers();
2808 if (count($numbers) > 0) {
2809 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2810 foreach ($numbers as
$n) {
2816 $a_output = str_replace(
2817 "{{{{{PageTOC}}}}}",
2838 include_once(
"./Services/COPage/classes/class.ilPCResourcesGUI.php");
2855 $a_output = str_replace(
2856 "{{{{{LV_show_adv}}}}}",
2857 $this->lng->txt(
"cont_show_adv"),
2860 $a_output = str_replace(
2861 "{{{{{LV_hide_adv}}}}}",
2862 $this->lng->txt(
"cont_hide_adv"),
2866 $a_output = str_replace(
2867 "{{{{{LV_show_adv}}}}}",
2871 $a_output = str_replace(
2872 "{{{{{LV_hide_adv}}}}}",
2917 $this->ctrl->redirect($this,
"preview");
2924 if ($ptype ==
"cont" &&
$_GET[
"ref_id"] > 0) {
2927 $this->
help->setScreenId(
"edit_" . $ptype);
2929 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
2931 $this->
user->isAnonymous() &&
2932 !$this->user->isCaptchaVerified() &&
2933 ilCaptchaUtil::isActiveForWiki()
2936 if (
$_POST[
'captcha_code'] && $form->checkInput()) {
2937 $this->
user->setCaptchaVerified(
true);
2939 return $form->getHTML();
2945 include_once(
"./Services/User/classes/class.ilUserUtil.php");
2946 $info = $this->lng->txt(
"content_no_edit_lock");
2948 $info .=
"</br>" . $this->lng->txt(
"content_until") .
": " .
2950 $info .=
"</br>" . $this->lng->txt(
"obj_usr") .
": " .
2952 if (!$this->ctrl->isAsynch()) {
2960 if ($this->
getPageObject()->getEffectiveEditLockTime() > 0) {
2973 return $mess . $html;
2987 $info = $this->lng->txt(
"cont_got_lock_release");
2990 $mbox =
$ui->factory()->messageBox()->info($info)
2991 ->withButtons([
$ui->factory()->button()->standard(
$lng->txt(
"cont_finish_editing"),
$ctrl->getLinkTarget($this,
"releasePageLock"))]);
2993 return $ui->renderer()->render($mbox);
3007 if (
$_GET[
"pl_hier_id"] ==
"") {
3008 $this->obj->buildDom();
3009 $this->obj->addHierIDs();
3010 $hid = $this->obj->getHierIdsForPCIds(array(
$_GET[
"pl_pc_id"]));
3011 $_GET[
"pl_hier_id"] = $hid[
$_GET[
"pl_pc_id"]];
3016 $html = $this->
edit();
3018 $tpl->addOnLoadCode(
"ilCOPage.insertJSAtPlaceholder('" .
3019 $_GET[
"pl_hier_id"] .
":" .
$_GET[
"pl_pc_id"] .
3030 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
3033 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
3034 $ci =
new ilCaptchaInputGUI($this->lng->txt(
'cont_captcha_code'),
'captcha_code');
3035 $ci->setRequired(
true);
3036 $form->addItem($ci);
3038 $form->addCommandButton(
'edit', $this->lng->txt(
'ok'));
3040 $form->setTitle($this->lng->txt(
'cont_captcha_verification'));
3041 $form->setFormAction($this->ctrl->getFormAction($this));
3067 $this->tpl =
new ilGlobalTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
3068 $this->tpl->setCurrentBlock(
"ContentStyle");
3069 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
3070 $this->tpl->parseCurrentBlock();
3074 $this->tpl->setCurrentBlock(
"ilMedia");
3076 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3078 if (!empty(
$_GET[
"pg_id"])) {
3079 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
3081 $pg_obj->buildDom();
3086 $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
3098 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
3099 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
3106 $mode =
"fullscreen";
3107 $params = array(
'mode' => $mode,
'webspace_path' => $wb_path);
3108 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args, $params);
3113 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
3123 if (is_array($a_error)) {
3124 $error_str =
"<b>Error(s):</b><br>";
3125 foreach ($a_error as $error) {
3126 $err_mess = implode(
" - ", $error);
3127 if (!is_int(strpos($err_mess,
":0:"))) {
3128 $error_str .= htmlentities($err_mess) .
"<br />";
3131 $this->tpl->setVariable(
"MESSAGE", $error_str);
3144 $this->tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
3146 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
3148 $table_gui->setId(
"hist_table");
3155 'sortkey' => 999999,
3157 $table_gui->setData($entries);
3158 return $table_gui->getHTML();
3170 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3174 $this->ctrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
3175 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"rollback"));
3176 $c_gui->setHeaderText($this->lng->txt(
"cont_rollback_confirmation"));
3177 $c_gui->setCancel($this->lng->txt(
"cancel"),
"history");
3178 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"rollback");
3180 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
3188 $this->tpl->setContent($c_gui->getHTML());
3200 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
3202 if ($hentry[
"content"] !=
"") {
3203 $this->obj->setXMLContent($hentry[
"content"]);
3204 $this->obj->buildDom(
true);
3205 if ($this->obj->update()) {
3206 $this->ctrl->redirect($this,
"history");
3209 $this->ctrl->redirect($this,
"history");
3220 $this->
help->setScreenIdComponent(
"copg");
3237 $this->tabs_gui->addTarget(
"pg", $this->ctrl->getLinkTarget($this,
"preview"), array(
"",
"preview"));
3240 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this,
"edit"), array(
"",
"edit"));
3244 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this,
"edit"), array(
"",
"edit"));
3247 $this->tabs_gui->addTarget(
"cont_preview", $this->ctrl->getLinkTarget($this,
"preview"), array(
"",
"preview"));
3253 if ($this->use_meta_data) {
3254 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
3256 $this->meta_data_rep_obj,
3257 $this->meta_data_type,
3258 $this->meta_data_sub_obj_id
3260 $mdtab = $mdgui->getTab();
3262 $this->tabs_gui->addTarget(
3266 "ilobjectmetadatagui"
3274 $this->tabs_gui->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history"),
"history", get_class($this));
3275 if (
$_GET[
"history_mode"] ==
"1" || $this->ctrl->getCmd() ==
"compareVersion") {
3276 $this->tabs_gui->activateTab(
"history");
3288 $this->tabs_gui->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(array(get_class($this),
"ilEditClipboardGUI"),
"view"),
"view",
"ilEditClipboardGUI");
3291 if ($this->
getPageConfig()->getEnableScheduledActivation()) {
3292 $this->tabs_gui->addTarget(
3294 $this->ctrl->getLinkTarget($this,
"editActivation"),
3301 $this->tabs_gui->addTarget(
3303 $this->ctrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
3310 if (is_array($this->tab_hook)) {
3311 $func = $this->tab_hook[
"func"];
3312 $this->tab_hook[
"obj"]->$func();
3326 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
3327 $compare = $this->obj->compareVersion((
int)
$_POST[
"left"], (
int)
$_POST[
"right"]);
3330 $lpage = $compare[
"l_page"];
3332 $cfg->setPreventHTMLUnmasking(
true);
3341 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
3342 $tpl->setVariable(
"LEFT", $lhtml);
3345 $rpage = $compare[
"r_page"];
3353 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
3354 $tpl->setVariable(
"RIGHT", $rhtml);
3356 $tpl->setVariable(
"TXT_NEW", $this->lng->txt(
"cont_pc_new"));
3357 $tpl->setVariable(
"TXT_MODIFIED", $this->lng->txt(
"cont_pc_modified"));
3358 $tpl->setVariable(
"TXT_DELETED", $this->lng->txt(
"cont_pc_deleted"));
3368 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
3369 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
3370 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
3371 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
3381 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
3384 $atpl->setVariable(
"FORM", $this->form->getHTML());
3385 $atpl->setCurrentBlock(
"updater");
3386 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
3387 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
3388 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
3389 $atpl->parseCurrentBlock();
3390 $this->tpl->setContent($atpl->get());
3398 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3400 $this->form->setFormAction($this->ctrl->getFormAction($this));
3401 $this->form->setTitle($this->lng->txt(
"cont_page_activation"));
3405 $rad_op1 =
new ilRadioOption($this->lng->txt(
"cont_activated"),
"activated");
3407 $rad->addOption($rad_op1);
3408 $rad_op2 =
new ilRadioOption($this->lng->txt(
"cont_deactivated"),
"deactivated");
3409 $rad->addOption($rad_op2);
3410 $rad_op3 =
new ilRadioOption($this->lng->txt(
"cont_scheduled_activation"),
"scheduled");
3413 $dt_prop->setRequired(
true);
3414 $dt_prop->setShowTime(
true);
3415 $rad_op3->addSubItem($dt_prop);
3417 $dt_prop2->setRequired(
true);
3418 $dt_prop2->setShowTime(
true);
3419 $rad_op3->addSubItem($dt_prop2);
3422 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_show_activation_info"),
"show_activation_info");
3423 $cb->setInfo($this->lng->txt(
"cont_show_activation_info_info"));
3424 $rad_op3->addSubItem($cb);
3427 $rad->addOption($rad_op3);
3429 $this->form->addCommandButton(
"saveActivation", $this->lng->txt(
"save"));
3431 $this->form->addItem($rad);
3444 $dt_prop = $this->form->getItemByPostVar(
"start");
3452 $dt_prop = $this->form->getItemByPostVar(
"end");
3461 $this->form->getItemByPostVar(
"activation")->setValue(
$activation);
3462 $this->form->getItemByPostVar(
"show_activation_info")->setChecked($this->
getPageObject()->getShowActivationInfo());
3472 if ($this->form->checkInput()) {
3477 if (
$_POST[
"activation"] ==
"deactivated") {
3480 if (
$_POST[
"activation"] ==
"scheduled") {
3483 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME)
3490 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
3491 $this->ctrl->redirect($this,
"editActivation");
3493 $this->form->setValuesByPost();
3494 $this->tpl->setContent($this->form->getHTML());
3506 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)
3508 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
3511 if (!$a_content_object) {
3513 $this->notes_parent_id,
3514 (
int) $this->obj->getId(),
3518 $a_enable_private_notes =
true;
3519 $a_enable_public_notes =
true;
3520 $a_enable_notes_deletion =
false;
3525 $a_content_object->getParentId(),
3526 $a_content_object->getId(),
3527 $a_content_object->getParentType()
3531 if ($a_enable_private_notes) {
3532 $notes_gui->enablePrivateNotes();
3534 if ($a_enable_public_notes) {
3535 $notes_gui->enablePublicNotes();
3536 if ((
bool) $a_enable_notes_deletion) {
3537 $notes_gui->enablePublicNotesDeletion(
true);
3542 $notes_gui->addObserver($a_callback);
3545 $next_class = $this->ctrl->getNextClass($this);
3546 if ($next_class ==
"ilnotegui") {
3547 $html = $this->ctrl->forwardCommand($notes_gui);
3549 $html = $notes_gui->getNotesHTML();
3559 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
3582 $this->tabs_gui->activateTab(
"edit");
3585 $this->tpl->setContent($form->getHTML());
3596 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3600 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
3601 $ac =
new ilLinkInputGUI($this->lng->txt(
'cont_resource'),
'opened_content');
3603 $ac->setInternalLinkDefault(
"Media_Media", 0);
3604 $ac->setInternalLinkFilterTypes(array(
"PageObject_FAQ",
"GlossaryItem",
"Media_Media",
"Media_FAQ"));
3605 $val = $this->obj->getInitialOpenedContent();
3606 if ($val[
"id"] !=
"" && $val[
"type"] !=
"") {
3607 $ac->setValue($val[
"type"] .
"|" . $val[
"id"] .
"|" . $val[
"target"]);
3610 $form->addItem($ac);
3612 $form->addCommandButton(
"saveInitialOpenedContent", $this->lng->txt(
"save"));
3613 $form->addCommandButton(
"edit", $this->lng->txt(
"cancel"));
3614 $form->setTitle($this->lng->txt(
"cont_initial_attached_content"));
3615 $form->setFormAction($this->ctrl->getFormAction($this));
3628 $this->obj->saveInitialOpenedContent(
3634 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"));
3635 $this->ctrl->redirect($this,
"edit");
3654 $this->ctrl->setParameter($this,
"transl",
$_GET[
"totransl"]);
3655 $this->ctrl->redirect($this,
"edit");
3664 $this->ctrl->setParameter($this,
"totransl", $l);
3665 $this->lng->loadLanguageModule(
"meta");
3667 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
3669 $cgui->setFormAction($this->ctrl->getFormAction($this));
3670 $cgui->setHeaderText($this->lng->txt(
"cont_page_translation_does_not_exist") .
": " .
3671 $this->lng->txt(
"meta_l_" . $l));
3672 $cgui->setCancel($this->lng->txt(
"cancel"),
"editMasterLanguage");
3673 $cgui->setConfirm($this->lng->txt(
"confirm"),
"createPageTranslation");
3674 $this->tpl->setContent($cgui->getHTML());
3682 $this->ctrl->setParameter($this,
"transl",
"");
3683 $this->ctrl->redirect($this,
"edit");
3693 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
3700 $p->copyPageToTranslation($l);
3701 $this->ctrl->setParameter($this,
"transl", $l);
3702 $this->ctrl->redirect($this,
"edit");
3711 ilUtil::sendSuccess($this->lng->txt(
"cont_page_lock_released"),
true);
3712 $this->ctrl->redirect($this,
"preview");
3741 foreach ($collector->getJavascriptFiles() as $js) {
3742 $tpl->addJavascript($js);
3745 foreach ($collector->getCssFiles() as $css) {
3749 foreach ($collector->getOnloadCode() as $code) {
3750 $tpl->addOnloadCode($code);
An exception for terminatinating execution or to throw for unit testing.
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 addJavaScript(ilGlobalTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
static addCss()
Add required css.
User interface class for advanced drop-down selection lists.
const CMD_SHOW
command constants
special template class to simplify handling of ITX/PEAR
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, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
Class ilEditClipboardGUI.
special template class to simplify handling of ITX/PEAR
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)
Learning history main GUI class.
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(ilGlobalTemplateInterface $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, $add_token=true)
get content style path
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
static getInstance($a_obj_id)
Get instance.
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 _lookupOwner($a_id)
lookup object owner
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.
setLinkXml($xml)
Set linkXML.
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.
setOutputMode($a_mode=self::PRESENTATION)
Set Output Mode.
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.
setPageLinker($page_linker)
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.
addResourcesToTemplate(ilGlobalTemplateInterface $tpl)
Add resources to template.
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.
setStyleId($a_styleid)
Set Style Id.
getOfflineDirectory()
get offline directory
rollbackConfirmation()
Rollback confirmation.
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.
setProfileBackUrl($url)
Get profile back url.
setTemplateTargetVar($a_variable)
getActivationCaptions()
Get captions for activation action menu entries.
presentation($a_mode=self::PRESENTATION)
initActivationForm()
Init activation form.
getBlockingInfoMessage()
Get block info message.
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.
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 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 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 getSystemMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initPanel($a_resize=false, ilGlobalTemplateInterface $a_main_tpl=null)
Init yui panel.
static initDragDrop(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Drag and Drop.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
if(strpos( $jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting