152 $a_prevent_get_id =
false,
159 $this->tpl =
$DIC->ui()->mainTemplate();
160 $this->ctrl =
$DIC->ctrl();
161 $this->lng =
$DIC->language();
162 $this->tabs_gui =
$DIC->tabs();
163 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
164 $this->access =
$DIC->access();
165 $this->
user = $DIC->user();
166 $this->
help = $DIC[
"ilHelp"];
167 $this->
ui = $DIC->ui();
168 $this->toolbar =
$DIC->toolbar();
169 $this->concrete_lang = $concrete_lang;
173 if ($a_old_nr == 0 && !$a_prevent_get_id &&
$_GET[
"old_nr"] > 0) {
174 $a_old_nr =
$_GET[
"old_nr"];
178 if ($a_lang ==
"" &&
$_GET[
"transl"] !=
"") {
193 $this->page_linker =
new ilPageLinker(get_class($this));
195 $this->output2template =
true;
196 $this->question_xml =
"";
197 $this->question_html =
"";
199 $this->template_output_var =
"PAGE_CONTENT";
200 $this->change_comments =
false;
201 $this->page_back_title = $this->lng->txt(
"page");
202 $this->lng->loadLanguageModule(
"content");
203 $this->lng->loadLanguageModule(
"copg");
205 $this->tool_context =
$DIC->globalScreen()->tool()->context();
209 $this->ctrl->saveParameter($this,
"transl");
227 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
234 $page->setConcreteLang($this->concrete_lang);
245 $this->parent_type = $a_val;
285 $this->old_nr = $a_val;
295 return $this->old_nr;
319 return $this->language;
349 $this->page_config = $a_val;
369 $this->obj = $a_pg_obj;
389 $this->output_mode = $a_mode;
399 $this->output2template = $a_output;
409 $this->presentation_title = $a_title;
419 $this->header = $a_title;
424 return $this->header;
429 $this->link_params = $l_params;
439 $this->link_frame = $l_frame;
444 return $this->link_frame;
454 return $this->link_xml;
459 $this->question_xml = $question_xml;
469 return $this->question_xml;
479 $this->target_var = $a_variable;
489 $this->template_output_var = $a_value;
504 $this->sourcecode_download_script = $script_name;
519 $this->locator = $a_locator;
524 $this->tabs_gui = $a_tabs;
529 $this->page_back_title = $a_title;
539 $this->file_download_link = $a_download_link;
549 return $this->file_download_link;
559 $this->fullscreen_link = $a_fullscreen_link;
569 return $this->fullscreen_link;
574 $this->int_link_return = $a_return;
579 $this->change_comments = $a_enabled;
589 $this->notes_enabled = $a_enabled;
590 $this->notes_parent_id = $a_parent_id;
595 return $this->notes_enabled;
605 $this->offline_directory = $offdir;
615 return $this->offline_directory;
627 $this->view_page_link = $a_link;
628 $this->view_page_target = $a_target;
636 return $this->view_page_link;
644 return $this->view_page_target;
654 return $this->lng->txt(
"cont_presentation_view");
659 $this->act_obj = $a_obj;
660 $this->act_meth = $a_meth;
668 public function setEnabledNews($a_enabled, $a_news_obj_id = 0, $a_news_obj_type = 0)
670 $this->enabled_news = $a_enabled;
671 $this->news_obj_id = $a_news_obj_id;
672 $this->news_obj_type = $a_news_obj_type;
682 return $this->enabled_news;
690 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
700 $this->editpreview = $a_editpreview;
720 $this->tabs_enabled = $a_enabledtabs;
740 $this->enabledpagefocus = $a_enabledpagefocus;
749 $this->open_place_holder = $a_val;
769 return $this->enabledpagefocus;
780 $this->exp_frame = $a_exp_frame;
781 $this->exp_id = $a_exp_id;
782 $this->exp_target_script = $a_exp_target_script;
792 $this->prependinghtml = $a_prependinghtml;
802 return $this->prependinghtml;
812 $this->enableediting = $a_enableediting;
832 $this->rawpagecontent = $a_rawpagecontent;
852 $this->styleid = $a_styleid;
862 return $this->styleid;
872 $this->compare_mode = $a_val;
892 $this->abstract_only = $a_val;
893 $this->abstract_pcid = $pcid;
913 $this->render_page_container = $a_val;
934 return $this->lng->txt(
"inactive");
944 $this->enabled_href = $enable;
960 $a_observer_obj =
null,
961 $a_observer_func =
""
963 $this->use_meta_data =
true;
964 $this->meta_data_rep_obj = $a_rep_obj;
965 $this->meta_data_sub_obj_id = $a_sub_obj_id;
966 $this->meta_data_type = $a_type;
967 $this->meta_data_observer_obj = $a_observer_obj;
968 $this->meta_data_observer_func = $a_observer_func;
980 $file_download_link = $this->ctrl->getLinkTarget($this,
"downloadFile");
982 return $file_download_link;
994 $fullscreen_link = $this->ctrl->getLinkTarget($this,
"displayMediaFullscreen",
"",
false,
false);
996 return $fullscreen_link;
1007 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline") {
1008 $l = $this->ctrl->getLinkTarget($this,
"");
1020 $pl_names = $this->plugin_admin->getActivePluginsForSlot(
1025 foreach ($pl_names as $pl_name) {
1026 $plugin = $this->plugin_admin->getPluginObject(
1032 if (
$plugin->isValidParentType($this->getPageObject()->getParentType())) {
1033 $xml .=
'<ComponentPlugin Name="' .
$plugin->getPluginName() .
1039 $xml =
"<ComponentPlugins>" .
$xml .
"</ComponentPlugins>";
1050 $this->ctrl->setReturn($this,
"edit");
1052 $next_class = $this->ctrl->getNextClass($this);
1053 $this->log->debug(
"next_class: " . $next_class);
1055 if ($next_class ==
"" && $this->ctrl->getCmd() ==
"edit") {
1056 $this->tabs_gui->clearTargets();
1062 switch ($next_class) {
1063 case 'ilobjectmetadatagui':
1064 $this->tabs_gui->activateTab(
"meta_data");
1065 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
1066 $md_gui =
new ilObjectMetaDataGUI($this->meta_data_rep_obj, $this->meta_data_type, $this->meta_data_sub_obj_id);
1067 if (is_object($this->meta_data_observer_obj)) {
1068 $md_gui->addMDObserver(
1069 $this->meta_data_observer_obj,
1070 $this->meta_data_observer_func,
1074 $this->ctrl->forwardCommand($md_gui);
1077 case "ileditclipboardgui":
1080 $clip_gui->setPageBackTitle($this->page_back_title);
1081 $ret = $this->ctrl->forwardCommand($clip_gui);
1086 switch (
$_GET[
"notes_mode"]) {
1088 $html = $this->
edit();
1089 $this->tabs_gui->setTabActive(
"edit");
1094 case 'ilpublicuserprofilegui':
1095 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1097 $ret = $this->ctrl->forwardCommand($profile_gui);
1100 case "ilpageeditorgui":
1105 $this->ctrl->redirect($this,
"preview");
1108 $page_editor->setLocator($this->locator);
1109 $page_editor->setHeader($this->
getHeader());
1110 $page_editor->setPageBackTitle($this->page_back_title);
1111 $page_editor->setIntLinkReturn($this->int_link_return);
1113 $ret = $this->ctrl->forwardCommand($page_editor);
1116 case 'ilnewsitemgui':
1117 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
1119 $news_item_gui->setEnableEdit(
true);
1120 $news_item_gui->setContextObjId($this->news_obj_id);
1121 $news_item_gui->setContextObjType($this->news_obj_type);
1122 $news_item_gui->setContextSubObjId($this->obj->getId());
1123 $news_item_gui->setContextSubObjType(
"pg");
1125 $ret = $this->ctrl->forwardCommand($news_item_gui);
1129 $ret = $this->ctrl->forwardCommand($profile_gui);
1132 case "ilpropertyformgui":
1133 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1135 $this->ctrl->forwardCommand($form);
1138 case "ilinternallinkgui":
1139 $this->lng->loadLanguageModule(
"content");
1140 require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
1143 $link_gui->filterLinkType(
"PageObject_FAQ");
1144 $link_gui->filterLinkType(
"GlossaryItem");
1145 $link_gui->filterLinkType(
"Media_Media");
1146 $link_gui->filterLinkType(
"Media_FAQ");
1148 $link_gui->setFilterWhiteList(
true);
1149 $this->ctrl->forwardCommand($link_gui);
1152 case "ilquestioneditgui":
1154 include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionEditGUI.php");
1158 $edit_gui->setSelfAssessmentEditingMode(
true);
1159 $ret = $this->ctrl->forwardCommand($edit_gui);
1160 $this->tpl->setContent(
$ret);
1163 case 'ilassquestionfeedbackeditinggui':
1171 $this->lng->loadLanguageModule(
"assessment");
1174 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
1175 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
1177 $questionGUI->object->setObjId(0);
1178 $questionGUI->object->setSelfAssessmentEditingMode(
true);
1179 $questionGUI->object->setPreventRteUsage($this->
getPageConfig()->getPreventRteUsage());
1182 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1184 $this->ctrl->forwardCommand($gui);
1198 case 'ilLearninghistorygui':
1204 $hist_gui->setUserId($user_id);
1205 $this->ctrl->forwardCommand($hist_gui);
1209 $cmd = $this->ctrl->getCmd(
"preview");
1212 $this->tabs_gui->addNonTabbedLink(
1219 $ret = $this->$cmd();
1220 if ($this->
getOutputMode() == self::PREVIEW && $cmd ==
"preview") {
1238 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
1240 $this->tabs_gui->clearTargets();
1242 $this->tabs_gui->setBackTarget(
1243 $this->lng->txt(
"back"),
1244 $this->ctrl->getLinkTarget($this,
"edit")
1247 $this->ctrl->setParameterByClass(
"ilquestioneditgui",
"q_id",
$_GET[
"q_id"]);
1248 $this->tabs_gui->addTab(
1250 $this->lng->txt(
"question"),
1251 $this->ctrl->getLinkTargetByClass(
"ilquestioneditgui",
"editQuestion")
1254 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1255 $this->ctrl->setParameterByClass(
"ilAssQuestionFeedbackEditingGUI",
"q_id",
$_GET[
"q_id"]);
1256 $this->tabs_gui->addTab(
1258 $this->lng->txt(
"feedback"),
1262 $this->tabs_gui->activateTab($a_active);
1279 $this->ctrl->redirect($this,
"edit");
1288 $this->ctrl->redirect($this,
"edit");
1299 $b =
$ui->factory()->button()->standard(
1300 $lng->txt(
"edit_page"),
1301 $this->ctrl->getLinkTarget($this,
"edit")
1303 $this->toolbar->addComponent(
$b);
1315 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1320 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1323 $main_tpl->addJavaScript(
"./Services/COPage/js/ilCOPagePres.js");
1326 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
1329 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1343 $this->log->debug(
"ilPageObjectGUI, showPage() in edit mode.");
1346 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1350 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1354 $tpl->setCurrentBlock(
"change_comment");
1355 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1356 $tpl->parseCurrentBlock();
1360 $tpl->setVariable(
"PAGE_CONTAINER_CLASS",
"ilc_page_cont_PageContainer");
1365 $this->ctrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true)
1372 $sel_js_mode =
"enable";
1376 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $this->lng->txt(
"cont_confirm_delete"));
1380 if ($sel_js_mode ==
"enable") {
1383 include_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
1384 $tpl->setCurrentBlock(
"int_link_prep");
1386 $this->ctrl->getLinkTargetByClass(
1387 array(
"ilpageeditorgui",
"ilinternallinkgui"),
1394 $tpl->parseCurrentBlock();
1396 $editor_init = new \ILIAS\COPage\Editor\UI\Init();
1402 $tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
"Services/COPage");
1404 $tpl->touchBlock(
"page_focus");
1407 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1411 $tpl->touchBlock(
"page_container_1");
1412 $tpl->touchBlock(
"page_container_2");
1413 $tpl->touchBlock(
"page_container_3");
1423 $this->ctrl->setParameter($this,
"history_mode",
"1");
1426 if (is_array($hist_info[
"previous"])) {
1427 $tpl->setCurrentBlock(
"previous_rev");
1428 $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
1429 $this->ctrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1432 $this->ctrl->getLinkTarget($this,
"preview")
1434 $tpl->parseCurrentBlock();
1436 $tpl->setCurrentBlock(
"previous_rev_disabled");
1437 $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
1438 $tpl->parseCurrentBlock();
1442 if ($c_old_nr > 0) {
1443 $tpl->setCurrentBlock(
"next_rev");
1444 $tpl->setVariable(
"TXT_NEXT_REV", $this->lng->txt(
"cont_next_rev"));
1445 $this->ctrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1448 $this->ctrl->getLinkTarget($this,
"preview")
1450 $tpl->parseCurrentBlock();
1453 $tpl->setCurrentBlock(
"latest_rev");
1454 $tpl->setVariable(
"TXT_LATEST_REV", $this->lng->txt(
"cont_latest_rev"));
1455 $this->ctrl->setParameter($this,
"old_nr",
"");
1458 $this->ctrl->getLinkTarget($this,
"preview")
1460 $tpl->parseCurrentBlock();
1463 $this->ctrl->setParameter($this,
"history_mode",
"");
1467 $tpl->setCurrentBlock(
"rollback");
1468 $this->ctrl->setParameter($this,
"old_nr", $c_old_nr);
1471 $this->ctrl->getLinkTarget($this,
"rollbackConfirmation")
1473 $this->ctrl->setParameter($this,
"old_nr",
"");
1476 $this->lng->txt(
"cont_rollback")
1478 $tpl->parseCurrentBlock();
1482 $tpl->setCurrentBlock(
"hist_nav");
1483 $tpl->setVariable(
"TXT_REVISION", $this->lng->txt(
"cont_revision"));
1485 "VAL_REVISION_DATE",
1492 $tpl->parseCurrentBlock();
1499 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1505 $this->obj->getParentType() .
":pg",
1506 $this->obj->getId(),
1507 $this->obj->getLanguage()
1509 $mob_links = array();
1510 foreach ($links as $link) {
1511 if ($link[
"type"] ==
"mob") {
1519 if (count($mob_links) > 0) {
1520 $tpl->setCurrentBlock(
"med_link");
1521 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1526 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1527 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1529 $tpl->parseCurrentBlock();
1533 include_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
1539 if (count($snippets) > 0) {
1540 foreach ($snippets as $s) {
1541 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1544 $tpl->setCurrentBlock(
"med_link");
1545 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1550 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1551 $tpl->parseCurrentBlock();
1558 $tpl->setCurrentBlock(
"activation_txt");
1559 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $this->lng->txt(
"cont_scheduled_activation"));
1578 $tpl->parseCurrentBlock();
1582 if (
$_GET[
"reloadTree"] ==
"y") {
1583 $tpl->setCurrentBlock(
"reload_tree");
1586 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer",
"",
false,
false)
1588 $tpl->parseCurrentBlock();
1592 $builded = $this->obj->buildDom();
1598 if (!$this->obj->checkPCIds()) {
1599 $this->obj->insertPCIds();
1600 $this->obj->update(
true,
true);
1603 $this->obj->addFileSizes();
1604 $this->obj->addHierIDs();
1606 $hids = $this->obj->getHierIds();
1607 $row1_ids = $this->obj->getFirstRowIds();
1608 $col1_ids = $this->obj->getFirstColumnIds();
1609 $litem_ids = $this->obj->getListItemIds();
1610 $fitem_ids = $this->obj->getFileItemIds();
1613 $hids = $this->obj->getHierIds();
1614 foreach ($hids as $hid) {
1615 $tpl->setCurrentBlock(
"add_dhtml");
1616 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_" . $hid);
1617 $tpl->parseCurrentBlock();
1621 foreach ($col1_ids as $hid) {
1622 $tpl->setCurrentBlock(
"add_dhtml");
1623 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r" . $hid);
1624 $tpl->parseCurrentBlock();
1628 foreach ($row1_ids as $hid) {
1629 $tpl->setCurrentBlock(
"add_dhtml");
1630 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c" . $hid);
1631 $tpl->parseCurrentBlock();
1635 foreach ($litem_ids as $hid) {
1636 $tpl->setCurrentBlock(
"add_dhtml");
1637 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i" . $hid);
1638 $tpl->parseCurrentBlock();
1642 foreach ($fitem_ids as $hid) {
1643 $tpl->setCurrentBlock(
"add_dhtml");
1644 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i" . $hid);
1645 $tpl->parseCurrentBlock();
1648 $this->obj->addFileSizes();
1655 if (!$this->link_xml_set) {
1666 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1668 $template_xml = $style->getTemplateXML();
1669 $disable_auto_margins =
"n";
1670 if ($style->lookupStyleSetting(
"disable_auto_margins")) {
1671 $disable_auto_margins =
"y";
1676 $append_footnotes =
"y";
1678 if (!$this->abstract_pcid) {
1679 $content =
"<dummy><PageObject><PageContent><Paragraph>" .
1680 $this->obj->getFirstParagraphText() . $link_xml .
1681 "</Paragraph></PageContent></PageObject></dummy>";
1683 $append_footnotes =
"n";
1684 $par = $this->obj->getParagraphForPCID($this->abstract_pcid);
1685 $content =
"<dummy><PageObject><PageContent><Paragraph Characteristic='" . $par->getCharacteristic() .
"'>" .
1686 $par->getText() . $link_xml .
1687 "</Paragraph></PageContent></PageObject>" . $this->obj->getMultimediaXML() .
"</dummy>";
1690 $content = $this->obj->getXMLFromDom(
1701 if ($builded !==
true) {
1722 $enlarge_path =
"images/enlarge.svg";
1726 ?
"ilc_PrintPageTitle"
1731 $enable_split_new = ($this->obj->getParentType() ==
"lm")
1737 if (($this->obj->getParentType() ==
"lm") &&
1739 $this->obj->getParentId(),
1742 $enable_split_next =
"y";
1744 $enable_split_next =
"n";
1753 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1768 ? $this->
user->getPref(
"ilPageEditor_MediaMode")
1771 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1775 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1783 $current_ts = time();
1784 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1788 $enable_href =
false;
1792 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1793 $params = array(
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title, ENT_QUOTES,
"UTF-8"),
1794 'enable_placeholder' => $cfg->getEnablePCType(
"PlaceHolder") ?
"y" :
"n",
1795 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1796 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1797 'img_col' => $col_path,
1798 'img_row' => $row_path,
1799 'img_cell' => $cell_path,
1800 'img_item' => $item_path,
1801 'acc_save_url' =>
"./ilias.php?baseClass=ilaccordionpropertiesstorage&cmd=setOpenedTab" .
1802 "&user_id=" . $this->user->getId(),
1803 'append_footnotes' => $append_footnotes,
1804 'compare_mode' => $this->getCompareMode() ?
"y" :
"n",
1805 'enable_split_new' => $enable_split_new,
1806 'enable_split_next' => $enable_split_next,
1807 'link_params' => $this->link_params,
1808 'file_download_link' => $file_download_link,
1809 'fullscreen_link' => $fullscreen_link,
1810 'img_path' => $img_path,
1811 'parent_id' => $this->obj->getParentId(),
1812 'download_script' => $this->sourcecode_download_script,
1813 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1814 'enable_rep_objects' => $cfg->getEnablePCType(
"Resources") ?
"y" :
"n",
1815 'enable_login_page' => $cfg->getEnablePCType(
"LoginPageElement") ?
"y" :
"n",
1817 'enable_tabs' => $cfg->getEnablePCType(
"Tabs") ?
"y" :
"n",
1818 'enable_sa_qst' => $cfg->getEnableSelfAssessment() ?
"y" :
"n",
1819 'enable_file_list' => $cfg->getEnablePCType(
"FileList") ?
"y" :
"n",
1820 'enable_content_includes' => $cfg->getEnablePCType(
"ContentInclude") ?
"y" :
"n",
1821 'enable_content_templates' => (count($this->
getPageObject()->getContentTemplates()) > 0) ?
"y" :
"n",
1822 'paste' => $paste ?
"y" :
"n",
1823 'media_mode' => $media_mode,
1824 'javascript' => $sel_js_mode,
1825 'paragraph_plugins' => $paragraph_plugin_string,
1826 'disable_auto_margins' => $disable_auto_margins,
1827 'page_toc' => $cfg->getEnablePageToc() ?
"y" :
"n",
1828 'enable_profile' => $cfg->getEnablePCType(
"Profile") ?
"y" :
"n",
1829 'enable_verification' => $cfg->getEnablePCType(
"Verification") ?
"y" :
"n",
1830 'enable_blog' => $cfg->getEnablePCType(
"Blog") ?
"y" :
"n",
1831 'enable_skills' => $cfg->getEnablePCType(
"Skills") ?
"y" :
"n",
1832 'enable_learning_history' => $cfg->getEnablePCType(
"LearningHistory") ?
"y" :
"n",
1833 'enable_qover' => $cfg->getEnablePCType(
"QuestionOverview") ?
"y" :
"n",
1834 'enable_consultation_hours' => $cfg->getEnablePCType(
"ConsultationHours") ?
"y" :
"n",
1835 'enable_my_courses' => $cfg->getEnablePCType(
"MyCourses") ?
"y" :
"n",
1836 'enable_amd_page_list' => $cfg->getEnablePCType(
"AMDPageList") ?
"y" :
"n",
1837 'current_ts' => $current_ts,
1839 'flv_video_player' => $flv_video_player,
1840 'page_perma_link' => $this->getPagePermaLink(),
1841 'enable_href' => $enable_href
1843 if ($this->link_frame !=
"") {
1844 $params[
"pg_frame"] = $this->link_frame;
1852 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1856 include_once(
"./Services/COPage/classes/class.ilPCSection.php");
1859 $md5 = md5(serialize($params) . $link_xml . $template_xml . $md5_adds);
1869 $md5 == $this->obj->getRenderMd5() &&
1870 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1871 $this->obj->getRenderedTime() !=
"" &&
1872 $this->obj->old_nr == 0) {
1874 $output = $this->obj->getRenderedContent();
1876 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1877 $this->log->debug(
"Calling XSLT, content: " . substr($content, 0, 100));
1879 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1881 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args, $params);
1882 }
catch (Exception
$e) {
1885 $output =
"<pre>" .
$e->getMessage() .
"<br>" . htmlentities($content) .
"</pre>";
1891 && $this->obj->old_nr == 0) {
1892 $this->obj->writeRenderedContent($output, $md5);
1900 $this->
user->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
1901 && !$this->getPageConfig()->getPreventHTMLUnmasking()) {
1902 $output = str_replace(
"<",
"<", $output);
1903 $output = str_replace(
">",
">", $output);
1905 $output = str_replace(
"&",
"&", $output);
1907 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
1930 $output = str_replace(
"\n",
"", $output);
1937 $output =
'<div class="copg-disabled-page"><div class="ilCopgDisabledText">' . $this->
getDisabledText() .
'</div>' . $output .
'</div>';
1941 include_once(
"./Services/COPage/classes/class.ilCOPagePCDef.php");
1943 foreach ($defs as $def) {
1945 $pc_class = $def[
"pc_class"];
1962 if ($this->ctrl->isAsynch() && !$this->getRawPageContent() &&
1963 $this->getOutputMode() ==
"edit") {
1965 if (
$_GET[
"updated_pc_id_str"] !=
"") {
1966 echo
$_GET[
"updated_pc_id_str"];
1969 $tpl->setCurrentBlock(
"edit_page");
1970 $tpl->parseCurrentBlock();
1971 echo
$tpl->get(
"edit_page");
1998 while (is_int($start = strpos($output,
"<!--ParStart-->")) &&
1999 is_int($end = strpos($output,
"<!--ParEnd-->", $start))) {
2000 $output = substr($output, 0, $start) .
2003 array(
"{",
"}"),
2004 substr($output, $start + 15, $end - ($start + 15))
2006 substr($output, $end + 13);
2020 return array(
"deactivatePage" => $this->lng->txt(
"cont_deactivate_page"),
2021 "activatePage" => $this->lng->txt(
"cont_activate_page"));
2029 if (
$_GET[
"media_mode"] !=
"") {
2030 if (
$_GET[
"media_mode"] ==
"disable") {
2031 $this->
user->writePref(
"ilPageEditor_MediaMode",
"disable");
2033 $this->
user->writePref(
"ilPageEditor_MediaMode",
"");
2036 if (
$_GET[
"html_mode"] !=
"") {
2037 if (
$_GET[
"html_mode"] ==
"disable") {
2038 $this->
user->writePref(
"ilPageEditor_HTMLMode",
"disable");
2040 $this->
user->writePref(
"ilPageEditor_HTMLMode",
"");
2043 if (
$_GET[
"js_mode"] !=
"") {
2044 if (
$_GET[
"js_mode"] ==
"disable") {
2045 $this->
user->writePref(
"ilPageEditor_JavaScript",
"disable");
2047 $this->
user->writePref(
"ilPageEditor_JavaScript",
"");
2051 $this->ctrl->redirect($this,
"edit");
2060 $a_int_links =
false,
2061 $a_wiki_links =
false,
2062 $a_keywords =
false,
2064 $a_paragraph_styles =
true,
2065 $a_save_return =
true,
2068 $a_user_links =
false,
2069 \
ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper =
null
2081 "Comment" => array(
"code" =>
"com",
"txt" =>
$lng->txt(
"cont_char_style_com")),
2082 "Quotation" => array(
"code" =>
"quot",
"txt" =>
$lng->txt(
"cont_char_style_quot")),
2083 "Accent" => array(
"code" =>
"acc",
"txt" =>
$lng->txt(
"cont_char_style_acc")),
2084 "Code" => array(
"code" =>
"code",
"txt" =>
$lng->txt(
"cont_char_style_code"))
2087 if (!isset($chars[
$c])) {
2088 $chars[
$c] = array(
"code" =>
"",
"txt" =>
$c);
2092 foreach ($chars as $key => $char) {
2095 "active_" . $char[
"code"],
2101 case "Code": $tag =
"code";
break;
2103 $html =
'<' . $tag .
' class="ilc_' . $t .
'_' . $key .
'" style="font-size:90%; margin-top:2px; margin-bottom:2px; position:static;">' . $char[
"txt"] .
"</" . $tag .
">";
2104 $char_formats[] = [
"text" => $html,
"action" =>
"selection.format",
"data" => [
"format" => $key]];
2109 $numbered_list =
'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"></path></svg>';
2111 $bullet_list =
'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"></path></svg>';
2113 $indent =
'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"></path></svg>';
2115 $outdent =
'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"></path></svg>';
2121 if ($aset->get(
"use_physical")) {
2127 foreach ([
"str",
"emp",
"imp",
"sup",
"sub"] as
$c) {
2135 $c_formats[] = [
"text" =>
'<span class="ilc_text_inline_Strong">' . $str .
'</span>',
2136 "action" =>
"selection.format",
2137 "data" => [
"format" =>
"Strong"]
2141 $c_formats[] = [
"text" =>
'<span class="ilc_text_inline_Emph">' . $emp .
'</span>',
2142 "action" =>
"selection.format",
2143 "data" => [
"format" =>
"Emph"]
2147 $c_formats[] = [
"text" =>
'<span class="ilc_text_inline_Important">' . $imp .
'</span>',
2148 "action" =>
"selection.format",
2149 "data" => [
"format" =>
"Important"]
2153 $c_formats[] = [
"text" =>
'x<sup>2</sup>',
2154 "action" =>
"selection.format",
2155 "data" => [
"format" =>
"Sup"]
2159 $c_formats[] = [
"text" =>
'x<sub>2</sub>',
2160 "action" =>
"selection.format",
2161 "data" => [
"format" =>
"Sub"]
2167 $c_formats[] = [
"text" =>
"<i>A</i>",
2168 "action" => $char_formats
2170 $c_formats[] = [
"text" =>
'<i><b><u>T</u></b><sub>x</sub></i>',
2171 "action" =>
"selection.removeFormat",
2175 "cont_char_format" => $c_formats,
2177 [
"text" => $bullet_list,
"action" =>
"list.bullet",
"data" => []],
2178 [
"text" => $numbered_list,
"action" =>
"list.number",
"data" => []],
2179 [
"text" => $outdent,
"action" =>
"list.outdent",
"data" => []],
2180 [
"text" => $indent,
"action" =>
"list.indent",
"data" => []]
2188 if ($a_wiki_links) {
2189 $links[] = [
"text" =>
$lng->txt(
"cont_wiki_link_dialog"),
"action" =>
"link.wikiSelection",
"data" => [
2190 "url" =>
$ctrl->getLinkTargetByClass(
"ilwikipagegui",
"")]];
2191 $links[] = [
"text" =>
"[[" .
$lng->txt(
"cont_wiki_page") .
"]]",
"action" =>
"link.wiki",
"data" => []];
2194 $links[] = [
"text" =>
$lng->txt(
"cont_text_iln_link"),
"action" =>
"link.internal",
"data" => []];
2201 $links[] = [
"text" =>
$lng->txt(
"cont_text_xln"),
"action" =>
"link.external",
"data" => []];
2203 if ($a_user_links) {
2204 $links[] = [
"text" =>
$lng->txt(
"cont_link_user"),
"action" =>
"link.user",
"data" => []];
2209 $menu[
"cont_more_functions"] = [];
2210 $menu[
"cont_more_functions"][] = [
"text" =>
$lng->txt(
"cont_link") .
'<i class="mce-ico mce-i-link"></i>',
"action" => $links];
2213 $menu[
"cont_more_functions"][] = [
"text" =>
$lng->txt(
"cont_keyword"),
"action" =>
"selection.keyword",
"data" => []];
2222 $menu[
"cont_more_functions"][] = [
"text" =>
'Tex',
"action" =>
"selection.tex",
"data" => []];
2230 $menu[
"cont_more_functions"][] = [
"text" =>
$lng->txt(
"cont_footnote"),
"action" =>
"selection.fn",
"data" => []];
2233 $menu[
"cont_more_functions"][] = [
"text" =>
$lng->txt(
"cont_anchor"),
"action" =>
"selection.anchor",
"data" => []];
2236 $btpl =
new ilTemplate(
"tpl.tiny_menu.html",
true,
true,
"Services/COPage");
2238 foreach ($menu as $section_title =>
$section) {
2240 if (is_array($item[
"action"])) {
2242 foreach ($item[
"action"] as
$i) {
2243 $buttons[] = $ui_wrapper->getButton(
$i[
"text"],
"par-action",
$i[
"action"],
$i[
"data"]);
2245 $dd =
$ui->factory()->dropdown()->standard($buttons)->withLabel($item[
"text"]);
2246 $btpl->setCurrentBlock(
"button");
2247 $btpl->setVariable(
"BUTTON",
$ui->renderer()->renderAsync($dd));
2248 $btpl->parseCurrentBlock();
2250 $b = $ui_wrapper->getRenderedButton($item[
"text"],
"par-action", $item[
"action"], $item[
"data"]);
2251 $btpl->setCurrentBlock(
"button");
2252 $btpl->setVariable(
"BUTTON",
$b);
2253 $btpl->parseCurrentBlock();
2256 $btpl->setCurrentBlock(
"section");
2257 $btpl->setVariable(
"TXT_SECTION",
$lng->txt($section_title));
2258 $btpl->parseCurrentBlock();
2262 if ($a_paragraph_styles) {
2263 $sel = new \ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector($ui_wrapper, $a_style_id);
2264 $dd = $sel->getStyleSelector(
"");
2265 $btpl->setCurrentBlock(
"par_edit");
2266 $btpl->setVariable(
"TXT_PAR_FORMAT",
$lng->txt(
"cont_par_format"));
2268 $btpl->setVariable(
"STYLE_SELECTOR",
$ui->renderer()->render($dd));
2270 $btpl->parseCurrentBlock();
2274 $sel = new \ILIAS\COPage\Editor\Components\Section\SectionStyleSelector($ui_wrapper, $a_style_id);
2275 $dd = $sel->getStyleSelector(
"",
$type =
"par-action", $action =
"sec.class", $attr =
"class",
true);
2276 $btpl->setVariable(
"TXT_BLOCK",
$lng->txt(
"cont_sur_block_format"));
2277 $btpl->setVariable(
"BLOCK_STYLE_SELECTOR",
$ui->renderer()->render($dd));
2280 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2284 $ui_wrapper->getRenderedButton(
$lng->txt(
"save_return"),
"par-action",
"save.return")
2289 $ui_wrapper->getRenderedButton(
$lng->txt(
"cancel"),
"par-action",
"component.cancel")
2292 $btpl->setVariable(
"TXT_SAVING",
$lng->txt(
"cont_saving"));
2296 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2300 "ilAdvSelListAnchorElement_char_style_selection",
2301 $lng->txt(
"cont_more_character_styles"),
2305 return $btpl->get();
2314 $this->page_linker->setOffline($this->
getOutputMode() == self::OFFLINE);
2315 $this->setLinkXML($this->page_linker->getLinkXml($this->getPageObject()->getInternalLinks()));
2325 $this->link_xml =
$xml;
2326 $this->link_xml_set =
true;
2335 if ($this->profile_back_url !=
"") {
2341 return $this->ctrl->getLinkTargetByClass(strtolower(get_class($this)),
"preview");
2349 $this->profile_back_url =
$url;
2358 $download_ok =
false;
2360 require_once(
"./Modules/File/classes/class.ilObjFile.php");
2362 $pg_obj->buildDom();
2363 $int_links = $pg_obj->getInternalLinks();
2364 foreach ($int_links as $il) {
2365 if ($il[
"Target"] == str_replace(
"_file_",
"_dfile_",
$_GET[
"file_id"])) {
2366 $file = explode(
"_",
$_GET[
"file_id"]);
2367 $file_id = (int) $file[count($file) - 1];
2368 $download_ok =
true;
2371 if (in_array(
$_GET[
"file_id"], $pg_obj->getAllFileObjIds())) {
2372 $file = explode(
"_",
$_GET[
"file_id"]);
2373 $file_id = (int) $file[count($file) - 1];
2374 $download_ok =
true;
2378 foreach ($pcs as $pc) {
2379 $files = ilObjFile::_getFilesOfObject(
"mep:pg", $pc[
"id"], 0);
2380 $file = explode(
"_",
$_GET[
"file_id"]);
2381 $file_id = (int) $file[count($file) - 1];
2382 if (in_array($file_id, $files)) {
2383 $download_ok =
true;
2388 $fileObj =
new ilObjFile($file_id,
false);
2389 $fileObj->sendFile();
2410 $tpl->setCurrentBlock(
"ilMedia");
2416 $link_xml = $this->page_linker->getLinkXML($med_links);
2418 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2420 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2421 if (
$_GET[
"pg_type"] ===
"mep") {
2427 $pg_obj->buildDom();
2429 if (!empty(
$_GET[
"pg_id"])) {
2431 $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2443 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2444 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
2448 if ($a_fullscreen) {
2449 $mode =
"fullscreen";
2456 $params = array(
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2457 'link_params' =>
"ref_id=" .
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
2459 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
2460 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args, $params);
2466 require_once(
'./Services/Style/Content/classes/class.ilObjStyleSheet.php');
2468 "LOCATION_CONTENT_STYLESHEET",
2472 $tpl->setVariable(
"MEDIA_CONTENT", $output);
2475 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
2477 $tpl->fillJavaScriptFiles();
2478 $tpl->fillCssFiles();
2490 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
2501 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2505 $page_heads = array();
2506 foreach ($offsets as $os) {
2507 $level = (int) substr($a_output, $os + 10, 1);
2508 if (in_array($level, array(1,2,3))) {
2509 $anchor = str_replace(
2512 substr($a_output, $os, strpos($a_output,
"-->", $os) - $os)
2516 $tag_start = stripos($a_output,
"<h" . $level .
" ", $os);
2517 $tag_end = stripos($a_output,
"</h" . $level .
">", $tag_start);
2518 $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2521 $text_start = stripos($head,
">") + 1;
2522 $text_end = strripos($head,
"<!--", $text_start);
2523 $text = substr($head, $text_start, $text_end - $text_start);
2524 $page_heads[] = array(
"level" => $level,
"text" => $text,
2525 "anchor" => $anchor);
2528 if (count($page_heads) > 1) {
2529 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
2531 $list->setAutoNumbering(
true);
2532 $list->setListClass(
"ilc_page_toc_PageTOCList");
2533 $list->setItemClass(
"ilc_page_toc_PageTOCItem");
2541 foreach ($page_heads as $ind => $h) {
2547 if ($h[
"level"] == 2 && $c_par[1] > 0) {
2550 if ($h[
"level"] == 3 && $c_par[2] > 0) {
2554 $h[
"text"] = str_replace(
"<!--PageTocPH-->",
"", $h[
"text"]);
2558 "<a href='#" . $h[
"anchor"] .
"' class='ilc_page_toc_PageTOCLink'>" . $h[
"text"] .
"</a>",
2564 if ($h[
"level"] == 1) {
2568 if ($h[
"level"] == 2) {
2574 "tpl.page_toc.html",
2579 $tpl->setVariable(
"PAGE_TOC", $list->getHTML());
2580 $tpl->setVariable(
"TXT_PAGE_TOC", $this->lng->txt(
"cont_page_toc"));
2581 $tpl->setVariable(
"TXT_HIDE", $this->lng->txt(
"hide"));
2582 $tpl->setVariable(
"TXT_SHOW", $this->lng->txt(
"show"));
2584 $a_output = str_replace(
2585 "{{{{{PageTOC}}}}}",
2589 $numbers = $list->getNumbers();
2591 if (count($numbers) > 0) {
2592 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2593 foreach ($numbers as
$n) {
2599 $a_output = str_replace(
2600 "{{{{{PageTOC}}}}}",
2621 include_once(
"./Services/COPage/classes/class.ilPCResourcesGUI.php");
2638 $a_output = str_replace(
2639 "{{{{{LV_show_adv}}}}}",
2640 $this->lng->txt(
"cont_show_adv"),
2643 $a_output = str_replace(
2644 "{{{{{LV_hide_adv}}}}}",
2645 $this->lng->txt(
"cont_hide_adv"),
2649 $a_output = str_replace(
2650 "{{{{{LV_show_adv}}}}}",
2654 $a_output = str_replace(
2655 "{{{{{LV_hide_adv}}}}}",
2697 $collection = $this->tool_context->current()->getAdditionalData();
2715 $this->ctrl->redirect($this,
"preview");
2720 if ($ptype ==
"cont" &&
$_GET[
"ref_id"] > 0) {
2724 $this->
help->setScreenId(
"edit_" . $ptype);
2726 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
2728 $this->
user->isAnonymous() &&
2729 !$this->user->isCaptchaVerified() &&
2730 ilCaptchaUtil::isActiveForWiki()
2733 if (
$_POST[
'captcha_code'] && $form->checkInput()) {
2734 $this->
user->setCaptchaVerified(
true);
2736 return $form->getHTML();
2748 $this->lng->toJS(
"paste");
2749 $this->lng->toJS(
"delete");
2750 $this->lng->toJS(
"cont_delete_content");
2751 $this->lng->toJS(
"copg_confirm_el_deletion");
2752 $this->lng->toJS(
"cont_saving");
2753 $this->lng->toJS(
"cont_ed_par");
2754 $this->lng->toJS(
"cont_no_block");
2755 $this->lng->toJS(
"copg_error");
2756 $this->lng->toJS(
"cont_ed_click_to_add_pg");
2757 $this->lng->toJS(
"cont_ed_new_item_after");
2758 $this->lng->toJS(
"cont_ed_new_item_before");
2759 $this->lng->toJS(
"cont_ed_item_up");
2760 $this->lng->toJS(
"cont_ed_item_down");
2761 $this->lng->toJS(
"cont_ed_delete_item");
2764 $this->tpl->addJavascript(
"./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
2771 $info = $this->lng->txt(
"content_no_edit_lock");
2773 $info .=
"</br>" . $this->lng->txt(
"content_until") .
": " .
2775 $info .=
"</br>" . $this->lng->txt(
"obj_usr") .
": " .
2778 $back_link = $this->
ui->factory()->link()->standard(
2779 $this->lng->txt(
"back"),
2780 $this->ctrl->getLinkTarget($this,
"finishEditing")
2783 $mbox = $this->
ui->factory()->messageBox()->info($info)
2784 ->withLinks([$back_link]);
2785 $rendered_mbox = $this->
ui->renderer()->render($mbox);
2787 if (!$this->ctrl->isAsynch()) {
2788 $this->tpl->setContent($rendered_mbox);
2790 echo $rendered_mbox;
2821 $info = $this->lng->txt(
"cont_got_lock_release");
2824 $mbox =
$ui->factory()->messageBox()->info($info);
2826 return $ui->renderer()->render($mbox);
2840 if (
$_GET[
"pl_hier_id"] ==
"") {
2841 $this->obj->buildDom();
2842 $this->obj->addHierIDs();
2843 $hid = $this->obj->getHierIdsForPCIds(array(
$_GET[
"pl_pc_id"]));
2844 $_GET[
"pl_hier_id"] = $hid[
$_GET[
"pl_pc_id"]];
2851 $html = $this->
edit();
2860 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2863 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
2864 $ci =
new ilCaptchaInputGUI($this->lng->txt(
'cont_captcha_code'),
'captcha_code');
2865 $ci->setRequired(
true);
2866 $form->addItem($ci);
2868 $form->addCommandButton(
'edit', $this->lng->txt(
'ok'));
2870 $form->setTitle($this->lng->txt(
'cont_captcha_verification'));
2871 $form->setFormAction($this->ctrl->getFormAction($this));
2897 $this->tpl =
new ilGlobalTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
2898 $this->tpl->setCurrentBlock(
"ContentStyle");
2899 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
2900 $this->tpl->parseCurrentBlock();
2904 $this->tpl->setCurrentBlock(
"ilMedia");
2906 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2908 if (!empty(
$_GET[
"pg_id"])) {
2909 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
2911 $pg_obj->buildDom();
2916 $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2928 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2929 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
2936 $mode =
"fullscreen";
2937 $params = array(
'mode' => $mode,
2939 'webspace_path' => $wb_path);
2940 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args, $params);
2945 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
2955 if (is_array($a_error)) {
2956 $error_str =
"<b>Error(s):</b><br>";
2957 foreach ($a_error as $error) {
2958 $err_mess = implode(
" - ", $error);
2959 if (!is_int(strpos($err_mess,
":0:"))) {
2960 $error_str .= htmlentities($err_mess) .
"<br />";
2963 $this->tpl->setVariable(
"MESSAGE", $error_str);
2969 $this->tabs_gui->clearTargets();
2970 $this->tabs_gui->setBackTarget(
2971 $this->lng->txt(
"back"),
2972 $this->ctrl->getLinkTarget($this,
"edit")
2987 $this->tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
2989 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
2991 $table_gui->setId(
"hist_table");
2998 'sortkey' => 999999,
3000 $table_gui->setData($entries);
3001 return $table_gui->getHTML();
3013 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3017 $this->ctrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
3018 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"rollback"));
3019 $c_gui->setHeaderText($this->lng->txt(
"cont_rollback_confirmation"));
3020 $c_gui->setCancel($this->lng->txt(
"cancel"),
"history");
3021 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"rollback");
3023 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
3031 $this->tpl->setContent($c_gui->getHTML());
3043 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
3045 if ($hentry[
"content"] !=
"") {
3046 $this->obj->setXMLContent($hentry[
"content"]);
3047 $this->obj->buildDom(
true);
3048 if ($this->obj->update()) {
3049 $this->ctrl->redirect($this,
"history");
3052 $this->ctrl->redirect($this,
"history");
3063 $this->
help->setScreenIdComponent(
"copg");
3081 $this->tabs_gui->addTarget(
"pg", $this->ctrl->getLinkTarget($this,
"preview"), array(
"",
"preview"));
3083 $this->tabs_gui->addTarget(
"cont_preview", $this->ctrl->getLinkTarget($this,
"preview"), array(
"",
"preview"));
3089 if ($this->use_meta_data) {
3090 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
3092 $this->meta_data_rep_obj,
3093 $this->meta_data_type,
3094 $this->meta_data_sub_obj_id
3096 $mdtab = $mdgui->getTab();
3098 $this->tabs_gui->addTarget(
3102 "ilobjectmetadatagui"
3130 if ($this->
getPageConfig()->getEnableScheduledActivation()) {
3131 $this->tabs_gui->addTarget(
3133 $this->ctrl->getLinkTarget($this,
"editActivation"),
3140 $this->tabs_gui->addTarget(
3142 $this->ctrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
3149 if (is_array($this->tab_hook)) {
3150 $func = $this->tab_hook[
"func"];
3151 $this->tab_hook[
"obj"]->$func();
3165 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
3166 $compare = $this->obj->compareVersion((
int)
$_POST[
"left"], (
int)
$_POST[
"right"]);
3169 $lpage = $compare[
"l_page"];
3171 $cfg->setPreventHTMLUnmasking(
true);
3180 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
3181 $tpl->setVariable(
"LEFT", $lhtml);
3184 $rpage = $compare[
"r_page"];
3192 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
3193 $tpl->setVariable(
"RIGHT", $rhtml);
3195 $tpl->setVariable(
"TXT_NEW", $this->lng->txt(
"cont_pc_new"));
3196 $tpl->setVariable(
"TXT_MODIFIED", $this->lng->txt(
"cont_pc_modified"));
3197 $tpl->setVariable(
"TXT_DELETED", $this->lng->txt(
"cont_pc_deleted"));
3207 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
3208 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
3209 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
3210 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
3222 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
3225 $atpl->setVariable(
"FORM", $this->form->getHTML());
3226 $atpl->setCurrentBlock(
"updater");
3227 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
3228 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
3229 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
3230 $atpl->parseCurrentBlock();
3231 $this->tpl->setContent($atpl->get());
3239 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3241 $this->form->setFormAction($this->ctrl->getFormAction($this));
3242 $this->form->setTitle($this->lng->txt(
"cont_page_activation"));
3246 $rad_op1 =
new ilRadioOption($this->lng->txt(
"cont_activated"),
"activated");
3248 $rad->addOption($rad_op1);
3249 $rad_op2 =
new ilRadioOption($this->lng->txt(
"cont_deactivated"),
"deactivated");
3250 $rad->addOption($rad_op2);
3251 $rad_op3 =
new ilRadioOption($this->lng->txt(
"cont_scheduled_activation"),
"scheduled");
3254 $dt_prop->setRequired(
true);
3255 $dt_prop->setShowTime(
true);
3256 $rad_op3->addSubItem($dt_prop);
3258 $dt_prop2->setRequired(
true);
3259 $dt_prop2->setShowTime(
true);
3260 $rad_op3->addSubItem($dt_prop2);
3263 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_show_activation_info"),
"show_activation_info");
3264 $cb->setInfo($this->lng->txt(
"cont_show_activation_info_info"));
3265 $rad_op3->addSubItem($cb);
3268 $rad->addOption($rad_op3);
3270 $this->form->addCommandButton(
"saveActivation", $this->lng->txt(
"save"));
3272 $this->form->addItem($rad);
3285 $dt_prop = $this->form->getItemByPostVar(
"start");
3293 $dt_prop = $this->form->getItemByPostVar(
"end");
3302 $this->form->getItemByPostVar(
"activation")->setValue(
$activation);
3303 $this->form->getItemByPostVar(
"show_activation_info")->setChecked($this->
getPageObject()->getShowActivationInfo());
3313 if ($this->form->checkInput()) {
3318 if (
$_POST[
"activation"] ==
"deactivated") {
3321 if (
$_POST[
"activation"] ==
"scheduled") {
3324 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME)
3331 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
3332 $this->ctrl->redirect($this,
"editActivation");
3334 $this->form->setValuesByPost();
3335 $this->tpl->setContent($this->form->getHTML());
3347 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, $export =
false)
3349 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
3352 if (!$a_content_object) {
3354 $this->notes_parent_id,
3355 (
int) $this->obj->getId(),
3359 $a_enable_private_notes =
true;
3360 $a_enable_public_notes =
true;
3361 $a_enable_notes_deletion =
false;
3366 $a_content_object->getParentId(),
3367 $a_content_object->getId(),
3368 $a_content_object->getParentType()
3372 if ($a_enable_private_notes) {
3373 $notes_gui->enablePrivateNotes();
3375 if ($a_enable_public_notes) {
3376 $notes_gui->enablePublicNotes();
3377 if ((
bool) $a_enable_notes_deletion) {
3378 $notes_gui->enablePublicNotesDeletion(
true);
3382 $notes_gui->setExportMode();
3386 $notes_gui->addObserver($a_callback);
3389 $next_class = $this->ctrl->getNextClass($this);
3390 if ($next_class ==
"ilnotegui") {
3391 $html = $this->ctrl->forwardCommand($notes_gui);
3393 $html = $notes_gui->getNotesHTML();
3403 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
3426 $this->tabs_gui->activateTab(
"edit");
3429 $this->tpl->setContent($form->getHTML());
3440 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3444 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
3445 $ac =
new ilLinkInputGUI($this->lng->txt(
'cont_resource'),
'opened_content');
3447 $ac->setInternalLinkDefault(
"Media_Media", 0);
3448 $ac->setInternalLinkFilterTypes(array(
"PageObject_FAQ",
"GlossaryItem",
"Media_Media",
"Media_FAQ"));
3449 $val = $this->obj->getInitialOpenedContent();
3450 if ($val[
"id"] !=
"" && $val[
"type"] !=
"") {
3451 $ac->setValue($val[
"type"] .
"|" . $val[
"id"] .
"|" . $val[
"target"]);
3454 $form->addItem($ac);
3456 $form->addCommandButton(
"saveInitialOpenedContent", $this->lng->txt(
"save"));
3457 $form->addCommandButton(
"edit", $this->lng->txt(
"cancel"));
3458 $form->setTitle($this->lng->txt(
"cont_initial_attached_content"));
3459 $form->setFormAction($this->ctrl->getFormAction($this));
3472 $this->obj->saveInitialOpenedContent(
3478 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"));
3479 $this->ctrl->redirect($this,
"edit");
3498 $this->ctrl->setParameter($this,
"transl",
$_GET[
"totransl"]);
3499 $this->ctrl->redirect($this,
"edit");
3508 $this->ctrl->setParameter($this,
"totransl", $l);
3509 $this->lng->loadLanguageModule(
"meta");
3511 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
3513 $cgui->setFormAction($this->ctrl->getFormAction($this));
3514 $cgui->setHeaderText($this->lng->txt(
"cont_page_translation_does_not_exist") .
": " .
3515 $this->lng->txt(
"meta_l_" . $l));
3516 $cgui->setCancel($this->lng->txt(
"cancel"),
"editMasterLanguage");
3517 $cgui->setConfirm($this->lng->txt(
"confirm"),
"createPageTranslation");
3518 $this->tpl->setContent($cgui->getHTML());
3526 $this->ctrl->setParameter($this,
"transl",
"");
3527 $this->ctrl->redirect($this,
"edit");
3537 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
3544 $p->copyPageToTranslation($l);
3545 $this->ctrl->setParameter($this,
"transl", $l);
3546 $this->ctrl->redirect($this,
"edit");
3555 ilUtil::sendSuccess($this->lng->txt(
"cont_page_lock_released"),
true);
3561 $this->ctrl->redirect($this,
"preview");
3590 foreach ($collector->getJavascriptFiles() as $js) {
3591 $tpl->addJavascript($js);
3594 foreach ($collector->getCssFiles() as $css) {
3598 foreach ($collector->getOnloadCode() as $code) {
3599 $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.
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.
static initDateTimePicker()
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 getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
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 _getTextCharacteristics($a_style_id, $a_include_core=false)
Get text characteristics.
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 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.
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.
__construct( $a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="", $concrete_lang="")
Constructor.
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.
setEnabledHref(bool $enable)
setOpenPlaceHolder($a_val)
Set open placeholder.
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
getDisabledText()
Get disabled text.
setQuestionHTML($question_html)
displayValidationError($a_error)
display validation error
setOutputMode($a_mode=self::PRESENTATION)
Set Output Mode.
setEditMode()
Set edit mode.
saveActivation()
Save Activation.
showEditToolbar()
Show edit toolbar.
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.
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.
confirmPageTranslationCreation()
Confirm page translation creation.
editActivation()
Edit activation (only, if scheduled page activation is activated in administration)
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, \ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
Get Tiny Menu.
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.
setAbstractOnly($a_val, $pcid="")
Set abstract only.
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
initEditing()
Init editing.
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.
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.
getAdditionalPageActions()
Get additional page actions.
history()
Get history table as HTML.
displayMediaFullscreen()
Show media in fullscreen mode.
setDefaultLinkXml()
Set standard link xml.
saveInitialOpenedContent()
Save initial opened content.
getNotesHTML($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null, $export=false)
Get html for public and/or private notes.
setFullscreenLink($a_fullscreen_link)
Set fullscreen link.
setStyleId($a_styleid)
Set Style Id.
getOfflineDirectory()
get offline directory
rollbackConfirmation()
Rollback confirmation.
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)
setEditorToolContext()
Set editor tool context.
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.
getOpenPlaceHolder()
Get open 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.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
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 getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
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
Class ChatMainBarProvider \MainMenu\Provider.