4 define (
"IL_PAGE_PRESENTATION",
"presentation");
5 define (
"IL_PAGE_EDIT",
"edit");
6 define (
"IL_PAGE_PREVIEW",
"preview");
7 define (
"IL_PAGE_OFFLINE",
"offline");
8 define (
"IL_PAGE_PRINT",
"print");
10 include_once (
"./Services/COPage/classes/class.ilPageEditorGUI.php");
11 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
12 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
13 include_once(
"./Services/COPage/classes/class.ilParagraphPlugins.php");
14 include_once(
"./Services/COPage/classes/class.ilParagraphPlugin.php");
15 include_once(
"./Services/Utilities/classes/class.ilDOMUtil.php");
79 "ContentInclude" => array(
85 "InteractiveImage" => array(
89 "LoginPageElement" => array(
93 "MediaObject" => array(
97 "PlaceHolder" => array(
101 "Resources" => array(
105 "SourceCode" => array(
113 "Verification" => array(
117 "QuestionOverview" => array(
130 $a_prevent_get_id =
false)
135 if ($a_old_nr == 0 && !$a_prevent_get_id &&
$_GET[
"old_nr"] > 0)
137 $a_old_nr =
$_GET[
"old_nr"];
155 include_once(
"./Services/COPage/classes/class.ilPageConfig.php");
164 $this->output2template =
true;
165 $this->question_xml =
"";
166 $this->question_html =
"";
167 $this->tabs_gui =& $ilTabs;
170 $this->template_output_var =
"PAGE_CONTENT";
171 $this->citation =
false;
172 $this->change_comments =
false;
173 $this->page_back_title = $this->lng->txt(
"page");
174 $lng->loadLanguageModule(
"content");
188 if (isset($a_pc_type))
190 $this->pc_types[$a_pc_type][
"enabled"] = $a_val;
201 return $this->pc_types[$a_pc_type][
"enabled"];
211 $this->page_config = $a_val;
226 $page =
new ilPageObject($a_parent_type, $a_id, $a_old_nr);
236 $this->bib_id = $a_id;
244 return $this->bib_id ? $this->bib_id : 0;
254 $this->obj = $a_pg_obj;
274 $this->output_mode = $a_mode;
284 $this->output2template = $a_output;
294 $this->presentation_title = $a_title;
304 $this->header = $a_title;
309 return $this->header;
314 $this->link_params = $l_params;
324 $this->link_frame = $l_frame;
329 return $this->link_frame;
334 $this->link_xml = $link_xml;
335 $this->link_xml_set =
true;
340 return $this->link_xml;
345 $this->question_xml = $question_xml;
355 return $this->question_xml;
365 $this->target_var = $a_variable;
376 $this->template_output_var = $a_value;
387 $this->output_submode = $a_mode;
406 $this->citation = $a_enabled;
416 $this->locator =& $a_locator;
421 $this->tabs_gui = $a_tabs;
426 $this->page_back_title = $a_title;
431 $this->file_download_link = $a_download_link;
436 return $this->file_download_link;
441 $this->fullscreen_link = $a_fullscreen_link;
446 return $this->fullscreen_link;
456 $this->enable_keywords = $a_val;
476 $this->enable_anchors = $a_val;
491 $this->int_link_def_type = $a_type;
492 $this->int_link_def_id = $a_id;
497 $this->int_link_return = $a_return;
502 $this->change_comments = $a_enabled;
512 $this->notes_enabled = $a_enabled;
513 $this->notes_parent_id = $a_parent_id;
518 return $this->notes_enabled;
543 $this->offline_directory = $offdir;
552 return $this->offline_directory;
564 $this->view_page_link = $a_link;
565 $this->view_page_target = $a_target;
573 return $this->view_page_link;
581 return $this->view_page_target;
586 $this->act_obj =& $a_obj;
587 $this->act_meth = $a_meth;
592 $this->activation = $a_act;
602 $this->scheduled_activation = $a_act;
607 return $this->scheduled_activation;
617 $this->page_toc = $a_val;
627 return $this->page_toc;
637 $this->enabled_news = $a_enabled;
638 $this->news_obj_id = $a_news_obj_id;
639 $this->news_obj_type = $a_news_obj_type;
649 return $this->enabled_news;
657 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
668 $this->enabledinternallinks = $a_enabledinternallinks;
688 $this->editpreview = $a_editpreview;
708 $this->preventhtmlunmasking = $a_preventhtmlunmasking;
718 return $this->preventhtmlunmasking;
728 $this->tabs_enabled = $a_enabledtabs;
767 $this->
setEnablePCType(
"LoginPageElement", (
bool) $a_enablegloginpage);
846 $this->enabledpagefocus = $a_enabledpagefocus;
856 return $this->enabledpagefocus;
942 $this->exp_frame = $a_exp_frame;
943 $this->exp_id = $a_exp_id;
944 $this->exp_target_script = $a_exp_target_script;
954 $this->prependinghtml = $a_prependinghtml;
964 return $this->prependinghtml;
974 $this->enablewikilinks = $a_enablewikilinks;
984 return $this->enablewikilinks;
994 $this->enableediting = $a_enableediting;
1014 $this->rawpagecontent = $a_rawpagecontent;
1034 $this->layout_mode = $a_layout_mode;
1044 return $this->layout_mode;
1054 $this->styleid = $a_styleid;
1064 return $this->styleid;
1075 $this->enabledselfassessment = $a_enabledselfassessment;
1076 $this->enabledselfassessment_scorm = $a_scorm;
1087 return $this->enabledselfassessment;
1097 return $this->enabledselfassessment_scorm;
1107 $this->compare_mode = $a_val;
1127 $this->abstract_only = $a_val;
1150 $a_observer_obj = NULL, $a_observer_func =
"")
1152 $this->use_meta_data =
true;
1153 $this->meta_data_rep_obj_id = $a_rep_obj_id;
1154 $this->meta_data_sub_obj_id = $a_sub_obj_id;
1155 $this->meta_data_type = $a_type;
1156 $this->meta_data_observer_obj = $a_observer_obj;
1157 $this->meta_data_observer_func = $a_observer_func;
1172 $file_download_link = $ilCtrl->getLinkTarget($this,
"downloadFile");
1174 return $file_download_link;
1189 $fullscreen_link = $ilCtrl->getLinkTarget($this,
"displayMediaFullscreen",
"",
false,
false);
1191 return $fullscreen_link;
1204 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline")
1206 $l = $ilCtrl->getLinkTarget($this,
"");
1219 global $ilPluginAdmin;
1223 foreach ($pl_names as $pl_name)
1226 "COPage",
"pgcp", $pl_name);
1227 if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
1229 $xml =
'<ComponentPlugin Name="'.$plugin->getPluginName().
1236 $xml =
"<ComponentPlugins>".$xml.
"</ComponentPlugins>";
1250 $next_class = $this->ctrl->getNextClass($this);
1252 $cmd = $this->ctrl->getCmd();
1257 $ilCtrl->setReturn($this,
"edit");
1261 case 'ilmdeditorgui':
1263 $ilTabs->setTabActive(
"meta_data");
1264 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
1266 $this->meta_data_sub_obj_id, $this->meta_data_type);
1267 if (is_object($this->meta_data_observer_obj))
1269 $md_gui->addObserver($this->meta_data_observer_obj,
1270 $this->meta_data_observer_func,
"General");
1272 $this->ctrl->forwardCommand($md_gui);
1275 case "ileditclipboardgui":
1279 $clip_gui->setPageBackTitle($this->page_back_title);
1281 $ret =& $this->ctrl->forwardCommand($clip_gui);
1286 switch(
$_GET[
"notes_mode"])
1289 $html = $this->
edit();
1290 $ilTabs->setTabActive(
"edit");
1295 case 'ilpublicuserprofilegui':
1296 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1298 $ret = $this->ctrl->forwardCommand($profile_gui);
1301 case "ilpageeditorgui":
1305 $ilCtrl->redirect($this,
"preview");
1308 $page_editor->setLocator($this->locator);
1309 $page_editor->setHeader($this->
getHeader());
1310 $page_editor->setPageBackTitle($this->page_back_title);
1314 $page_editor->setIntLinkHelpDefault($this->int_link_def_type,
1315 $this->int_link_def_id);
1316 $page_editor->setIntLinkReturn($this->int_link_return);
1318 $ret =& $this->ctrl->forwardCommand($page_editor);
1321 case 'ilnewsitemgui':
1322 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
1324 $news_item_gui->setEnableEdit(
true);
1325 $news_item_gui->setContextObjId($this->news_obj_id);
1326 $news_item_gui->setContextObjType($this->news_obj_type);
1327 $news_item_gui->setContextSubObjId($this->obj->getId());
1328 $news_item_gui->setContextSubObjType(
"pg");
1330 $ret = $ilCtrl->forwardCommand($news_item_gui);
1334 $ret = $this->ctrl->forwardCommand($profile_gui);
1338 $cmd = $this->ctrl->getCmd(
"preview");
1352 $this->ctrl->redirect($this,
"edit");
1361 $this->ctrl->redirect($this,
"edit");
1371 $ilBench->start(
"ContentPresentation",
"ilPageObjectGUI_showPage");
1375 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilCOPagePres.js");
1383 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1387 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1392 $tpl->setCurrentBlock(
"change_comment");
1393 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1394 $tpl->parseCurrentBlock();
1395 $tpl->setCurrentBlock(
"adm_content");
1399 if ($this->exp_frame !=
"")
1401 $tpl->setCurrentBlock(
"updater");
1402 $tpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
1403 $tpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
1404 $tpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
1405 $tpl->parseCurrentBlock();
1413 $tpl->setVariable(
"WYSIWYG_ACTION",
1414 $ilCtrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true));
1418 $sel_media_mode = ($ilUser->getPref(
"ilPageEditor_MediaMode") ==
"disable")
1421 $sel_html_mode = ($ilUser->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
1424 $sel_js_mode =
"disable";
1434 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $lng->txt(
"cont_confirm_delete"));
1439 $ilTabs->addNonTabbedLink(
"pres_view", $this->lng->txt(
"cont_presentation_view"),
1447 if ($sel_js_mode ==
"enable")
1450 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1454 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
1455 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing.js");
1457 include_once
'./Services/Style/classes/class.ilObjStyleSheet.php';
1458 $GLOBALS[
"tpl"]->addOnloadCode(
"var preloader = new Image();
1459 preloader.src = './templates/default/images/loader.gif';
1460 ilCOPage.setContentCss('".
1463 ", ./Services/COPage/css/tiny_extra.css".
1466 $GLOBALS[
"tpl"]->addJavascript(
"Services/RTE/tiny_mce_3_3_9_2/il_tiny_mce_src.js");
1467 $tpl->touchBlock(
"init_dragging");
1469 $tpl->setVariable(
"IL_TINY_MENU",
1479 include_once(
"./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
1480 $tpl->setCurrentBlock(
"int_link_prep");
1482 $ilCtrl->getLinkTargetByClass(array(
"ilpageeditorgui",
"ilinternallinkgui"),
1483 "",
false,
true,
false)));
1484 $tpl->parseCurrentBlock();
1491 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1493 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/Explorer/js/ilexplorercallback.js");
1500 ($this->
getPageObject()->getParentType() !=
"qpl" && $cnt_pcs > 0))
1502 $tpl->setCurrentBlock(
"multi_actions");
1503 if ($sel_js_mode ==
"enable")
1505 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1506 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1507 $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC",
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
1508 $tpl->setVariable(
"ONCLICK_COPY_SELECTED",
'onclick="return ilEditMultiAction(\'copySelected\');"');
1509 $tpl->setVariable(
"ONCLICK_CUT_SELECTED",
'onclick="return ilEditMultiAction(\'cutSelected\');"');
1510 $tpl->setVariable(
"TXT_SELECT_ALL", $this->lng->txt(
"select_all"));
1511 $tpl->setVariable(
"ONCLICK_SELECT_ALL",
'onclick="return ilEditMultiAction(\'selectAll\');"');
1513 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1514 $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
1515 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1516 $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
1517 $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
1519 $tpl->parseCurrentBlock();
1526 $tpl =
new ilTemplate(
"tpl.page_translation_content.html",
true,
true,
"Services/COPage");
1533 $tpl =
new ilTemplate(
"tpl.page_content.html",
true,
true,
"Services/COPage");
1536 $tpl->touchBlock(
"page_focus");
1541 $tpl =
new ilTemplate(
"tpl.page_preview.html",
true,
true,
"Services/COPage");
1542 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1553 if (is_array($hist_info[
"previous"]))
1555 $tpl->setCurrentBlock(
"previous_rev");
1556 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1557 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1558 $tpl->setVariable(
"HREF_PREV",
1559 $ilCtrl->getLinkTarget($this,
"preview"));
1560 $tpl->parseCurrentBlock();
1564 $tpl->setCurrentBlock(
"previous_rev_disabled");
1565 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1566 $tpl->parseCurrentBlock();
1570 $tpl->setCurrentBlock(
"next_rev");
1571 $tpl->setVariable(
"TXT_NEXT_REV", $lng->txt(
"cont_next_rev"));
1572 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1573 $tpl->setVariable(
"HREF_NEXT",
1574 $ilCtrl->getLinkTarget($this,
"preview"));
1575 $tpl->parseCurrentBlock();
1578 $tpl->setCurrentBlock(
"latest_rev");
1579 $tpl->setVariable(
"TXT_LATEST_REV", $lng->txt(
"cont_latest_rev"));
1580 $ilCtrl->setParameter($this,
"old_nr",
"");
1581 $tpl->setVariable(
"HREF_LATEST",
1582 $ilCtrl->getLinkTarget($this,
"preview"));
1583 $tpl->parseCurrentBlock();
1586 if ($c_old_nr > 0 && $ilUser->getId() != ANONYMOUS_USER_ID)
1588 $tpl->setCurrentBlock(
"rollback");
1589 $ilCtrl->setParameter($this,
"old_nr", $c_old_nr);
1590 $tpl->setVariable(
"HREF_ROLLBACK",
1591 $ilCtrl->getLinkTarget($this,
"rollbackConfirmation"));
1592 $ilCtrl->setParameter($this,
"old_nr",
"");
1593 $tpl->setVariable(
"TXT_ROLLBACK",
1594 $lng->txt(
"cont_rollback"));
1595 $tpl->parseCurrentBlock();
1599 $tpl->setCurrentBlock(
"hist_nav");
1600 $tpl->setVariable(
"TXT_REVISION", $lng->txt(
"cont_revision"));
1601 $tpl->setVariable(
"VAL_REVISION_DATE",
1603 $tpl->setVariable(
"VAL_REV_USER",
1605 $tpl->parseCurrentBlock();
1615 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1622 $this->obj->getId());
1623 $mob_links = array();
1624 foreach($links as $link)
1626 if ($link[
"type"] ==
"mob")
1636 if (count($mob_links) > 0)
1638 $tpl->setCurrentBlock(
"med_link");
1639 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1640 $tpl->setVariable(
"SEL_MED_LINKS",
1642 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1643 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1645 $tpl->parseCurrentBlock();
1649 $snippets = $this->
getPageObject()->collectContentIncludes();
1650 if (count($snippets) > 0)
1652 foreach ($snippets as $s)
1654 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1657 $tpl->setCurrentBlock(
"med_link");
1658 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1659 $tpl->setVariable(
"SEL_SNIPPETS",
1661 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1662 $tpl->parseCurrentBlock();
1670 $tpl->setCurrentBlock(
"activation_txt");
1671 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $lng->txt(
"cont_scheduled_activation"));
1672 $tpl->setVariable(
"SA_FROM",
1676 $tpl->setVariable(
"SA_TO",
1680 $tpl->parseCurrentBlock();
1684 if (
$_GET[
"reloadTree"] ==
"y")
1686 $tpl->setCurrentBlock(
"reload_tree");
1687 if ($this->obj->getParentType() ==
"dbk")
1689 $tpl->setVariable(
"LINK_TREE",
1690 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer",
"",
false,
false));
1694 $tpl->setVariable(
"LINK_TREE",
1695 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer",
"",
false,
false));
1697 $tpl->parseCurrentBlock();
1701 $builded = $this->obj->buildDom();
1708 if (!$this->obj->checkPCIds())
1710 $this->obj->insertPCIds();
1711 $this->obj->update(
true,
true);
1714 $this->obj->addFileSizes();
1715 $this->obj->addHierIDs();
1717 $hids = $this->obj->getHierIds();
1718 $row1_ids = $this->obj->getFirstRowIds();
1719 $col1_ids = $this->obj->getFirstColumnIds();
1720 $litem_ids = $this->obj->getListItemIds();
1721 $fitem_ids = $this->obj->getFileItemIds();
1724 $hids = $this->obj->getHierIds();
1725 foreach($hids as $hid)
1727 $tpl->setCurrentBlock(
"add_dhtml");
1728 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_".$hid);
1729 $tpl->parseCurrentBlock();
1733 foreach($col1_ids as $hid)
1735 $tpl->setCurrentBlock(
"add_dhtml");
1736 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r".$hid);
1737 $tpl->parseCurrentBlock();
1741 foreach($row1_ids as $hid)
1743 $tpl->setCurrentBlock(
"add_dhtml");
1744 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c".$hid);
1745 $tpl->parseCurrentBlock();
1749 foreach($litem_ids as $hid)
1751 $tpl->setCurrentBlock(
"add_dhtml");
1752 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1753 $tpl->parseCurrentBlock();
1757 foreach($fitem_ids as $hid)
1759 $tpl->setCurrentBlock(
"add_dhtml");
1760 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1761 $tpl->parseCurrentBlock();
1766 $this->obj->addFileSizes();
1773 if (!$this->link_xml_set)
1787 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1789 $template_xml = $style->getTemplateXML();
1790 $disable_auto_margins =
"n";
1791 if ($style->lookupStyleSetting(
"disable_auto_margins"))
1793 $disable_auto_margins =
"y";
1800 $content =
"<dummy><PageObject><PageContent><Paragraph>".
1801 $this->obj->getFirstParagraphText().$link_xml.
1802 "</Paragraph></PageContent></PageObject></dummy>";
1806 $content = $this->obj->getXMLFromDom(
false,
true,
true,
1807 $link_xml.$this->getQuestionXML().$template_xml);
1811 if($builded !==
true)
1824 session_unregister(
"citation_error");
1844 $enlarge_path =
"images/enlarge.gif";
1848 ?
"ilc_PrintPageTitle"
1853 $enable_split_new = ($this->obj->getParentType() ==
"lm" ||
1854 $this->obj->getParentType() ==
"dbk")
1860 if (($this->obj->getParentType() ==
"lm" ||
1861 $this->obj->getParentType() ==
"dbk") &&
1863 $this->obj->getId()))
1865 $enable_split_next =
"y";
1869 $enable_split_next =
"n";
1874 $paragraph_plugins->initialize ();
1878 $paragraph_plugin_string = $paragraph_plugins->serializeToString();
1879 $_SESSION [
"paragraph_plugins"] = $paragraph_plugins;
1891 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1903 ? $ilUser->getPref(
"ilPageEditor_MediaMode")
1906 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1911 $params = array (
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title,ENT_QUOTES,
"UTF-8"),
1913 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1914 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1915 'img_add' => $add_path,
1916 'img_col' => $col_path,
1917 'img_row' => $row_path,
1918 'img_item' => $item_path,
1919 'enable_split_new' => $enable_split_new,
1920 'enable_split_next' => $enable_split_next,
1922 'file_download_link' => $file_download_link,
1923 'fullscreen_link' => $fullscreen_link,
1924 'med_disabled_path' => $med_disabled_path,
1925 'img_path' => $img_path,
1926 'parent_id' => $this->obj->getParentId(),
1928 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1931 'pagebreak' => $this->lng->txt(
'dgl_pagebreak'),
1932 'page' => $this->lng->txt(
'page'),
1933 'citate_page' => $this->lng->txt(
'citate_page'),
1934 'citate_from' => $this->lng->txt(
'citate_from'),
1935 'citate_to' => $this->lng->txt(
'citate_to'),
1936 'citate' => $this->lng->txt(
'citate'),
1944 'paste' => $paste ?
"y" :
"n",
1945 'media_mode' => $media_mode,
1946 'javascript' => $sel_js_mode,
1947 'paragraph_plugins' => $paragraph_plugin_string,
1948 'disable_auto_margins' => $disable_auto_margins,
1949 'page_toc' => $this->
getPageToc() ?
"y" :
"n",
1954 'enable_qover' => $this->
getEnablePCType(
"QuestionOverview") ?
"y" :
"n"
1956 if($this->link_frame !=
"")
1957 $params[
"pg_frame"] = $this->link_frame;
1965 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1968 $md5 = md5(serialize($params).$link_xml.$template_xml);
1976 $md5 == $this->obj->getRenderMd5() &&
1977 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1978 $this->obj->getRenderedTime() !=
"" &&
1979 $this->obj->old_nr == 0)
1982 $output = $this->obj->getRenderedContent();
1989 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1993 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1996 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
2000 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", NULL, $args, $params);
2004 && $this->obj->old_nr == 0)
2007 $this->obj->writeRenderedContent($output, $md5);
2019 $ilUser->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
2022 $output = str_replace(
"<",
"<",$output);
2023 $output = str_replace(
">",
">",$output);
2025 $output = str_replace(
"&",
"&", $output);
2053 $output = str_replace(
"\n",
"", $output);
2057 if (is_array($qhtml))
2059 foreach ($qhtml as $k => $h)
2061 $output = str_replace($this->pl_start.
"Question;il__qst_$k".$this->pl_end,
" ".$h, $output);
2070 $output =
'<div class="il_editarea_disabled">'.$output.
'</div>';
2074 $output = $this->obj->insertSourceCodeParagraphs($output, $this->
getOutputMode());
2076 $ilBench->stop(
"ContentPresentation",
"ilPageObjectGUI_showPage");
2084 if (
$_GET[
"updated_pc_id_str"] !=
"")
2086 echo
$_GET[
"updated_pc_id_str"];
2089 $tpl->setCurrentBlock(
"edit_page");
2090 $tpl->parseCurrentBlock();
2091 echo
$tpl->get(
"edit_page");
2124 while (is_int($start = strpos($output,
"<!--ParStart-->")) &&
2125 is_int($end = strpos($output,
"<!--ParEnd-->", $start)))
2127 $output = substr($output, 0, $start).
2128 str_replace(array(
"{",
"}"), array(
"{",
"}"),
2129 substr($output, $start + 15, $end - ($start + 15))).
2130 substr($output, $end + 13);
2146 return array(
"deactivatePage" => $lng->txt(
"cont_deactivate_page"),
2147 "activatePage" => $lng->txt(
"cont_activate_page"));
2158 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2164 $list->setListTitle($lng->txt(
"actions"));
2165 $list->setId(
"copage_act");
2170 $list->addItem($captions[
"deactivatePage"],
"",
2171 $ilCtrl->getLinkTarget($this,
"deactivatePage"));
2175 $list->addItem($captions[
"activatePage"],
"",
2176 $ilCtrl->getLinkTarget($this,
"activatePage"));
2179 $a_tpl->setVariable(
"PAGE_ACTIONS", $list->getHTML());
2182 $lng->loadLanguageModule(
"content");
2184 $list->setListTitle($lng->txt(
"cont_edit_mode"));
2185 $list->setId(
"copage_ed_mode");
2188 if ($sel_media_mode ==
"enable")
2190 $ilCtrl->setParameter($this,
"media_mode",
"disable");
2191 $list->addItem($lng->txt(
"cont_deactivate_media"),
"",
2192 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2196 $ilCtrl->setParameter($this,
"media_mode",
"enable");
2197 $list->addItem($lng->txt(
"cont_activate_media"),
"",
2198 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2200 $ilCtrl->setParameter($this,
"media_mode",
"");
2205 if ($sel_html_mode ==
"enable")
2207 $ilCtrl->setParameter($this,
"html_mode",
"disable");
2208 $list->addItem($lng->txt(
"cont_deactivate_html"),
"",
2209 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2213 $ilCtrl->setParameter($this,
"html_mode",
"enable");
2214 $list->addItem($lng->txt(
"cont_activate_html"),
"",
2215 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2218 $ilCtrl->setParameter($this,
"html_mode",
"");
2221 if ($sel_js_mode ==
"enable")
2223 $ilCtrl->setParameter($this,
"js_mode",
"disable");
2224 $list->addItem($lng->txt(
"cont_deactivate_js"),
"",
2225 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2229 $ilCtrl->setParameter($this,
"js_mode",
"enable");
2230 $list->addItem($lng->txt(
"cont_activate_js"),
"",
2231 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2233 $ilCtrl->setParameter($this,
"js_mode",
"");
2235 $a_tpl->setVariable(
"EDIT_MODE", $list->getHTML());
2245 if (
$_GET[
"media_mode"] !=
"")
2247 if (
$_GET[
"media_mode"] ==
"disable")
2249 $ilUser->writePref(
"ilPageEditor_MediaMode",
"disable");
2253 $ilUser->writePref(
"ilPageEditor_MediaMode",
"");
2256 if (
$_GET[
"html_mode"] !=
"")
2258 if (
$_GET[
"html_mode"] ==
"disable")
2260 $ilUser->writePref(
"ilPageEditor_HTMLMode",
"disable");
2264 $ilUser->writePref(
"ilPageEditor_HTMLMode",
"");
2267 if (
$_GET[
"js_mode"] !=
"")
2269 if (
$_GET[
"js_mode"] ==
"disable")
2271 $ilUser->writePref(
"ilPageEditor_JavaScript",
"disable");
2275 $ilUser->writePref(
"ilPageEditor_JavaScript",
"");
2279 $ilCtrl->redirect($this,
"edit");
2287 $a_int_links =
false, $a_wiki_links =
false, $a_keywords =
false,
2288 $a_style_id = 0, $a_paragraph_styles =
true, $a_save_return =
true,
2293 $jsMathSetting =
new ilSetting(
"jsMath");
2295 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
2297 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
2299 $btpl =
new ilTemplate(
"tpl.tiny_menu.html",
true,
true,
"Services/COPage");
2304 $btpl->touchBlock(
"debug_ghost");
2308 $btpl->setCurrentBlock(
"pword_button");
2311 $btpl->parseCurrentBlock();
2313 $lng->txt(
"cont_pword"),
2317 $btpl->setCurrentBlock(
"blist_button");
2320 $btpl->parseCurrentBlock();
2322 $lng->txt(
"cont_blist"),
2326 $btpl->setCurrentBlock(
"nlist_button");
2329 $btpl->parseCurrentBlock();
2331 $lng->txt(
"cont_nlist"),
2335 $btpl->setCurrentBlock(
"list_indent");
2338 $btpl->parseCurrentBlock();
2340 $lng->txt(
"cont_list_indent"),
2345 $btpl->setCurrentBlock(
"list_outdent");
2348 $btpl->parseCurrentBlock();
2350 $lng->txt(
"cont_list_outdent"),
2355 $btpl->touchBlock(
"bb_ilink_button");
2363 $btpl->setCurrentBlock(
"rformat_button");
2366 $btpl->parseCurrentBlock();
2370 if ($a_paragraph_styles)
2373 $btpl->setCurrentBlock(
"new_par");
2374 $btpl->setVariable(
"IMG_NEWPAR",
"+");
2375 $btpl->parseCurrentBlock();
2379 $btpl->setCurrentBlock(
"par_edit");
2380 $btpl->setVariable(
"TXT_PAR_FORMAT", $lng->txt(
"cont_par_format"));
2381 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2386 $lng->txt(
"cont_paragraph_styles"),
"iltinymenu_bd");
2388 $btpl->parseCurrentBlock();
2393 $btpl->setCurrentBlock(
"bb_kw_button");
2394 $btpl->setVariable(
"CC_KW",
"kw");
2395 $btpl->parseCurrentBlock();
2403 $btpl->setCurrentBlock(
"bb_wikilink_button");
2404 $btpl->setVariable(
"TXT_WLN2", $lng->txt(
"obj_wiki"));
2405 $btpl->parseCurrentBlock();
2414 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
2418 if (in_array($c, array(
"com",
"quot",
"acc",
"code")))
2423 $a_par_type,
"active_".$c,
true))
2426 if ($aset->get(
"use_physical"))
2428 $cc_code = str_replace(array(
"str",
"emp",
"imp"), array(
"B",
"I",
"U"), $cc_code);
2431 if ($c !=
"tex" || $jsMathSetting->get(
"enable") || defined(
"URL_TO_LATEX"))
2433 $btpl->setCurrentBlock(
"bb_".$c.
"_button");
2434 $btpl->setVariable(
"CC_".strtoupper($c), $cc_code);
2435 $btpl->parseCurrentBlock();
2437 $lng->txt(
"cont_cc_".$c),
2445 if ($jsMathSetting->get(
"enable") || defined(
"URL_TO_LATEX"))
2455 $btpl->setCurrentBlock(
"save_return");
2456 $btpl->setVariable(
"TXT_SAVE_RETURN", $lng->txt(
"save_return"));
2457 $btpl->parseCurrentBlock();
2462 $btpl->setCurrentBlock(
"bb_anc_button");
2463 $btpl->setVariable(
"CC_ANC",
"anc");
2464 $btpl->parseCurrentBlock();
2476 $btpl->setVariable(
"TXT_SAVE", $lng->txt(
"save"));
2477 $btpl->setVariable(
"TXT_CANCEL", $lng->txt(
"cancel"));
2479 $btpl->setVariable(
"TXT_CHAR_FORMAT", $lng->txt(
"cont_char_format"));
2480 $btpl->setVariable(
"TXT_LISTS", $lng->txt(
"cont_lists"));
2481 $btpl->setVariable(
"TXT_LINKS", $lng->txt(
"cont_links"));
2482 $btpl->setVariable(
"TXT_MORE_FUNCTIONS", $lng->txt(
"cont_more_functions"));
2483 $btpl->setVariable(
"TXT_SAVING", $lng->txt(
"cont_saving"));
2485 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2488 $lng->txt(
"cont_more_character_styles"),
"iltinymenu_bd");
2490 return $btpl->get();
2502 $link_info =
"<IntLinkInfos>";
2503 $targetframe =
"None";
2504 foreach ($int_links as $int_link)
2506 $target = $int_link[
"Target"];
2507 if (substr($target, 0, 4) ==
"il__")
2511 $type = $int_link[
"Type"];
2513 $targetframe = ($int_link[
"TargetFrame"] !=
"")
2514 ? $int_link[
"TargetFrame"]
2518 if ($targetframe !=
"None")
2524 $anc = $anc_add =
"";
2525 if ($int_link[
"Anchor"] !=
"")
2527 $anc = $int_link[
"Anchor"];
2528 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
2535 case "StructureObject":
2537 if ($type ==
"PageObject")
2539 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
2543 $href =
"./goto.php?target=st_".$target_id;
2547 case "GlossaryItem":
2548 if ($targetframe ==
"None")
2550 $targetframe =
"Glossary";
2552 $href =
"./goto.php?target=git_".$target_id;
2556 $ilCtrl->setParameter($this,
"mob_id",
$target_id);
2558 $href = $ilCtrl->getLinkTarget($this,
"displayMedia");
2559 $ilCtrl->setParameter($this,
"mob_id",
"");
2562 case "RepositoryItem":
2565 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
2570 $anc_par =
'Anchor="'.$anc.
'"';
2571 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".$anc_par.
" ".
2572 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
2575 $link_info.=
"</IntLinkInfos>";
2584 $this->obj->buildDom();
2585 $files = $this->obj->collectFileItems();
2588 require_once(
"./Modules/File/classes/class.ilObjFile.php");
2592 if (!in_array($file_id,
$files))
2596 $fileObj =&
new ilObjFile($file_id,
false);
2597 $fileObj->sendFile();
2614 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
2615 $tpl->setCurrentBlock(
"ilMedia");
2623 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2625 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2627 $pg_obj->buildDom();
2629 if (!empty (
$_GET[
"pg_id"]))
2632 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2646 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2647 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2653 $mode =
"fullscreen";
2660 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2661 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
2662 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
2663 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
2669 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2672 $tpl->setVariable(
"MEDIA_CONTENT", $output);
2683 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
2692 $start = strpos($a_html,
"[[[[[Map;");
2695 $end = strpos($a_html,
"]]]]]", $start);
2700 $param = substr($a_html, $start + 9, $end - $start - 9);
2702 $param = explode(
";", $param);
2703 if (is_numeric($param[0]) && is_numeric($param[1]) && is_numeric($param[2]))
2705 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
2707 $map_gui->setMapId(
"map_".$i);
2708 $map_gui->setLatitude($param[0]);
2709 $map_gui->setLongitude($param[1]);
2710 $map_gui->setZoom($param[2]);
2711 $map_gui->setWidth($param[3].
"px");
2712 $map_gui->setHeight($param[4].
"px");
2713 $map_gui->setEnableTypeControl(
true);
2714 $map_gui->setEnableNavigationControl(
true);
2715 $map_gui->setEnableCentralMarker(
true);
2716 $h2 = substr($a_html, 0, $start).
2717 $map_gui->getHtml().
2718 substr($a_html, $end + 5);
2722 $start = strpos($a_html,
"[[[[[Map;", $start + 5);
2726 $end = strpos($a_html,
"]]]]]", $start);
2741 $start = strpos($a_html,
"{{{{{ContentInclude;");
2744 $end = strpos($a_html,
"}}}}}", $start);
2749 $param = substr($a_html, $start + 20, $end - $start - 20);
2750 $param = explode(
";", $param);
2752 if ($param[0] ==
"mep" && is_numeric($param[1]) && $param[2] <= 0)
2754 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
2770 $html = $page_gui->getRawContent();
2776 $html =
"// ".$lng->txt(
"cont_missing_snippet").
" //";
2779 $h2 = substr($a_html, 0, $start).
2781 substr($a_html, $end + 5);
2785 $start = strpos($a_html,
"{{{{{ContentInclude;", $start + 5);
2789 $end = strpos($a_html,
"}}}}}", $start);
2805 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2809 $page_heads = array();
2810 foreach ($offsets as $os)
2812 $level = (int) substr($a_output, $os + 10, 1);
2813 if (in_array($level, array(1,2,3)))
2815 $anchor = str_replace(
"TocH",
"TocA",
2816 substr($a_output, $os, strpos($a_output,
"<", $os) - $os - 3)
2820 $tag_start = stripos($a_output,
"<h".$level.
" ", $os);
2821 $tag_end = stripos($a_output,
"</h".$level.
">", $tag_start);
2822 $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2825 $text_start = stripos($head,
">") + 1;
2826 $text_end = strripos($head,
"<!--", $text_start);
2827 $text = substr($head, $text_start, $text_end - $text_start);
2828 $page_heads[] = array(
"level" => $level,
"text" => $text,
2829 "anchor" => $anchor);
2833 if (count($page_heads) > 1)
2835 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
2837 $list->setAutoNumbering(
true);
2838 $list->setListClass(
"ilc_page_toc_PageTOCList");
2839 $list->setItemClass(
"ilc_page_toc_PageTOCItem");
2847 foreach ($page_heads as $ind => $h)
2854 if ($h[
"level"] == 2 && $c_par[1] > 0)
2858 if ($h[
"level"] == 3 && $c_par[2] > 0)
2863 $h[
"text"] = str_replace(
"<!--PageTocPH-->",
"", $h[
"text"]);
2867 "<a href='#".$h[
"anchor"].
"' class='ilc_page_toc_PageTOCLink'>".$h[
"text"].
"</a>",
2871 if ($h[
"level"] == 1)
2876 if ($h[
"level"] == 2)
2884 $tpl->setVariable(
"PAGE_TOC", $list->getHTML());
2885 $tpl->setVariable(
"TXT_PAGE_TOC", $lng->txt(
"cont_page_toc"));
2886 $tpl->setVariable(
"TXT_HIDE", $lng->txt(
"hide"));
2887 $tpl->setVariable(
"TXT_SHOW", $lng->txt(
"show"));
2889 $a_output = str_replace(
"{{{{{PageTOC}}}}}",
2890 $tpl->get(), $a_output);
2891 $numbers = $list->getNumbers();
2893 if (count($numbers) > 0)
2895 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2896 foreach ($numbers as
$n)
2905 $a_output = str_replace(
"{{{{{PageTOC}}}}}",
2928 $a_tpl->setCurrentBlock(
"help_img");
2930 $a_tpl->parseCurrentBlock();
2931 $a_tpl->setCurrentBlock(
"help_item");
2932 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_add_elements"));
2933 $a_tpl->parseCurrentBlock();
2935 $a_tpl->setCurrentBlock(
"help_img");
2937 $a_tpl->parseCurrentBlock();
2938 $a_tpl->setCurrentBlock(
"help_img");
2940 $a_tpl->parseCurrentBlock();
2941 $a_tpl->setCurrentBlock(
"help_item");
2942 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_drag_and_drop_elements"));
2943 $a_tpl->parseCurrentBlock();
2945 $a_tpl->setCurrentBlock(
"help_img");
2947 $a_tpl->parseCurrentBlock();
2948 $a_tpl->setCurrentBlock(
"help_item");
2949 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_double_click_to_delete"));
2950 $a_tpl->parseCurrentBlock();
2952 $a_tpl->setCurrentBlock(
"help");
2953 $a_tpl->parseCurrentBlock();
2976 $ilCtrl->redirect($this,
"preview");
2985 $html.=
"<br /><br />".$this->getNotesHTML();
3003 $html = $this->
edit();
3005 $tpl->addOnLoadCode(
"ilCOPage.insertJSAtPlaceholder('".
3035 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
3036 $this->tpl->setCurrentBlock(
"ContentStyle");
3037 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
3038 $this->tpl->parseCurrentBlock();
3042 $this->tpl->setCurrentBlock(
"ilMedia");
3044 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3046 if (!empty (
$_GET[
"pg_id"]))
3048 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
3055 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
3069 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
3070 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
3078 $mode =
"fullscreen";
3079 $params = array (
'mode' => $mode,
'webspace_path' => $wb_path);
3080 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
3085 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
3095 if(is_array($a_error))
3097 $error_str =
"<b>Validation Error(s):</b><br>";
3098 foreach ($a_error as $error)
3100 $err_mess = implode($error,
" - ");
3101 if (!is_int(strpos($err_mess,
":0:")))
3103 $error_str .= htmlentities($err_mess).
"<br />";
3106 $this->tpl->setVariable(
"MESSAGE", $error_str);
3122 $tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
3124 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
3126 $table_gui->setId(
"hist_table");
3128 $entries[] = array(
'page_id' => $this->
getPageObject()->getId(),
3133 'sortkey' => 999999,
3135 $table_gui->setData($entries);
3136 return $table_gui->getHTML();
3151 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3155 $ilCtrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
3156 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"rollback"));
3157 $c_gui->setHeaderText($lng->txt(
"cont_rollback_confirmation"));
3158 $c_gui->setCancel($lng->txt(
"cancel"),
"history");
3159 $c_gui->setConfirm($lng->txt(
"confirm"),
"rollback");
3161 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
3163 $c_gui->addItem(
"id[]",
$_GET[
"old_nr"],
3166 $tpl->setContent($c_gui->getHTML());
3181 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
3183 if ($hentry[
"content"] !=
"")
3185 $this->obj->setXMLContent($hentry[
"content"]);
3186 $this->obj->buildDom(
true);
3187 if ($this->obj->update())
3189 $ilCtrl->redirect($this,
"history");
3192 $ilCtrl->redirect($this,
"history");
3214 $ilTabs->addTarget(
"pg", $ilCtrl->getLinkTarget($this,
"preview")
3215 , array(
"",
"preview"));
3219 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
3220 , array(
"",
"edit"));
3227 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
3228 , array(
"",
"edit"));
3231 $ilTabs->addTarget(
"cont_preview", $ilCtrl->getLinkTarget($this,
"preview")
3232 , array(
"",
"preview"));
3238 if ($this->use_meta_data && !$this->layout_mode)
3240 $ilTabs->addTarget(
"meta_data",
3241 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
3242 "",
"ilmdeditorgui");
3248 $lm_set->get(
"page_history", 1))
3250 $ilTabs->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history")
3251 ,
"history", get_class($this));
3263 $ilTabs->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(
"ilEditClipboardGUI",
"view")
3264 ,
"view",
"ilEditClipboardGUI");
3269 $ilTabs->addTarget(
"cont_activation", $this->ctrl->getLinkTarget($this,
"editActivation"),
3270 "editActivation", get_class($this));
3275 $ilTabs->addTarget(
"news",
3276 $this->ctrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
3277 "",
"ilnewsitemgui");
3281 if (is_array($this->tab_hook))
3283 $func = $this->tab_hook[
"func"];
3284 $this->tab_hook[
"obj"]->$func();
3301 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
3302 $compare = $this->obj->compareVersion(
$_POST[
"left"],
$_POST[
"right"]);
3305 $lpage = $compare[
"l_page"];
3308 $lpage_gui->setPageObject($lpage);
3309 $lpage_gui->setPreventHTMLUnmasking(
true);
3311 $lpage_gui->setCompareMode(
true);
3312 $lhtml = $lpage_gui->showPage();
3314 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
3315 $tpl->setVariable(
"LEFT", $lhtml);
3318 $rpage = $compare[
"r_page"];
3321 $rpage_gui->setPageObject($rpage);
3322 $rpage_gui->setPreventHTMLUnmasking(
true);
3324 $rpage_gui->setCompareMode(
true);
3325 $rhtml = $rpage_gui->showPage();
3327 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
3328 $tpl->setVariable(
"RIGHT", $rhtml);
3330 $tpl->setVariable(
"TXT_NEW", $lng->txt(
"cont_pc_new"));
3331 $tpl->setVariable(
"TXT_MODIFIED", $lng->txt(
"cont_pc_modified"));
3332 $tpl->setVariable(
"TXT_DELETED", $lng->txt(
"cont_pc_deleted"));
3342 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
3343 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
3344 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
3345 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
3357 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
3360 $atpl->setVariable(
"FORM", $this->form->getHTML());
3361 $atpl->setCurrentBlock(
"updater");
3362 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
3363 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
3364 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
3365 $atpl->parseCurrentBlock();
3366 $tpl->setContent($atpl->get());
3376 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3378 $this->form->setFormAction($ilCtrl->getFormAction($this));
3379 $this->form->setTitle($lng->txt(
"cont_page_activation"));
3383 $rad_op1 =
new ilRadioOption($lng->txt(
"cont_activated"),
"activated");
3385 $rad->addOption($rad_op1);
3386 $rad_op2 =
new ilRadioOption($lng->txt(
"cont_deactivated"),
"deactivated");
3387 $rad->addOption($rad_op2);
3388 $rad_op3 =
new ilRadioOption($lng->txt(
"cont_scheduled_activation"),
"scheduled");
3391 $dt_prop->setShowTime(
true);
3395 $rad_op3->addSubItem($dt_prop2);
3397 $rad->addOption($rad_op3);
3399 $this->form->addCommandButton(
"saveActivation", $lng->txt(
"save"));
3401 $this->form->addItem($rad);
3410 $values[
"activation"] =
"deactivated";
3413 $values[
"activation"] =
"activated";
3416 $dt_prop = $this->form->getItemByPostVar(
"start");
3419 $values[
"activation"] =
"scheduled";
3423 $dt_prop = $this->form->getItemByPostVar(
"end");
3426 $values[
"activation"] =
"scheduled";
3431 $this->form->setValuesByArray($values);
3443 if ($this->form->checkInput())
3448 if (
$_POST[
"activation"] ==
"deactivated")
3452 if (
$_POST[
"activation"] ==
"scheduled")
3456 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME));
3458 $this->form->getItemByPostVar(
"end")->getDate()->get(
IL_CAL_DATETIME));
3462 $ilCtrl->redirect($this,
"editActivation");
3464 $this->form->getValuesByPost();
3465 $tpl->setContent($this->form->getHTML());
3477 function getNotesHTML($a_content_object = null, $a_enable_private_notes =
true, $a_enable_public_notes =
false, $a_enable_notes_deletion =
false, $a_callback = null)
3481 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
3484 if(!$a_content_object)
3486 $notes_gui =
new ilNoteGUI($this->notes_parent_id,
3487 (
int)$this->obj->getId(),
"pg");
3489 $a_enable_private_notes =
true;
3490 $a_enable_public_notes =
true;
3491 $a_enable_notes_deletion =
false;
3496 $notes_gui =
new ilNoteGUI($a_content_object->getParentId(),
3497 $a_content_object->getId(), $a_content_object->getParentType());
3500 if($a_enable_private_notes)
3504 if ($a_enable_public_notes)
3506 $notes_gui->enablePublicNotes();
3507 if ((
bool)$a_enable_notes_deletion)
3509 $notes_gui->enablePublicNotesDeletion(
true);
3515 $notes_gui->addObserver($a_callback);
3518 $next_class = $this->ctrl->getNextClass($this);
3519 if ($next_class ==
"ilnotegui")
3521 $html = $this->ctrl->forwardCommand($notes_gui);
3525 $html = $notes_gui->getNotesHTML();
3535 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
3538 if (count($q_ids) > 0)
3540 foreach ($q_ids as $q_id)
3543 $js[$q_id] = $q_exporter->exportQuestion($q_id);
3566 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
3569 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/pure.js");
3570 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/question_handling.js");
3571 $tpl->addCss(
"./Modules/Scorm2004/templates/default/question_handling.css");
3575 $tpl->addJavaScript(
"./Services/COPage/js/ilCOPageQuestionHandler.js");
3576 $url = $ilCtrl->getLinkTarget($this,
"processAnswer",
"",
true,
false);
3577 $tpl->addOnloadCode(
"ilCOPageQuestionHandler.initCallback('".$url.
"');");
3595 $a_tpl->addOnloadCode(self::getJSTextInitCode($a_lang).
3596 'ilCOPagePres.updateQuestionOverviews();
3608 global
$lng, $ilUser;
3612 $a_lang = $ilUser->getLanguage();
3617 ilias.questions.txt.wrong_answers = "'.$lng->txtlng(
"content",
"cont_wrong_answers", $a_lang).
'";
3618 ilias.questions.txt.wrong_answers_single = "'.$lng->txtlng(
"content",
"cont_wrong_answers_single", $a_lang).
'";
3619 ilias.questions.txt.tries_remaining = "'.$lng->txtlng(
"content",
"cont_tries_remaining", $a_lang).
'";
3620 ilias.questions.txt.please_try_again = "'.$lng->txtlng(
"content",
"cont_please_try_again", $a_lang).
'";
3621 ilias.questions.txt.all_answers_correct = "'.$lng->txtlng(
"content",
"cont_all_answers_correct", $a_lang).
'";
3622 ilias.questions.txt.nr_of_tries_exceeded = "'.$lng->txtlng(
"content",
"cont_nr_of_tries_exceeded", $a_lang).
'";
3623 ilias.questions.txt.correct_answers_shown = "'.$lng->txtlng(
"content",
"cont_correct_answers_shown", $a_lang).
'";
3624 ilias.questions.txt.correct_answers_also = "'.$lng->txtlng(
"content",
"cont_correct_answers_also", $a_lang).
'";
3625 ilias.questions.txt.correct_answer_also = "'.$lng->txtlng(
"content",
"cont_correct_answer_also", $a_lang).
'";
3626 ilias.questions.txt.ov_all_correct = "'.$lng->txtlng(
"content",
"cont_ov_all_correct", $a_lang).
'";
3627 ilias.questions.txt.ov_some_correct = "'.$lng->txtlng(
"content",
"cont_ov_some_correct", $a_lang).
'";
3628 ilias.questions.txt.ov_wrong_answered = "'.$lng->txtlng(
"content",
"cont_ov_wrong_answered", $a_lang).
'";
3647 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
3664 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
3665 $a_output =
"<script>var ScormApi=null;".ilQuestionExporter::questionsJS().
"</script>".$a_output;