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");
80 if ($a_old_nr == 0 &&
$_GET[
"old_nr"] > 0)
82 $a_old_nr =
$_GET[
"old_nr"];
100 include_once(
"./Services/COPage/classes/class.ilPageConfig.php");
108 $this->output2template =
true;
109 $this->question_xml =
"";
110 $this->question_html =
"";
111 $this->tabs_gui =& $ilTabs;
114 $this->template_output_var =
"PAGE_CONTENT";
115 $this->citation =
false;
116 $this->change_comments =
false;
117 $this->page_back_title = $this->lng->txt(
"page");
118 $lng->loadLanguageModule(
"content");
132 $this->page_config = $a_val;
147 $page =
new ilPageObject($a_parent_type, $a_id, $a_old_nr);
157 $this->bib_id = $a_id;
165 return $this->bib_id ? $this->bib_id : 0;
175 $this->obj = $a_pg_obj;
195 $this->output_mode = $a_mode;
205 $this->output2template = $a_output;
215 $this->presentation_title = $a_title;
225 $this->header = $a_title;
230 return $this->header;
235 $this->link_params = $l_params;
245 $this->link_frame = $l_frame;
250 return $this->link_frame;
255 $this->link_xml = $link_xml;
256 $this->link_xml_set =
true;
261 return $this->link_xml;
266 $this->question_xml = $question_xml;
276 return $this->question_xml;
286 $this->target_var = $a_variable;
297 $this->template_output_var = $a_value;
308 $this->output_submode = $a_mode;
327 $this->citation = $a_enabled;
337 $this->locator =& $a_locator;
342 $this->tabs_gui = $a_tabs;
347 $this->page_back_title = $a_title;
352 $this->file_download_link = $a_download_link;
357 return $this->file_download_link;
362 $this->fullscreen_link = $a_fullscreen_link;
367 return $this->fullscreen_link;
377 $this->enable_keywords = $a_val;
397 $this->enable_anchors = $a_val;
412 $this->int_link_def_type = $a_type;
413 $this->int_link_def_id = $a_id;
418 $this->int_link_return = $a_return;
423 $this->change_comments = $a_enabled;
433 $this->notes_enabled = $a_enabled;
434 $this->notes_parent_id = $a_parent_id;
439 return $this->notes_enabled;
447 $this->enablecontentincludes = $a_enable;
455 return $this->enablecontentincludes;
464 $this->offline_directory = $offdir;
473 return $this->offline_directory;
485 $this->view_page_link = $a_link;
486 $this->view_page_target = $a_target;
494 return $this->view_page_link;
502 return $this->view_page_target;
507 $this->act_obj =& $a_obj;
508 $this->act_meth = $a_meth;
513 $this->activation = $a_act;
523 $this->scheduled_activation = $a_act;
528 return $this->scheduled_activation;
538 $this->enabled_news = $a_enabled;
539 $this->news_obj_id = $a_news_obj_id;
540 $this->news_obj_type = $a_news_obj_type;
550 return $this->enabled_news;
558 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
569 $this->enabledinternallinks = $a_enabledinternallinks;
589 $this->editpreview = $a_editpreview;
609 $this->preventhtmlunmasking = $a_preventhtmlunmasking;
619 return $this->preventhtmlunmasking;
629 $this->enabledtabs = $a_enabledtabs;
649 $this->enabledrepositoryobjects = $a_enabledrepositoryobjects;
659 return $this->enabledrepositoryobjects;
669 $this->enabledmaps = $a_enabledmaps;
679 return $this->enabledmaps;
689 $this->enabledpctabs = $a_enabledpctabs;
709 $this->enabledfilelists = $a_enabledfilelists;
719 return $this->enabledfilelists;
729 $this->enabledpagefocus = $a_enabledpagefocus;
739 return $this->enabledpagefocus;
749 $this->exp_frame = $a_exp_frame;
750 $this->exp_id = $a_exp_id;
751 $this->exp_target_script = $a_exp_target_script;
761 $this->prependinghtml = $a_prependinghtml;
771 return $this->prependinghtml;
781 $this->enablewikilinks = $a_enablewikilinks;
791 return $this->enablewikilinks;
801 $this->enableediting = $a_enableediting;
821 $this->rawpagecontent = $a_rawpagecontent;
841 $this->layout_mode = $a_layout_mode;
851 return $this->layout_mode;
861 $this->styleid = $a_styleid;
871 return $this->styleid;
881 $this->enabledselfassessment = $a_enabledselfassessment;
882 $this->enabledselfassessment_scorm = $a_scorm;
893 return $this->enabledselfassessment;
903 return $this->enabledselfassessment_scorm;
913 $this->compare_mode = $a_val;
936 $a_observer_obj = NULL, $a_observer_func =
"")
938 $this->use_meta_data =
true;
939 $this->meta_data_rep_obj_id = $a_rep_obj_id;
940 $this->meta_data_sub_obj_id = $a_sub_obj_id;
941 $this->meta_data_type = $a_type;
942 $this->meta_data_observer_obj = $a_observer_obj;
943 $this->meta_data_observer_func = $a_observer_func;
958 $file_download_link = $ilCtrl->getLinkTarget($this,
"downloadFile");
960 return $file_download_link;
975 $fullscreen_link = $ilCtrl->getLinkTarget($this,
"displayMediaFullscreen",
"",
false,
false);
977 return $fullscreen_link;
990 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline")
992 $l = $ilCtrl->getLinkTarget($this,
"");
1005 global $ilPluginAdmin;
1009 foreach ($pl_names as $pl_name)
1012 "COPage",
"pgcp", $pl_name);
1013 if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
1015 $xml =
'<ComponentPlugin Name="'.$plugin->getPluginName().
1022 $xml =
"<ComponentPlugins>".$xml.
"</ComponentPlugins>";
1036 $next_class = $this->ctrl->getNextClass($this);
1038 $cmd = $this->ctrl->getCmd();
1043 $ilCtrl->setReturn($this,
"edit");
1047 case 'ilmdeditorgui':
1049 $ilTabs->setTabActive(
"meta_data");
1050 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
1052 $this->meta_data_sub_obj_id, $this->meta_data_type);
1053 if (is_object($this->meta_data_observer_obj))
1055 $md_gui->addObserver($this->meta_data_observer_obj,
1056 $this->meta_data_observer_func,
"General");
1058 $this->ctrl->forwardCommand($md_gui);
1061 case "ileditclipboardgui":
1065 $clip_gui->setPageBackTitle($this->page_back_title);
1067 $ret =& $this->ctrl->forwardCommand($clip_gui);
1072 switch(
$_GET[
"notes_mode"])
1075 $html = $this->
edit();
1076 $ilTabs->setTabActive(
"edit");
1081 case 'ilpublicuserprofilegui':
1082 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1084 $ret = $this->ctrl->forwardCommand($profile_gui);
1087 case "ilpageeditorgui":
1091 $ilCtrl->redirect($this,
"preview");
1094 $page_editor->setLocator($this->locator);
1095 $page_editor->setHeader($this->
getHeader());
1096 $page_editor->setPageBackTitle($this->page_back_title);
1100 $page_editor->setIntLinkHelpDefault($this->int_link_def_type,
1101 $this->int_link_def_id);
1102 $page_editor->setIntLinkReturn($this->int_link_return);
1104 $ret =& $this->ctrl->forwardCommand($page_editor);
1107 case 'ilnewsitemgui':
1108 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
1110 $news_item_gui->setEnableEdit(
true);
1111 $news_item_gui->setContextObjId($this->news_obj_id);
1112 $news_item_gui->setContextObjType($this->news_obj_type);
1113 $news_item_gui->setContextSubObjId($this->obj->getId());
1114 $news_item_gui->setContextSubObjType(
"pg");
1116 $ret = $ilCtrl->forwardCommand($news_item_gui);
1120 $ret = $this->ctrl->forwardCommand($profile_gui);
1124 $cmd = $this->ctrl->getCmd(
"preview");
1138 $this->ctrl->redirectByClass(
"ilpageobjectgui",
"edit");
1147 $this->ctrl->redirectByClass(
"ilpageobjectgui",
"edit");
1157 $ilBench->start(
"ContentPresentation",
"ilPageObjectGUI_showPage");
1167 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1171 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1176 $tpl->setCurrentBlock(
"change_comment");
1177 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1178 $tpl->parseCurrentBlock();
1179 $tpl->setCurrentBlock(
"adm_content");
1183 if ($this->exp_frame !=
"")
1185 $tpl->setCurrentBlock(
"updater");
1186 $tpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
1187 $tpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
1188 $tpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
1189 $tpl->parseCurrentBlock();
1197 $tpl->setVariable(
"WYSIWYG_ACTION",
1198 $ilCtrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true));
1202 $tpl->setVariable(
"TXT_JAVA_SCRIPT_CAPABLE",
"<br />".$this->lng->txt(
"cont_browser_not_js_capable"));
1204 $tpl->setVariable(
"TXT_CHANGE_EDIT_MODE", $this->lng->txt(
"cont_set_edit_mode"));
1208 $tpl->setCurrentBlock(
"de_activate_page");
1211 $tpl->setVariable(
"TXT_DE_ACTIVATE_PAGE", $this->lng->txt(
"cont_deactivate_page"));
1212 $tpl->setVariable(
"CMD_DE_ACTIVATE_PAGE",
"deactivatePage");
1216 $tpl->setVariable(
"TXT_DE_ACTIVATE_PAGE", $this->lng->txt(
"cont_activate_page"));
1217 $tpl->setVariable(
"CMD_DE_ACTIVATE_PAGE",
"activatePage");
1219 $tpl->parseCurrentBlock();
1222 $med_mode = array(
"enable" => $this->lng->txt(
"cont_enable_media"),
1223 "disable" => $this->lng->txt(
"cont_disable_media"));
1224 $sel_media_mode = ($ilUser->getPref(
"ilPageEditor_MediaMode") ==
"disable")
1228 $js_mode = array(
"enable" => $this->lng->txt(
"cont_enable_js"),
1229 "disable" => $this->lng->txt(
"cont_disable_js"));
1231 $tpl->setVariable(
"SEL_MEDIA_MODE",
1233 0,
"ilEditSelect"));
1236 $html_mode = array(
"enable" => $this->lng->txt(
"cont_enable_html"),
1237 "disable" => $this->lng->txt(
"cont_disable_html"));
1238 $sel_html_mode = ($ilUser->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
1243 $tpl->setVariable(
"SEL_HTML_MODE",
1245 0,
"ilEditSelect"));
1249 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $lng->txt(
"cont_confirm_delete"));
1253 $tpl->setCurrentBlock(
"view_link");
1254 $tpl->setVariable(
"LINK_VIEW_PAGE",
1256 $tpl->setVariable(
"TARGET_VIEW_PAGE",
1258 $tpl->setVariable(
"TXT_VIEW_PAGE", $this->lng->txt(
"view"));
1259 $tpl->parseCurrentBlock();
1263 $sel_js_mode =
"disable";
1264 if($ilSetting->get(
"enable_js_edit", 1))
1272 if ($sel_js_mode ==
"enable")
1275 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1278 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
1280 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilpageedit.js");
1282 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing.js");
1283 $tpl->touchBlock(
"init_dragging");
1286 if($ilias->getSetting(
"enable_js_edit"))
1288 $tpl->setVariable(
"SEL_JAVA_SCRIPT",
1290 0,
"ilEditSelect"));
1294 $tpl->setCurrentBlock(
"multi_actions");
1295 if ($sel_js_mode ==
"enable")
1297 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1298 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1299 $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC",
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
1300 $tpl->setVariable(
"ONCLICK_COPY_SELECTED",
'onclick="return ilEditMultiAction(\'copySelected\');"');
1301 $tpl->setVariable(
"ONCLICK_CUT_SELECTED",
'onclick="return ilEditMultiAction(\'cutSelected\');"');
1303 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1304 $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
1305 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1306 $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
1307 $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
1309 $tpl->parseCurrentBlock();
1315 $tpl =
new ilTemplate(
"tpl.page_translation_content.html",
true,
true,
"Services/COPage");
1322 $tpl =
new ilTemplate(
"tpl.page_content.html",
true,
true,
"Services/COPage");
1325 $tpl->touchBlock(
"page_focus");
1330 $tpl =
new ilTemplate(
"tpl.page_preview.html",
true,
true,
"Services/COPage");
1331 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1342 if (is_array($hist_info[
"previous"]))
1344 $tpl->setCurrentBlock(
"previous_rev");
1345 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1346 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1347 $tpl->setVariable(
"HREF_PREV",
1348 $ilCtrl->getLinkTarget($this,
"preview"));
1349 $tpl->parseCurrentBlock();
1353 $tpl->setCurrentBlock(
"previous_rev_disabled");
1354 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1355 $tpl->parseCurrentBlock();
1359 $tpl->setCurrentBlock(
"next_rev");
1360 $tpl->setVariable(
"TXT_NEXT_REV", $lng->txt(
"cont_next_rev"));
1361 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1362 $tpl->setVariable(
"HREF_NEXT",
1363 $ilCtrl->getLinkTarget($this,
"preview"));
1364 $tpl->parseCurrentBlock();
1367 $tpl->setCurrentBlock(
"latest_rev");
1368 $tpl->setVariable(
"TXT_LATEST_REV", $lng->txt(
"cont_latest_rev"));
1369 $ilCtrl->setParameter($this,
"old_nr",
"");
1370 $tpl->setVariable(
"HREF_LATEST",
1371 $ilCtrl->getLinkTarget($this,
"preview"));
1372 $tpl->parseCurrentBlock();
1375 if ($c_old_nr > 0 && $ilUser->getId() != ANONYMOUS_USER_ID)
1377 $tpl->setCurrentBlock(
"rollback");
1378 $ilCtrl->setParameter($this,
"old_nr", $c_old_nr);
1379 $tpl->setVariable(
"HREF_ROLLBACK",
1380 $ilCtrl->getLinkTarget($this,
"rollbackConfirmation"));
1381 $ilCtrl->setParameter($this,
"old_nr",
"");
1382 $tpl->setVariable(
"TXT_ROLLBACK",
1383 $lng->txt(
"cont_rollback"));
1384 $tpl->parseCurrentBlock();
1388 $tpl->setCurrentBlock(
"hist_nav");
1389 $tpl->setVariable(
"TXT_REVISION", $lng->txt(
"cont_revision"));
1390 $tpl->setVariable(
"VAL_REVISION_DATE",
1392 $tpl->setVariable(
"VAL_REV_USER",
1394 $tpl->parseCurrentBlock();
1404 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1411 $this->obj->getId());
1412 $mob_links = array();
1413 foreach($links as $link)
1415 if ($link[
"type"] ==
"mob")
1425 if (count($mob_links) > 0)
1427 $tpl->setCurrentBlock(
"med_link");
1428 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1429 $tpl->setVariable(
"SEL_MED_LINKS",
1431 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1432 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1434 $tpl->parseCurrentBlock();
1438 $snippets = $this->
getPageObject()->collectContentIncludes();
1439 if (count($snippets) > 0)
1441 foreach ($snippets as $s)
1443 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1446 $tpl->setCurrentBlock(
"med_link");
1447 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1448 $tpl->setVariable(
"SEL_SNIPPETS",
1450 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1451 $tpl->parseCurrentBlock();
1459 $tpl->setCurrentBlock(
"activation_txt");
1460 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $lng->txt(
"cont_scheduled_activation"));
1461 $tpl->setVariable(
"SA_FROM",
1465 $tpl->setVariable(
"SA_TO",
1469 $tpl->parseCurrentBlock();
1473 if (
$_GET[
"reloadTree"] ==
"y")
1475 $tpl->setCurrentBlock(
"reload_tree");
1476 if ($this->obj->getParentType() ==
"dbk")
1478 $tpl->setVariable(
"LINK_TREE",
1479 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer",
"",
false,
false));
1483 $tpl->setVariable(
"LINK_TREE",
1484 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer",
"",
false,
false));
1486 $tpl->parseCurrentBlock();
1491 $builded = $this->obj->buildDom();
1498 if (!$this->obj->checkPCIds())
1500 $this->obj->insertPCIds();
1501 $this->obj->update(
true,
true);
1504 $this->obj->addFileSizes();
1505 $this->obj->addHierIDs();
1507 $hids = $this->obj->getHierIds();
1508 $row1_ids = $this->obj->getFirstRowIds();
1509 $col1_ids = $this->obj->getFirstColumnIds();
1510 $litem_ids = $this->obj->getListItemIds();
1511 $fitem_ids = $this->obj->getFileItemIds();
1514 $hids = $this->obj->getHierIds();
1515 foreach($hids as $hid)
1517 $tpl->setCurrentBlock(
"add_dhtml");
1518 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_".$hid);
1519 $tpl->parseCurrentBlock();
1523 foreach($col1_ids as $hid)
1525 $tpl->setCurrentBlock(
"add_dhtml");
1526 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r".$hid);
1527 $tpl->parseCurrentBlock();
1531 foreach($row1_ids as $hid)
1533 $tpl->setCurrentBlock(
"add_dhtml");
1534 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c".$hid);
1535 $tpl->parseCurrentBlock();
1539 foreach($litem_ids as $hid)
1541 $tpl->setCurrentBlock(
"add_dhtml");
1542 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1543 $tpl->parseCurrentBlock();
1547 foreach($fitem_ids as $hid)
1549 $tpl->setCurrentBlock(
"add_dhtml");
1550 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1551 $tpl->parseCurrentBlock();
1556 $this->obj->addFileSizes();
1563 if (!$this->link_xml_set)
1576 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1578 $template_xml = $style->getTemplateXML();
1579 $disable_auto_margins =
"n";
1580 if ($style->lookupStyleSetting(
"disable_auto_margins"))
1582 $disable_auto_margins =
"y";
1586 $content = $this->obj->getXMLFromDom(
false,
true,
true,
1587 $link_xml.$this->getQuestionXML().$template_xml);
1592 if($builded !==
true)
1605 session_unregister(
"citation_error");
1625 $enlarge_path =
"images/enlarge.gif";
1629 ?
"ilc_PrintPageTitle"
1634 $enable_split_new = ($this->obj->getParentType() ==
"lm" ||
1635 $this->obj->getParentType() ==
"dbk")
1641 if (($this->obj->getParentType() ==
"lm" ||
1642 $this->obj->getParentType() ==
"dbk") &&
1644 $this->obj->getId()))
1646 $enable_split_next =
"y";
1650 $enable_split_next =
"n";
1655 $paragraph_plugins->initialize ();
1659 $paragraph_plugin_string = $paragraph_plugins->serializeToString();
1660 $_SESSION [
"paragraph_plugins"] = $paragraph_plugins;
1672 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1684 ? $ilUser->getPref(
"ilPageEditor_MediaMode")
1687 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1692 $params = array (
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title,ENT_QUOTES,
"UTF-8"),
1693 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1694 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1695 'img_add' => $add_path,
1696 'img_col' => $col_path,
1697 'img_row' => $row_path,
1698 'img_item' => $item_path,
1699 'enable_split_new' => $enable_split_new,
1700 'enable_split_next' => $enable_split_next,
1702 'file_download_link' => $file_download_link,
1703 'fullscreen_link' => $fullscreen_link,
1704 'med_disabled_path' => $med_disabled_path,
1705 'img_path' => $img_path,
1706 'parent_id' => $this->obj->getParentId(),
1708 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1711 'pagebreak' => $this->lng->txt(
'dgl_pagebreak'),
1712 'page' => $this->lng->txt(
'page'),
1713 'citate_page' => $this->lng->txt(
'citate_page'),
1714 'citate_from' => $this->lng->txt(
'citate_from'),
1715 'citate_to' => $this->lng->txt(
'citate_to'),
1716 'citate' => $this->lng->txt(
'citate'),
1723 'paste' => $paste ?
"y" :
"n",
1724 'media_mode' => $media_mode,
1725 'javascript' => $sel_js_mode,
1726 'paragraph_plugins' => $paragraph_plugin_string,
1727 'disable_auto_margins' => $disable_auto_margins
1729 if($this->link_frame !=
"")
1730 $params[
"pg_frame"] = $this->link_frame;
1738 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1742 $md5 = md5(serialize($params).$link_xml.$template_xml);
1749 $md5 == $this->obj->getRenderMd5() &&
1750 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1751 $this->obj->getRenderedTime() !=
"" &&
1752 $this->obj->old_nr == 0)
1755 $output = $this->obj->getRenderedContent();
1760 $xsl = file_get_contents(
"./Services/COPage/xsl/page_layout.xsl");
1762 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1765 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1769 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", NULL, $args, $params);
1772 && $this->obj->old_nr == 0)
1775 $this->obj->writeRenderedContent($output, $md5);
1787 $ilUser->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
1790 $output = str_replace(
"<",
"<",$output);
1791 $output = str_replace(
">",
">",$output);
1793 $output = str_replace(
"&",
"&", $output);
1811 $output = str_replace(
"{",
"{", $output);
1812 $output = str_replace(
"}",
"}", $output);
1815 $output = str_replace(
"\n",
"", $output);
1819 if (is_array($qhtml))
1821 foreach ($qhtml as $k => $h)
1823 $output = str_replace(
"{{{{{Question;il__qst_$k}}}}}",
" ".$h, $output);
1832 $output =
'<div class="il_editarea_disabled">'.$output.
'</div>';
1836 $output = $this->obj->insertSourceCodeParagraphs($output, $this->
getOutputMode());
1838 $ilBench->stop(
"ContentPresentation",
"ilPageObjectGUI_showPage");
1843 if ($ilCtrl->isAsynch())
1850 $tpl->setCurrentBlock(
"adm_content");
1851 $tpl->parseCurrentBlock();
1852 echo
$tpl->get(
"adm_content");
1884 $link_info =
"<IntLinkInfos>";
1885 $targetframe =
"None";
1886 foreach ($int_links as $int_link)
1888 $target = $int_link[
"Target"];
1889 if (substr($target, 0, 4) ==
"il__")
1893 $type = $int_link[
"Type"];
1895 $targetframe = ($int_link[
"TargetFrame"] !=
"")
1896 ? $int_link[
"TargetFrame"]
1900 if ($targetframe !=
"None")
1906 $anc = $anc_add =
"";
1907 if ($int_link[
"Anchor"] !=
"")
1909 $anc = $int_link[
"Anchor"];
1910 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1917 case "StructureObject":
1919 if (
$type ==
"PageObject")
1921 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1925 $href =
"./goto.php?target=st_".$target_id;
1929 case "GlossaryItem":
1930 if ($targetframe ==
"None")
1932 $targetframe =
"Glossary";
1934 $href =
"./goto.php?target=git_".$target_id;
1938 $ilCtrl->setParameter($this,
"mob_id",
$target_id);
1940 $href = $ilCtrl->getLinkTarget($this,
"displayMedia");
1941 $ilCtrl->setParameter($this,
"mob_id",
"");
1944 case "RepositoryItem":
1947 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1952 $anc_par =
'Anchor="'.$anc.
'"';
1953 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".$anc_par.
" ".
1954 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
1957 $link_info.=
"</IntLinkInfos>";
1968 require_once(
"./Modules/File/classes/class.ilObjFile.php");
1970 $fileObj->sendFile();
1987 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
1988 $tpl->setCurrentBlock(
"ilMedia");
1996 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1998 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2000 $pg_obj->buildDom();
2002 if (!empty (
$_GET[
"pg_id"]))
2005 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2019 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2020 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2026 $mode =
"fullscreen";
2033 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2034 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
2035 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
2036 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
2042 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2045 $tpl->setVariable(
"MEDIA_CONTENT", $output);
2056 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
2065 $start = strpos($a_html,
"[[[[[Map;");
2068 $end = strpos($a_html,
"]]]]]", $start);
2073 $param = substr($a_html, $start + 9, $end - $start - 9);
2075 $param = explode(
";", $param);
2076 if (is_numeric($param[0]) && is_numeric($param[1]) && is_numeric($param[2]))
2078 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
2080 $map_gui->setMapId(
"map_".$i);
2081 $map_gui->setLatitude($param[0]);
2082 $map_gui->setLongitude($param[1]);
2083 $map_gui->setZoom($param[2]);
2084 $map_gui->setWidth($param[3].
"px");
2085 $map_gui->setHeight($param[4].
"px");
2086 $map_gui->setEnableTypeControl(
true);
2087 $map_gui->setEnableNavigationControl(
true);
2088 $map_gui->setEnableCentralMarker(
true);
2089 $h2 = substr($a_html, 0, $start).
2090 $map_gui->getHtml().
2091 substr($a_html, $end + 5);
2095 $start = strpos($a_html,
"[[[[[Map;", $start + 5);
2099 $end = strpos($a_html,
"]]]]]", $start);
2114 $start = strpos($a_html,
"{{{{{ContentInclude;");
2117 $end = strpos($a_html,
"}}}}}", $start);
2122 $param = substr($a_html, $start + 20, $end - $start - 20);
2123 $param = explode(
";", $param);
2125 if ($param[0] ==
"mep" && is_numeric($param[1]) && $param[2] <= 0)
2127 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
2143 $html = $page_gui->getRawContent();
2149 $h2 = substr($a_html, 0, $start).
2151 substr($a_html, $end + 5);
2155 $start = strpos($a_html,
"{{{{{ContentInclude;", $start + 5);
2159 $end = strpos($a_html,
"}}}}}", $start);
2181 $a_tpl->setCurrentBlock(
"help_img");
2183 $a_tpl->parseCurrentBlock();
2184 $a_tpl->setCurrentBlock(
"help_item");
2185 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_add_elements"));
2186 $a_tpl->parseCurrentBlock();
2188 $a_tpl->setCurrentBlock(
"help_img");
2190 $a_tpl->parseCurrentBlock();
2191 $a_tpl->setCurrentBlock(
"help_img");
2193 $a_tpl->parseCurrentBlock();
2194 $a_tpl->setCurrentBlock(
"help_item");
2195 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_drag_and_drop_elements"));
2196 $a_tpl->parseCurrentBlock();
2198 $a_tpl->setCurrentBlock(
"help_img");
2200 $a_tpl->parseCurrentBlock();
2201 $a_tpl->setCurrentBlock(
"help_item");
2202 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_double_click_to_delete"));
2203 $a_tpl->parseCurrentBlock();
2205 $a_tpl->setCurrentBlock(
"help");
2206 $a_tpl->parseCurrentBlock();
2229 $ilCtrl->redirect($this,
"preview");
2238 $html.=
"<br /><br />".$this->getNotesHTML($a_mode =
"");
2266 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
2267 $this->tpl->setCurrentBlock(
"ContentStyle");
2268 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
2269 $this->tpl->parseCurrentBlock();
2273 $this->tpl->setCurrentBlock(
"ilMedia");
2275 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2277 if (!empty (
$_GET[
"pg_id"]))
2279 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2286 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2300 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2301 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2309 $mode =
"fullscreen";
2310 $params = array (
'mode' => $mode,
'webspace_path' => $wb_path);
2311 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
2316 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
2326 if(is_array($a_error))
2328 $error_str =
"<b>Validation Error(s):</b><br>";
2329 foreach ($a_error as
$error)
2331 $err_mess = implode($error,
" - ");
2332 if (!is_int(strpos($err_mess,
":0:")))
2334 $error_str .= htmlentities($err_mess).
"<br />";
2337 $this->tpl->setVariable(
"MESSAGE", $error_str);
2348 $tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
2350 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
2352 $table_gui->setId(
"hist_table");
2354 $entries[] = array(
'page_id' => $this->
getPageObject()->getId(),
2359 'sortkey' => 999999,
2361 $table_gui->setData($entries);
2362 return $table_gui->getHTML();
2372 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
2376 $ilCtrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
2377 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"rollback"));
2378 $c_gui->setHeaderText($lng->txt(
"cont_rollback_confirmation"));
2379 $c_gui->setCancel($lng->txt(
"cancel"),
"history");
2380 $c_gui->setConfirm($lng->txt(
"confirm"),
"rollback");
2382 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
2384 $c_gui->addItem(
"id[]",
$_GET[
"old_nr"],
2387 $tpl->setContent($c_gui->getHTML());
2397 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
2399 if ($hentry[
"content"] !=
"")
2401 $this->obj->setXMLContent($hentry[
"content"]);
2402 $this->obj->buildDom(
true);
2403 if ($this->obj->update())
2405 $ilCtrl->redirect($this,
"history");
2408 $ilCtrl->redirect($this,
"history");
2430 $ilTabs->addTarget(
"pg", $ilCtrl->getLinkTarget($this,
"preview")
2431 , array(
"",
"preview"));
2435 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
2436 , array(
"",
"edit"));
2443 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
2444 , array(
"",
"edit"));
2447 $ilTabs->addTarget(
"cont_preview", $ilCtrl->getLinkTarget($this,
"preview")
2448 , array(
"",
"preview"));
2454 if ($this->use_meta_data && !$this->layout_mode)
2456 $ilTabs->addTarget(
"meta_data",
2457 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
2458 "",
"ilmdeditorgui");
2463 $ilTabs->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history")
2464 ,
"history", get_class($this));
2476 $ilTabs->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(
"ilEditClipboardGUI",
"view")
2477 ,
"view",
"ilEditClipboardGUI");
2482 $ilTabs->addTarget(
"cont_activation", $this->ctrl->getLinkTarget($this,
"editActivation"),
2483 "editActivation", get_class($this));
2488 $ilTabs->addTarget(
"news",
2489 $this->ctrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
2490 "",
"ilnewsitemgui");
2494 if (is_array($this->tab_hook))
2496 $func = $this->tab_hook[
"func"];
2497 $this->tab_hook[
"obj"]->$func();
2509 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
2510 $compare = $this->obj->compareVersion(
$_POST[
"left"],
$_POST[
"right"]);
2513 $lpage = $compare[
"l_page"];
2515 $lpage_gui->setPageObject($lpage);
2516 $lpage_gui->setPreventHTMLUnmasking(
true);
2518 $lpage_gui->setCompareMode(
true);
2519 $lhtml = $lpage_gui->showPage();
2521 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
2522 $tpl->setVariable(
"LEFT", $lhtml);
2525 $rpage = $compare[
"r_page"];
2527 $rpage_gui->setPageObject($rpage);
2528 $rpage_gui->setPreventHTMLUnmasking(
true);
2530 $rpage_gui->setCompareMode(
true);
2531 $rhtml = $rpage_gui->showPage();
2533 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
2534 $tpl->setVariable(
"RIGHT", $rhtml);
2536 $tpl->setVariable(
"TXT_NEW", $lng->txt(
"cont_pc_new"));
2537 $tpl->setVariable(
"TXT_MODIFIED", $lng->txt(
"cont_pc_modified"));
2538 $tpl->setVariable(
"TXT_DELETED", $lng->txt(
"cont_pc_deleted"));
2548 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
2549 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
2550 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
2551 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
2563 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
2566 $atpl->setVariable(
"FORM", $this->form->getHTML());
2567 $atpl->setCurrentBlock(
"updater");
2568 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
2569 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
2570 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
2571 $atpl->parseCurrentBlock();
2572 $tpl->setContent($atpl->get());
2582 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2584 $this->form->setFormAction($ilCtrl->getFormAction($this));
2585 $this->form->setTitle($lng->txt(
"cont_page_activation"));
2589 $rad_op1 =
new ilRadioOption($lng->txt(
"cont_activated"),
"activated");
2591 $rad->addOption($rad_op1);
2592 $rad_op2 =
new ilRadioOption($lng->txt(
"cont_deactivated"),
"deactivated");
2593 $rad->addOption($rad_op2);
2594 $rad_op3 =
new ilRadioOption($lng->txt(
"cont_scheduled_activation"),
"scheduled");
2597 $dt_prop->setShowTime(
true);
2601 $rad_op3->addSubItem($dt_prop2);
2603 $rad->addOption($rad_op3);
2605 $this->form->addCommandButton(
"saveActivation", $lng->txt(
"save"));
2607 $this->form->addItem($rad);
2616 $values[
"activation"] =
"deactivated";
2619 $values[
"activation"] =
"activated";
2622 $dt_prop = $this->form->getItemByPostVar(
"start");
2625 $values[
"activation"] =
"scheduled";
2629 $dt_prop = $this->form->getItemByPostVar(
"end");
2632 $values[
"activation"] =
"scheduled";
2637 $this->form->setValuesByArray($values);
2649 if ($this->form->checkInput())
2654 if (
$_POST[
"activation"] ==
"deactivated")
2658 if (
$_POST[
"activation"] ==
"scheduled")
2662 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME));
2664 $this->form->getItemByPostVar(
"end")->getDate()->get(
IL_CAL_DATETIME));
2668 $ilCtrl->redirect($this,
"editActivation");
2670 $this->form->getValuesByPost();
2671 $tpl->setContent($this->form->getHTML());
2682 $ilCtrl->setParameter($this,
"nodes_mode", $a_mode);
2683 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
2684 $notes_gui =
new ilNoteGUI($this->notes_parent_id,
2685 (
int) $this->obj->getId(),
"pg");
2691 $notes_gui->enablePublicNotes();
2693 $next_class = $ilCtrl->getNextClass($this);
2694 if ($next_class ==
"ilnotegui")
2696 $html = $this->ctrl->forwardCommand($notes_gui);
2700 $html = $notes_gui->getNotesHTML();
2710 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
2713 if (count($q_ids) > 0)
2715 foreach ($q_ids as $q_id)
2718 $js[$q_id] = $q_exporter->exportQuestion($q_id);
2736 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/jquery.js");
2737 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/jquery-ui-min.js");
2738 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/pure.js");
2739 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/question_handling.js");
2744 $tpl->addJavaScript(
"./Services/COPage/js/ilCOPageQuestionHandler.js");
2745 $url = $ilCtrl->getLinkTarget($this,
"processAnswer",
"",
true,
false);
2746 $tpl->addOnloadCode(
"ilCOPageQuestionHandler.initCallback('".$url.
"');");
2749 $tpl->addOnloadCode(
'
2750 ilias.questions.txt.wrong_answers = "'.$lng->txt(
"cont_wrong_answers").
'";
2751 ilias.questions.txt.tries_remaining = "'.$lng->txt(
"cont_tries_remaining").
'";
2752 ilias.questions.txt.please_try_again = "'.$lng->txt(
"cont_please_try_again").
'";
2753 ilias.questions.txt.all_answers_correct = "'.$lng->txt(
"cont_all_answers_correct").
'";
2754 ilias.questions.txt.nr_of_tries_exceeded = "'.$lng->txt(
"cont_nr_of_tries_exceeded").
'";
2755 ilias.questions.txt.correct_answers_shown = "'.$lng->txt(
"cont_correct_answers_shown").
'";
2773 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
2790 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
2791 $a_output =
"<script>var ScormApi=null;".ilQuestionExporter::questionsJS().
"</script>".$a_output;