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/Utilities/classes/class.ilDOMUtil.php");
79 $a_prevent_get_id =
false, $a_lang =
"")
85 if ($a_old_nr == 0 && !$a_prevent_get_id &&
$_GET[
"old_nr"] > 0)
87 $a_old_nr =
$_GET[
"old_nr"];
91 if ($a_lang ==
"" &&
$_GET[
"transl"] !=
"")
113 $this->output2template =
true;
114 $this->question_xml =
"";
115 $this->question_html =
"";
116 $this->tabs_gui =& $ilTabs;
118 $this->template_output_var =
"PAGE_CONTENT";
119 $this->citation =
false;
120 $this->change_comments =
false;
121 $this->page_back_title = $this->lng->txt(
"page");
122 $lng->loadLanguageModule(
"content");
126 $ilCtrl->saveParameter($this,
"transl");
144 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
157 $this->parent_type = $a_val;
197 $this->old_nr = $a_val;
207 return $this->old_nr;
217 $this->language = $a_val;
227 if ($this->language ==
"")
232 return $this->language;
262 $this->page_config = $a_val;
281 $this->bib_id = $a_id;
289 return $this->bib_id ? $this->bib_id : 0;
299 $this->obj = $a_pg_obj;
319 $this->output_mode = $a_mode;
329 $this->output2template = $a_output;
339 $this->presentation_title = $a_title;
349 $this->header = $a_title;
354 return $this->header;
359 $this->link_params = $l_params;
369 $this->link_frame = $l_frame;
374 return $this->link_frame;
379 $this->link_xml = $link_xml;
380 $this->link_xml_set =
true;
385 return $this->link_xml;
390 $this->question_xml = $question_xml;
400 return $this->question_xml;
410 $this->target_var = $a_variable;
420 $this->template_output_var = $a_value;
430 $this->sourcecode_download_script = $script_name;
439 $this->citation = $a_enabled;
449 $this->locator =& $a_locator;
454 $this->tabs_gui = $a_tabs;
459 $this->page_back_title = $a_title;
465 $this->file_download_link = $a_download_link;
470 return $this->file_download_link;
476 $this->fullscreen_link = $a_fullscreen_link;
481 return $this->fullscreen_link;
486 $this->int_link_return = $a_return;
491 $this->change_comments = $a_enabled;
501 $this->notes_enabled = $a_enabled;
502 $this->notes_parent_id = $a_parent_id;
507 return $this->notes_enabled;
516 $this->offline_directory = $offdir;
525 return $this->offline_directory;
537 $this->view_page_link = $a_link;
538 $this->view_page_target = $a_target;
546 return $this->view_page_link;
554 return $this->view_page_target;
559 $this->act_obj =& $a_obj;
560 $this->act_meth = $a_meth;
570 $this->enabled_news = $a_enabled;
571 $this->news_obj_id = $a_news_obj_id;
572 $this->news_obj_type = $a_news_obj_type;
582 return $this->enabled_news;
590 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
600 $this->editpreview = $a_editpreview;
620 $this->tabs_enabled = $a_enabledtabs;
640 $this->enabledpagefocus = $a_enabledpagefocus;
650 return $this->enabledpagefocus;
661 $this->exp_frame = $a_exp_frame;
662 $this->exp_id = $a_exp_id;
663 $this->exp_target_script = $a_exp_target_script;
673 $this->prependinghtml = $a_prependinghtml;
683 return $this->prependinghtml;
693 $this->enableediting = $a_enableediting;
713 $this->rawpagecontent = $a_rawpagecontent;
733 $this->styleid = $a_styleid;
743 return $this->styleid;
753 $this->compare_mode = $a_val;
773 $this->abstract_only = $a_val;
793 $this->render_page_container = $a_val;
816 $a_observer_obj = NULL, $a_observer_func =
"")
818 $this->use_meta_data =
true;
819 $this->meta_data_rep_obj_id = $a_rep_obj_id;
820 $this->meta_data_sub_obj_id = $a_sub_obj_id;
821 $this->meta_data_type = $a_type;
822 $this->meta_data_observer_obj = $a_observer_obj;
823 $this->meta_data_observer_func = $a_observer_func;
838 $file_download_link = $ilCtrl->getLinkTarget($this,
"downloadFile");
840 return $file_download_link;
855 $fullscreen_link = $ilCtrl->getLinkTarget($this,
"displayMediaFullscreen",
"",
false,
false);
857 return $fullscreen_link;
870 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline")
872 $l = $ilCtrl->getLinkTarget($this,
"");
885 global $ilPluginAdmin;
889 foreach ($pl_names as $pl_name)
892 "COPage",
"pgcp", $pl_name);
893 if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
895 $xml.=
'<ComponentPlugin Name="'.$plugin->getPluginName().
902 $xml =
"<ComponentPlugins>".$xml.
"</ComponentPlugins>";
915 $next_class = $this->ctrl->getNextClass($this);
917 $cmd = $this->ctrl->getCmd();
922 $ilCtrl->setReturn($this,
"edit");
926 case 'ilmdeditorgui':
928 $ilTabs->setTabActive(
"meta_data");
929 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
931 $this->meta_data_sub_obj_id, $this->meta_data_type);
932 if (is_object($this->meta_data_observer_obj))
934 $md_gui->addObserver($this->meta_data_observer_obj,
935 $this->meta_data_observer_func,
"General");
937 $this->ctrl->forwardCommand($md_gui);
940 case "ileditclipboardgui":
944 $clip_gui->setPageBackTitle($this->page_back_title);
946 $ret =& $this->ctrl->forwardCommand($clip_gui);
951 switch(
$_GET[
"notes_mode"])
954 $html = $this->
edit();
955 $ilTabs->setTabActive(
"edit");
960 case 'ilpublicuserprofilegui':
961 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
963 $ret = $this->ctrl->forwardCommand($profile_gui);
966 case "ilpageeditorgui":
970 $ilCtrl->redirect($this,
"preview");
973 $page_editor->setLocator($this->locator);
974 $page_editor->setHeader($this->
getHeader());
975 $page_editor->setPageBackTitle($this->page_back_title);
976 $page_editor->setIntLinkReturn($this->int_link_return);
978 $ret =& $this->ctrl->forwardCommand($page_editor);
981 case 'ilnewsitemgui':
982 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
984 $news_item_gui->setEnableEdit(
true);
985 $news_item_gui->setContextObjId($this->news_obj_id);
986 $news_item_gui->setContextObjType($this->news_obj_type);
987 $news_item_gui->setContextSubObjId($this->obj->getId());
988 $news_item_gui->setContextSubObjType(
"pg");
990 $ret = $ilCtrl->forwardCommand($news_item_gui);
994 $ret = $this->ctrl->forwardCommand($profile_gui);
997 case "ilpropertyformgui":
998 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1000 $this->ctrl->forwardCommand($form);
1003 case "ilinternallinkgui":
1004 $this->lng->loadLanguageModule(
"content");
1005 require_once(
"./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
1009 $link_gui->filterLinkType(
"PageObject_FAQ");
1010 $link_gui->filterLinkType(
"GlossaryItem");
1011 $link_gui->filterLinkType(
"Media_Media");
1012 $link_gui->filterLinkType(
"Media_FAQ");
1014 $link_gui->setFilterWhiteList(
true);
1015 $link_gui->setMode(
"asynch");
1016 $ilCtrl->forwardCommand($link_gui);
1019 case "ilquestioneditgui":
1020 include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionEditGUI.php");
1025 $edit_gui->setSelfAssessmentEditingMode(
true);
1026 $ret = $ilCtrl->forwardCommand($edit_gui);
1027 $this->tpl->setContent(
$ret);
1030 case 'ilassquestionfeedbackeditinggui':
1038 $lng->loadLanguageModule(
"assessment");
1041 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
1042 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
1044 $questionGUI->object->setObjId(0);
1045 $questionGUI->object->setSelfAssessmentEditingMode(
true);
1046 $questionGUI->object->setDefaultNrOfTries(null);
1047 $questionGUI->object->setPreventRteUsage($this->
getPageConfig()->getPreventRteUsage());
1050 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1052 $ilCtrl->forwardCommand($gui);
1066 $cmd = $this->ctrl->getCmd(
"preview");
1083 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
1085 $ilTabs->clearTargets();
1087 $ilTabs->setBackTarget($lng->txt(
"back"),
1088 $ilCtrl->getLinkTarget($this,
"edit"));
1090 $ilCtrl->setParameterByClass(
"ilquestioneditgui",
"q_id",
$_GET[
"q_id"]);
1091 $ilTabs->addTab(
"question", $lng->txt(
"question"),
1092 $ilCtrl->getLinkTargetByClass(
"ilquestioneditgui",
"editQuestion"));
1094 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1095 $ilCtrl->setParameterByClass(
"ilAssQuestionFeedbackEditingGUI",
"q_id",
$_GET[
"q_id"]);
1096 $ilTabs->addTab(
"feedback", $lng->txt(
"feedback"),
1099 $ilTabs->activateTab($a_active);
1117 $this->ctrl->redirect($this,
"edit");
1126 $this->ctrl->redirect($this,
"edit");
1138 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1142 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilCOPagePres.js");
1145 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
1148 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1157 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1161 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1166 $tpl->setCurrentBlock(
"change_comment");
1167 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1168 $tpl->parseCurrentBlock();
1173 if ($this->exp_frame !=
"")
1187 $tpl->setVariable(
"WYSIWYG_ACTION",
1188 $ilCtrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true));
1192 $sel_media_mode = ($ilUser->getPref(
"ilPageEditor_MediaMode") ==
"disable")
1195 $sel_html_mode = ($ilUser->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
1198 $sel_js_mode =
"disable";
1208 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $lng->txt(
"cont_confirm_delete"));
1213 $ilTabs->addNonTabbedLink(
"pres_view", $this->lng->txt(
"cont_presentation_view"),
1221 if ($sel_js_mode ==
"enable")
1224 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1228 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
1230 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing_4_0_12.js");
1232 include_once
'./Services/Style/classes/class.ilObjStyleSheet.php';
1233 $GLOBALS[
"tpl"]->addOnloadCode(
"var preloader = new Image();
1234 preloader.src = './templates/default/images/loader.gif';
1235 ilCOPage.setContentCss('".
1238 ", ./Services/COPage/css/tiny_extra.css".
1242 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/tiny/4_0_12/tinymce.js");
1243 $tpl->touchBlock(
"init_dragging");
1246 $tpl->setVariable(
"IL_TINY_MENU",
1249 $cfg->getEnableInternalLinks(),
1250 $cfg->getEnableWikiLinks(),
1251 $cfg->getEnableKeywords(),
1253 $cfg->getEnableAnchors()
1257 include_once(
"./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
1258 $tpl->setCurrentBlock(
"int_link_prep");
1260 $ilCtrl->getLinkTargetByClass(array(
"ilpageeditorgui",
"ilinternallinkgui"),
1261 "",
false,
true,
false)));
1262 $tpl->parseCurrentBlock();
1269 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1271 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
1280 $tpl->setCurrentBlock(
"multi_actions");
1281 if ($sel_js_mode ==
"enable")
1283 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1284 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1285 $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC",
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
1286 $tpl->setVariable(
"ONCLICK_COPY_SELECTED",
'onclick="return ilEditMultiAction(\'copySelected\');"');
1287 $tpl->setVariable(
"ONCLICK_CUT_SELECTED",
'onclick="return ilEditMultiAction(\'cutSelected\');"');
1288 $tpl->setVariable(
"TXT_SELECT_ALL", $this->lng->txt(
"select_all"));
1289 $tpl->setVariable(
"ONCLICK_SELECT_ALL",
'onclick="return ilEditMultiAction(\'selectAll\');"');
1291 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1292 $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
1293 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1294 $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
1295 $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
1297 $tpl->parseCurrentBlock();
1304 $tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
"Services/COPage");
1307 $tpl->touchBlock(
"page_focus");
1310 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1316 $tpl->touchBlock(
"page_container_1");
1317 $tpl->touchBlock(
"page_container_2");
1318 $tpl->touchBlock(
"page_container_3");
1331 if (is_array($hist_info[
"previous"]))
1333 $tpl->setCurrentBlock(
"previous_rev");
1334 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1335 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1336 $tpl->setVariable(
"HREF_PREV",
1337 $ilCtrl->getLinkTarget($this,
"preview"));
1338 $tpl->parseCurrentBlock();
1342 $tpl->setCurrentBlock(
"previous_rev_disabled");
1343 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1344 $tpl->parseCurrentBlock();
1348 $tpl->setCurrentBlock(
"next_rev");
1349 $tpl->setVariable(
"TXT_NEXT_REV", $lng->txt(
"cont_next_rev"));
1350 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1351 $tpl->setVariable(
"HREF_NEXT",
1352 $ilCtrl->getLinkTarget($this,
"preview"));
1353 $tpl->parseCurrentBlock();
1356 $tpl->setCurrentBlock(
"latest_rev");
1357 $tpl->setVariable(
"TXT_LATEST_REV", $lng->txt(
"cont_latest_rev"));
1358 $ilCtrl->setParameter($this,
"old_nr",
"");
1359 $tpl->setVariable(
"HREF_LATEST",
1360 $ilCtrl->getLinkTarget($this,
"preview"));
1361 $tpl->parseCurrentBlock();
1364 if ($c_old_nr > 0 && $ilUser->getId() != ANONYMOUS_USER_ID)
1366 $tpl->setCurrentBlock(
"rollback");
1367 $ilCtrl->setParameter($this,
"old_nr", $c_old_nr);
1368 $tpl->setVariable(
"HREF_ROLLBACK",
1369 $ilCtrl->getLinkTarget($this,
"rollbackConfirmation"));
1370 $ilCtrl->setParameter($this,
"old_nr",
"");
1371 $tpl->setVariable(
"TXT_ROLLBACK",
1372 $lng->txt(
"cont_rollback"));
1373 $tpl->parseCurrentBlock();
1377 $tpl->setCurrentBlock(
"hist_nav");
1378 $tpl->setVariable(
"TXT_REVISION", $lng->txt(
"cont_revision"));
1379 $tpl->setVariable(
"VAL_REVISION_DATE",
1381 $tpl->setVariable(
"VAL_REV_USER",
1383 $tpl->parseCurrentBlock();
1391 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1398 $this->obj->getId(), $this->obj->getLanguage());
1399 $mob_links = array();
1400 foreach($links as $link)
1402 if ($link[
"type"] ==
"mob")
1412 if (count($mob_links) > 0)
1414 $tpl->setCurrentBlock(
"med_link");
1415 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1416 $tpl->setVariable(
"SEL_MED_LINKS",
1418 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1419 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1421 $tpl->parseCurrentBlock();
1425 include_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
1428 if (count($snippets) > 0)
1430 foreach ($snippets as $s)
1432 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1435 $tpl->setCurrentBlock(
"med_link");
1436 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1437 $tpl->setVariable(
"SEL_SNIPPETS",
1439 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1440 $tpl->parseCurrentBlock();
1448 $tpl->setCurrentBlock(
"activation_txt");
1449 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $lng->txt(
"cont_scheduled_activation"));
1450 $tpl->setVariable(
"SA_FROM",
1454 $tpl->setVariable(
"SA_TO",
1458 $tpl->parseCurrentBlock();
1462 if (
$_GET[
"reloadTree"] ==
"y")
1464 $tpl->setCurrentBlock(
"reload_tree");
1465 if ($this->obj->getParentType() ==
"dbk")
1467 $tpl->setVariable(
"LINK_TREE",
1468 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer",
"",
false,
false));
1472 $tpl->setVariable(
"LINK_TREE",
1473 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer",
"",
false,
false));
1475 $tpl->parseCurrentBlock();
1479 $builded = $this->obj->buildDom();
1486 if (!$this->obj->checkPCIds())
1488 $this->obj->insertPCIds();
1489 $this->obj->update(
true,
true);
1492 $this->obj->addFileSizes();
1493 $this->obj->addHierIDs();
1495 $hids = $this->obj->getHierIds();
1496 $row1_ids = $this->obj->getFirstRowIds();
1497 $col1_ids = $this->obj->getFirstColumnIds();
1498 $litem_ids = $this->obj->getListItemIds();
1499 $fitem_ids = $this->obj->getFileItemIds();
1502 $hids = $this->obj->getHierIds();
1503 foreach($hids as $hid)
1505 $tpl->setCurrentBlock(
"add_dhtml");
1506 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_".$hid);
1507 $tpl->parseCurrentBlock();
1511 foreach($col1_ids as $hid)
1513 $tpl->setCurrentBlock(
"add_dhtml");
1514 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r".$hid);
1515 $tpl->parseCurrentBlock();
1519 foreach($row1_ids as $hid)
1521 $tpl->setCurrentBlock(
"add_dhtml");
1522 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c".$hid);
1523 $tpl->parseCurrentBlock();
1527 foreach($litem_ids as $hid)
1529 $tpl->setCurrentBlock(
"add_dhtml");
1530 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1531 $tpl->parseCurrentBlock();
1535 foreach($fitem_ids as $hid)
1537 $tpl->setCurrentBlock(
"add_dhtml");
1538 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1539 $tpl->parseCurrentBlock();
1544 $this->obj->addFileSizes();
1551 if (!$this->link_xml_set)
1565 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1567 $template_xml = $style->getTemplateXML();
1568 $disable_auto_margins =
"n";
1569 if ($style->lookupStyleSetting(
"disable_auto_margins"))
1571 $disable_auto_margins =
"y";
1578 $content =
"<dummy><PageObject><PageContent><Paragraph>".
1579 $this->obj->getFirstParagraphText().$link_xml.
1580 "</Paragraph></PageContent></PageObject></dummy>";
1584 $content = $this->obj->getXMLFromDom(
false,
true,
true,
1585 $link_xml.$this->getQuestionXML().$template_xml.$this->getComponentPluginsXML());
1589 if($builded !==
true)
1621 $enlarge_path =
"images/enlarge.png";
1625 ?
"ilc_PrintPageTitle"
1630 $enable_split_new = ($this->obj->getParentType() ==
"lm" ||
1631 $this->obj->getParentType() ==
"dbk")
1637 if (($this->obj->getParentType() ==
"lm" ||
1638 $this->obj->getParentType() ==
"dbk") &&
1640 $this->obj->getId()))
1642 $enable_split_next =
"y";
1646 $enable_split_next =
"n";
1656 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1668 ? $ilUser->getPref(
"ilPageEditor_MediaMode")
1671 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1675 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1684 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1685 $params = array (
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title,ENT_QUOTES,
"UTF-8"),
1686 'enable_placeholder' => $cfg->getEnablePCType(
"PlaceHolder") ?
"y" :
"n",
1687 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1688 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1689 'img_add' => $add_path,
1690 'img_col' => $col_path,
1691 'img_row' => $row_path,
1692 'img_item' => $item_path,
1693 'enable_split_new' => $enable_split_new,
1694 'enable_split_next' => $enable_split_next,
1696 'file_download_link' => $file_download_link,
1697 'fullscreen_link' => $fullscreen_link,
1698 'med_disabled_path' => $med_disabled_path,
1699 'img_path' => $img_path,
1700 'parent_id' => $this->obj->getParentId(),
1702 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1705 'pagebreak' => $this->lng->txt(
'dgl_pagebreak'),
1706 'page' => $this->lng->txt(
'page'),
1707 'citate_page' => $this->lng->txt(
'citate_page'),
1708 'citate_from' => $this->lng->txt(
'citate_from'),
1709 'citate_to' => $this->lng->txt(
'citate_to'),
1710 'citate' => $this->lng->txt(
'citate'),
1711 'enable_rep_objects' => $cfg->getEnablePCType(
"Resources") ?
"y" :
"n",
1712 'enable_login_page' => $cfg->getEnablePCType(
"LoginPageElement") ?
"y" :
"n",
1714 'enable_tabs' => $cfg->getEnablePCType(
"Tabs") ?
"y" :
"n",
1715 'enable_sa_qst' => $cfg->getEnableSelfAssessment() ?
"y" :
"n",
1716 'enable_file_list' => $cfg->getEnablePCType(
"FileList") ?
"y" :
"n",
1717 'enable_content_includes' => $cfg->getEnablePCType(
"ContentInclude") ?
"y" :
"n",
1718 'paste' => $paste ?
"y" :
"n",
1719 'media_mode' => $media_mode,
1720 'javascript' => $sel_js_mode,
1721 'paragraph_plugins' => $paragraph_plugin_string,
1722 'disable_auto_margins' => $disable_auto_margins,
1723 'page_toc' => $cfg->getEnablePageToc() ?
"y" :
"n",
1724 'enable_profile' => $cfg->getEnablePCType(
"Profile") ?
"y" :
"n",
1725 'enable_verification' => $cfg->getEnablePCType(
"Verification") ?
"y" :
"n",
1726 'enable_blog' => $cfg->getEnablePCType(
"Blog") ?
"y" :
"n",
1727 'enable_skills' => $cfg->getEnablePCType(
"Skills") ?
"y" :
"n",
1728 'enable_qover' => $cfg->getEnablePCType(
"QuestionOverview") ?
"y" :
"n",
1729 'enable_consultation_hours' => $cfg->getEnablePCType(
"ConsultationHours") ?
"y" :
"n",
1730 'flv_video_player' => $flv_video_player
1732 if($this->link_frame !=
"")
1733 $params[
"pg_frame"] = $this->link_frame;
1740 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1743 $md5 = md5(serialize($params).$link_xml.$template_xml);
1752 $md5 == $this->obj->getRenderMd5() &&
1753 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1754 $this->obj->getRenderedTime() !=
"" &&
1755 $this->obj->old_nr == 0)
1758 $output = $this->obj->getRenderedContent();
1762 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1764 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1768 $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);
1818 $output = str_replace(
"\n",
"", $output);
1822 if (is_array($qhtml))
1824 foreach ($qhtml as $k => $h)
1826 $output = str_replace($this->pl_start.
"Question;il__qst_$k".$this->pl_end,
" ".$h, $output);
1836 $output =
'<div class="il_editarea_disabled">'.$output.
'</div>';
1840 include_once(
"./Services/COPage/classes/class.ilCOPagePCDef.php");
1842 foreach ($defs as $def)
1845 $pc_class = $def[
"pc_class"];
1849 $output = $pc_obj->modifyPageContentPostXsl($output, $this->
getOutputMode());
1852 $js_files = $pc_obj->getJavascriptFiles();
1853 foreach ($js_files as $js)
1855 $GLOBALS[
"tpl"]->addJavascript($js);
1859 $css_files = $pc_obj->getCssFiles();
1860 foreach ($css_files as $css)
1866 $output = $this->obj->insertSourceCodeParagraphs($output, $this->
getOutputMode());
1875 if (
$_GET[
"updated_pc_id_str"] !=
"")
1877 echo
$_GET[
"updated_pc_id_str"];
1880 $tpl->setCurrentBlock(
"edit_page");
1881 $tpl->parseCurrentBlock();
1882 echo
$tpl->get(
"edit_page");
1915 while (is_int($start = strpos($output,
"<!--ParStart-->")) &&
1916 is_int($end = strpos($output,
"<!--ParEnd-->", $start)))
1918 $output = substr($output, 0, $start).
1919 str_replace(array(
"{",
"}"), array(
"{",
"}"),
1920 substr($output, $start + 15, $end - ($start + 15))).
1921 substr($output, $end + 13);
1937 return array(
"deactivatePage" => $lng->txt(
"cont_deactivate_page"),
1938 "activatePage" => $lng->txt(
"cont_activate_page"));
1949 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
1953 $list->setListTitle($lng->txt(
"actions"));
1954 $list->setId(
"copage_act");
1962 $list->addItem($captions[
"deactivatePage"],
"",
1963 $ilCtrl->getLinkTarget($this,
"deactivatePage"));
1967 $list->addItem($captions[
"activatePage"],
"",
1968 $ilCtrl->getLinkTarget($this,
"activatePage"));
1971 $a_tpl->setVariable(
"PAGE_ACTIONS", $list->getHTML());
1978 $list->addItem($lng->txt(
"cont_initial_attached_content"),
"",
1979 $ilCtrl->getLinkTarget($this,
"initialOpenedContent"));
1990 $a_tpl->setVariable(
"PAGE_ACTIONS", $list->getHTML());
1993 $lng->loadLanguageModule(
"content");
1995 $list->setListTitle($lng->txt(
"cont_edit_mode"));
1996 $list->setId(
"copage_ed_mode");
1999 if ($sel_media_mode ==
"enable")
2001 $ilCtrl->setParameter($this,
"media_mode",
"disable");
2002 $list->addItem($lng->txt(
"cont_deactivate_media"),
"",
2003 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2007 $ilCtrl->setParameter($this,
"media_mode",
"enable");
2008 $list->addItem($lng->txt(
"cont_activate_media"),
"",
2009 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2011 $ilCtrl->setParameter($this,
"media_mode",
"");
2016 if ($sel_html_mode ==
"enable")
2018 $ilCtrl->setParameter($this,
"html_mode",
"disable");
2019 $list->addItem($lng->txt(
"cont_deactivate_html"),
"",
2020 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2024 $ilCtrl->setParameter($this,
"html_mode",
"enable");
2025 $list->addItem($lng->txt(
"cont_activate_html"),
"",
2026 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2029 $ilCtrl->setParameter($this,
"html_mode",
"");
2032 if ($sel_js_mode ==
"enable")
2034 $ilCtrl->setParameter($this,
"js_mode",
"disable");
2035 $list->addItem($lng->txt(
"cont_deactivate_js"),
"",
2036 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2040 $ilCtrl->setParameter($this,
"js_mode",
"enable");
2041 $list->addItem($lng->txt(
"cont_activate_js"),
"",
2042 $ilCtrl->getLinkTarget($this,
"setEditMode"));
2044 $ilCtrl->setParameter($this,
"js_mode",
"");
2046 $a_tpl->setVariable(
"EDIT_MODE", $list->getHTML());
2064 if ($cfg->getMultiLangSupport())
2070 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
2073 if (!$ot->getContentActivated())
2085 $lng->loadLanguageModule(
"meta");
2089 $l = $ot->getMasterLanguage();
2090 $a_list->addItem($lng->txt(
"cont_edit_language_version").
": ".
2091 $lng->txt(
"meta_l_".$l),
"",
2092 $ilCtrl->getLinkTarget($this,
"editMasterLanguage"));
2095 foreach ($ot->getLanguages() as $al =>
$lang)
2098 $al != $ot->getMasterLanguage())
2100 $ilCtrl->setParameter($this,
"totransl", $al);
2101 $a_list->addItem($lng->txt(
"cont_edit_language_version").
": ".
2102 $lng->txt(
"meta_l_".$al),
"",
2103 $ilCtrl->getLinkTarget($this,
"switchToLanguage"));
2104 $ilCtrl->setParameter($this,
"totransl",
$_GET[
"totransl"]);
2114 include_once(
"./Services/COPage/classes/class.ilPageMultiLangGUI.php");
2117 $a_tpl->setVariable(
"MULTI_LANG_INFO", $ml_gui->getMultiLangInfo($this->getPageObject()->getLanguage()));
2134 if (
$_GET[
"media_mode"] !=
"")
2136 if (
$_GET[
"media_mode"] ==
"disable")
2138 $ilUser->writePref(
"ilPageEditor_MediaMode",
"disable");
2142 $ilUser->writePref(
"ilPageEditor_MediaMode",
"");
2145 if (
$_GET[
"html_mode"] !=
"")
2147 if (
$_GET[
"html_mode"] ==
"disable")
2149 $ilUser->writePref(
"ilPageEditor_HTMLMode",
"disable");
2153 $ilUser->writePref(
"ilPageEditor_HTMLMode",
"");
2156 if (
$_GET[
"js_mode"] !=
"")
2158 if (
$_GET[
"js_mode"] ==
"disable")
2160 $ilUser->writePref(
"ilPageEditor_JavaScript",
"disable");
2164 $ilUser->writePref(
"ilPageEditor_JavaScript",
"");
2168 $ilCtrl->redirect($this,
"edit");
2176 $a_int_links =
false, $a_wiki_links =
false, $a_keywords =
false,
2177 $a_style_id = 0, $a_paragraph_styles =
true, $a_save_return =
true,
2178 $a_anchors =
false, $a_save_new =
true)
2184 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
2186 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
2188 $btpl =
new ilTemplate(
"tpl.tiny_menu.html",
true,
true,
"Services/COPage");
2193 $btpl->touchBlock(
"debug_ghost");
2197 $btpl->setCurrentBlock(
"pword_button");
2200 $btpl->parseCurrentBlock();
2202 $lng->txt(
"cont_pword"),
2206 $btpl->setCurrentBlock(
"blist_button");
2209 $btpl->parseCurrentBlock();
2211 $lng->txt(
"cont_blist"),
2215 $btpl->setCurrentBlock(
"nlist_button");
2218 $btpl->parseCurrentBlock();
2220 $lng->txt(
"cont_nlist"),
2224 $btpl->setCurrentBlock(
"list_indent");
2227 $btpl->parseCurrentBlock();
2229 $lng->txt(
"cont_list_indent"),
2234 $btpl->setCurrentBlock(
"list_outdent");
2237 $btpl->parseCurrentBlock();
2239 $lng->txt(
"cont_list_outdent"),
2244 $btpl->touchBlock(
"bb_ilink_button");
2252 $btpl->setCurrentBlock(
"rformat_button");
2255 $btpl->parseCurrentBlock();
2259 if ($a_paragraph_styles)
2262 $btpl->setCurrentBlock(
"new_par");
2263 $btpl->setVariable(
"IMG_NEWPAR",
"+");
2264 $btpl->parseCurrentBlock();
2268 $btpl->setCurrentBlock(
"par_edit");
2269 $btpl->setVariable(
"TXT_PAR_FORMAT", $lng->txt(
"cont_par_format"));
2270 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2275 $lng->txt(
"cont_paragraph_styles"),
"iltinymenu_bd");
2277 $btpl->parseCurrentBlock();
2282 $btpl->setCurrentBlock(
"bb_kw_button");
2283 $btpl->setVariable(
"CC_KW",
"kw");
2284 $btpl->parseCurrentBlock();
2292 $btpl->setCurrentBlock(
"bb_wikilink_button");
2293 $btpl->setVariable(
"TXT_WLN2", $lng->txt(
"obj_wiki"));
2294 $btpl->parseCurrentBlock();
2301 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
2305 if (in_array($c, array(
"com",
"quot",
"acc",
"code")))
2310 $a_par_type,
"active_".$c,
true))
2313 if ($aset->get(
"use_physical"))
2315 $cc_code = str_replace(array(
"str",
"emp",
"imp"), array(
"B",
"I",
"U"), $cc_code);
2318 if ($c !=
"tex" ||
$mathJaxSetting->get(
"enable") || defined(
"URL_TO_LATEX"))
2320 $btpl->setCurrentBlock(
"bb_".$c.
"_button");
2321 $btpl->setVariable(
"CC_".strtoupper($c), $cc_code);
2322 $btpl->parseCurrentBlock();
2324 $lng->txt(
"cont_cc_".$c),
2342 $btpl->setCurrentBlock(
"save_return");
2343 $btpl->setVariable(
"TXT_SAVE_RETURN", $lng->txt(
"save_return"));
2344 $btpl->parseCurrentBlock();
2349 $btpl->setCurrentBlock(
"save_new");
2350 $btpl->setVariable(
"TXT_SAVE_NEW", $lng->txt(
"save_new"));
2351 $btpl->parseCurrentBlock();
2356 $btpl->setCurrentBlock(
"bb_anc_button");
2357 $btpl->setVariable(
"CC_ANC",
"anc");
2358 $btpl->parseCurrentBlock();
2370 $btpl->setVariable(
"TXT_SAVE", $lng->txt(
"save"));
2371 $btpl->setVariable(
"TXT_CANCEL", $lng->txt(
"cancel"));
2373 $btpl->setVariable(
"TXT_CHAR_FORMAT", $lng->txt(
"cont_char_format"));
2374 $btpl->setVariable(
"TXT_LISTS", $lng->txt(
"cont_lists"));
2375 $btpl->setVariable(
"TXT_LINKS", $lng->txt(
"cont_links"));
2376 $btpl->setVariable(
"TXT_MORE_FUNCTIONS", $lng->txt(
"cont_more_functions"));
2377 $btpl->setVariable(
"TXT_SAVING", $lng->txt(
"cont_saving"));
2379 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2382 $lng->txt(
"cont_more_character_styles"),
"iltinymenu_bd");
2384 return $btpl->get();
2396 $link_info =
"<IntLinkInfos>";
2397 $targetframe =
"None";
2398 foreach ($int_links as $int_link)
2400 $target = $int_link[
"Target"];
2401 if (substr($target, 0, 4) ==
"il__")
2405 $type = $int_link[
"Type"];
2407 $targetframe = ($int_link[
"TargetFrame"] !=
"")
2408 ? $int_link[
"TargetFrame"]
2412 if ($targetframe !=
"None")
2418 $anc = $anc_add =
"";
2419 if ($int_link[
"Anchor"] !=
"")
2421 $anc = $int_link[
"Anchor"];
2422 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
2429 case "StructureObject":
2431 if ($type ==
"PageObject")
2433 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
2437 $href =
"./goto.php?target=st_".$target_id;
2441 case "GlossaryItem":
2442 if ($targetframe ==
"None")
2444 $targetframe =
"Glossary";
2446 $href =
"./goto.php?target=git_".$target_id;
2450 $ilCtrl->setParameter($this,
"mob_id",
$target_id);
2452 $href = $ilCtrl->getLinkTarget($this,
"displayMedia");
2453 $ilCtrl->setParameter($this,
"mob_id",
"");
2457 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
2461 case "RepositoryItem":
2464 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
2469 $anc_par =
'Anchor="'.$anc.
'"';
2470 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".$anc_par.
" ".
2471 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
2474 $link_info.=
"</IntLinkInfos>";
2483 $this->obj->buildDom();
2485 include_once(
"./Services/COPage/classes/class.ilPCFileList.php");
2489 require_once(
"./Modules/File/classes/class.ilObjFile.php");
2490 $file_id = $file[count($file) - 1];
2493 if (!in_array($file_id, $files))
2497 $fileObj =&
new ilObjFile($file_id,
false);
2498 $fileObj->sendFile();
2515 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
2516 $tpl->setCurrentBlock(
"ilMedia");
2524 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2526 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2528 $pg_obj->buildDom();
2530 if (!empty (
$_GET[
"pg_id"]))
2533 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2547 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2548 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2554 $mode =
"fullscreen";
2561 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2562 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
2563 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
2564 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
2570 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2573 $tpl->setVariable(
"MEDIA_CONTENT", $output);
2584 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
2595 $start = strpos($a_html,
"{{{{{ContentInclude;");
2598 $end = strpos($a_html,
"}}}}}", $start);
2603 $param = substr($a_html, $start + 20, $end - $start - 20);
2604 $param = explode(
";", $param);
2606 if ($param[0] ==
"mep" && is_numeric($param[1]) && $param[2] <= 0)
2608 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
2624 $html = $page_gui->getRawContent();
2630 $html =
"// ".$lng->txt(
"cont_missing_snippet").
" //";
2633 $h2 = substr($a_html, 0, $start).
2635 substr($a_html, $end + 5);
2639 $start = strpos($a_html,
"{{{{{ContentInclude;", $start + 5);
2643 $end = strpos($a_html,
"}}}}}", $start);
2659 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2663 $page_heads = array();
2664 foreach ($offsets as $os)
2666 $level = (int) substr($a_output, $os + 10, 1);
2667 if (in_array($level, array(1,2,3)))
2669 $anchor = str_replace(
"TocH",
"TocA",
2670 substr($a_output, $os, strpos($a_output,
"<", $os) - $os - 3)
2674 $tag_start = stripos($a_output,
"<h".$level.
" ", $os);
2675 $tag_end = stripos($a_output,
"</h".$level.
">", $tag_start);
2676 $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2679 $text_start = stripos($head,
">") + 1;
2680 $text_end = strripos($head,
"<!--", $text_start);
2681 $text = substr($head, $text_start, $text_end - $text_start);
2682 $page_heads[] = array(
"level" => $level,
"text" => $text,
2683 "anchor" => $anchor);
2687 if (count($page_heads) > 1)
2689 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
2691 $list->setAutoNumbering(
true);
2692 $list->setListClass(
"ilc_page_toc_PageTOCList");
2693 $list->setItemClass(
"ilc_page_toc_PageTOCItem");
2701 foreach ($page_heads as $ind => $h)
2708 if ($h[
"level"] == 2 && $c_par[1] > 0)
2712 if ($h[
"level"] == 3 && $c_par[2] > 0)
2717 $h[
"text"] = str_replace(
"<!--PageTocPH-->",
"", $h[
"text"]);
2721 "<a href='#".$h[
"anchor"].
"' class='ilc_page_toc_PageTOCLink'>".$h[
"text"].
"</a>",
2725 if ($h[
"level"] == 1)
2730 if ($h[
"level"] == 2)
2738 $tpl->setVariable(
"PAGE_TOC", $list->getHTML());
2739 $tpl->setVariable(
"TXT_PAGE_TOC", $lng->txt(
"cont_page_toc"));
2740 $tpl->setVariable(
"TXT_HIDE", $lng->txt(
"hide"));
2741 $tpl->setVariable(
"TXT_SHOW", $lng->txt(
"show"));
2743 $a_output = str_replace(
"{{{{{PageTOC}}}}}",
2744 $tpl->get(), $a_output);
2745 $numbers = $list->getNumbers();
2747 if (count($numbers) > 0)
2749 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2750 foreach ($numbers as
$n)
2759 $a_output = str_replace(
"{{{{{PageTOC}}}}}",
2779 include_once(
"./Services/COPage/classes/class.ilPCResourcesGUI.php");
2799 $a_output = str_replace(
"{{{{{LV_show_adv}}}}}",
2800 $lng->txt(
"cont_show_adv"), $a_output);
2801 $a_output = str_replace(
"{{{{{LV_hide_adv}}}}}",
2802 $lng->txt(
"cont_hide_adv"), $a_output);
2806 $a_output = str_replace(
"{{{{{LV_show_adv}}}}}",
2808 $a_output = str_replace(
"{{{{{LV_hide_adv}}}}}",
2832 $a_tpl->setCurrentBlock(
"help_img");
2834 $a_tpl->parseCurrentBlock();
2835 $a_tpl->setCurrentBlock(
"help_item");
2836 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_add_elements"));
2837 $a_tpl->parseCurrentBlock();
2839 $a_tpl->setCurrentBlock(
"help_img");
2841 $a_tpl->parseCurrentBlock();
2842 $a_tpl->setCurrentBlock(
"help_img");
2844 $a_tpl->parseCurrentBlock();
2845 $a_tpl->setCurrentBlock(
"help_item");
2846 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_drag_and_drop_elements"));
2847 $a_tpl->parseCurrentBlock();
2849 $a_tpl->setCurrentBlock(
"help_img");
2851 $a_tpl->parseCurrentBlock();
2852 $a_tpl->setCurrentBlock(
"help_item");
2853 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_double_click_to_delete"));
2854 $a_tpl->parseCurrentBlock();
2856 $a_tpl->setCurrentBlock(
"help");
2857 $a_tpl->parseCurrentBlock();
2881 $ilCtrl->redirect($this,
"preview");
2886 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
2888 $ilUser->isAnonymous() &&
2889 !$ilUser->isCaptchaVerified() &&
2890 ilCaptchaUtil::isActiveForWiki()
2893 $form = $this->initCaptchaForm();
2894 if(
$_POST[
'captcha_code'] && $form->checkInput())
2896 $ilUser->setCaptchaVerified(
true);
2900 return $form->getHTML();
2907 $info = $lng->txt(
"content_no_edit_lock");
2909 include_once(
"./Services/User/classes/class.ilUserUtil.php");
2912 $info.=
"</br>".$lng->txt(
"content_until").
": ".
2914 $info.=
"</br>".$lng->txt(
"obj_usr").
": ".
2924 $min = (int) $aset->get(
"block_mode_minutes") ;
2927 $info = $lng->txt(
"cont_got_lock");
2928 include_once(
"./Services/User/classes/class.ilUserUtil.php");
2934 $info.=
" <a class='small submit' href='".$ilCtrl->getLinkTarget($this,
"releasePageLock").
"'>".
2935 $lng->txt(
"cont_finish_editing").
"</a>";
2946 $html.=
"<br /><br />".$this->getNotesHTML();
2964 $html = $this->
edit();
2966 $tpl->addOnLoadCode(
"ilCOPage.insertJSAtPlaceholder('".
2976 public function initCaptchaForm()
2984 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
2987 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
2990 $form->addItem($ci);
2992 $form->addCommandButton(
'edit', $lng->txt(
'ok'));
2994 $form->setTitle($lng->txt(
'cont_captcha_verification'));
2995 $form->setFormAction($ilCtrl->getFormAction($this));
3022 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
3023 $this->tpl->setCurrentBlock(
"ContentStyle");
3024 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
3025 $this->tpl->parseCurrentBlock();
3029 $this->tpl->setCurrentBlock(
"ilMedia");
3031 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3033 if (!empty (
$_GET[
"pg_id"]))
3035 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
3037 $pg_obj->buildDom();
3042 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
3056 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
3057 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
3064 $mode =
"fullscreen";
3065 $params = array (
'mode' => $mode,
'webspace_path' => $wb_path);
3066 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
3071 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
3081 if(is_array($a_error))
3083 $error_str =
"<b>Error(s):</b><br>";
3084 foreach ($a_error as $error)
3086 $err_mess = implode($error,
" - ");
3087 if (!is_int(strpos($err_mess,
":0:")))
3089 $error_str .= htmlentities($err_mess).
"<br />";
3092 $this->tpl->setVariable(
"MESSAGE", $error_str);
3108 $tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
3110 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
3112 $table_gui->setId(
"hist_table");
3119 'sortkey' => 999999,
3121 $table_gui->setData($entries);
3122 return $table_gui->getHTML();
3137 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3141 $ilCtrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
3142 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"rollback"));
3143 $c_gui->setHeaderText($lng->txt(
"cont_rollback_confirmation"));
3144 $c_gui->setCancel($lng->txt(
"cancel"),
"history");
3145 $c_gui->setConfirm($lng->txt(
"confirm"),
"rollback");
3147 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
3149 $c_gui->addItem(
"id[]",
$_GET[
"old_nr"],
3152 $tpl->setContent($c_gui->getHTML());
3167 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
3169 if ($hentry[
"content"] !=
"")
3171 $this->obj->setXMLContent($hentry[
"content"]);
3172 $this->obj->buildDom(
true);
3173 if ($this->obj->update())
3175 $ilCtrl->redirect($this,
"history");
3178 $ilCtrl->redirect($this,
"history");
3191 $ilHelp->setScreenIdComponent(
"copg");
3215 $ilTabs->addTarget(
"pg", $ilCtrl->getLinkTarget($this,
"preview")
3216 , array(
"",
"preview"));
3220 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
3221 , array(
"",
"edit"));
3228 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
3229 , array(
"",
"edit"));
3232 $ilTabs->addTarget(
"cont_preview", $ilCtrl->getLinkTarget($this,
"preview")
3233 , array(
"",
"preview"));
3239 if ($this->use_meta_data)
3241 $ilTabs->addTarget(
"meta_data",
3242 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
3243 "",
"ilmdeditorgui");
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((
int)
$_POST[
"left"], (
int) $_POST[
"right"]);
3305 $lpage = $compare[
"l_page"];
3307 $cfg->setPreventHTMLUnmasking(
true);
3316 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
3317 $tpl->setVariable(
"LEFT", $lhtml);
3320 $rpage = $compare[
"r_page"];
3328 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
3329 $tpl->setVariable(
"RIGHT", $rhtml);
3331 $tpl->setVariable(
"TXT_NEW", $lng->txt(
"cont_pc_new"));
3332 $tpl->setVariable(
"TXT_MODIFIED", $lng->txt(
"cont_pc_modified"));
3333 $tpl->setVariable(
"TXT_DELETED", $lng->txt(
"cont_pc_deleted"));
3343 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
3344 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
3345 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
3346 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
3358 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
3361 $atpl->setVariable(
"FORM", $this->form->getHTML());
3362 $atpl->setCurrentBlock(
"updater");
3363 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
3364 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
3365 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
3366 $atpl->parseCurrentBlock();
3367 $tpl->setContent($atpl->get());
3377 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3379 $this->form->setFormAction($ilCtrl->getFormAction($this));
3380 $this->form->setTitle($lng->txt(
"cont_page_activation"));
3384 $rad_op1 =
new ilRadioOption($lng->txt(
"cont_activated"),
"activated");
3386 $rad->addOption($rad_op1);
3387 $rad_op2 =
new ilRadioOption($lng->txt(
"cont_deactivated"),
"deactivated");
3388 $rad->addOption($rad_op2);
3389 $rad_op3 =
new ilRadioOption($lng->txt(
"cont_scheduled_activation"),
"scheduled");
3392 $dt_prop->setShowTime(
true);
3396 $rad_op3->addSubItem($dt_prop2);
3399 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_show_activation_info"),
"show_activation_info");
3400 $cb->
setInfo($this->lng->txt(
"cont_show_activation_info_info"));
3401 $rad_op3->addSubItem($cb);
3404 $rad->addOption($rad_op3);
3406 $this->form->addCommandButton(
"saveActivation", $lng->txt(
"save"));
3408 $this->form->addItem($rad);
3417 $values[
"activation"] =
"deactivated";
3420 $values[
"activation"] =
"activated";
3423 $dt_prop = $this->form->getItemByPostVar(
"start");
3426 $values[
"activation"] =
"scheduled";
3430 $dt_prop = $this->form->getItemByPostVar(
"end");
3433 $values[
"activation"] =
"scheduled";
3438 $values[
"show_activation_info"] = $this->
getPageObject()->getShowActivationInfo();
3440 $this->form->setValuesByArray($values);
3452 if ($this->form->checkInput())
3458 if (
$_POST[
"activation"] ==
"deactivated")
3462 if (
$_POST[
"activation"] ==
"scheduled")
3466 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME));
3468 $this->form->getItemByPostVar(
"end")->getDate()->get(
IL_CAL_DATETIME));
3472 $ilCtrl->redirect($this,
"editActivation");
3474 $this->form->getValuesByPost();
3475 $tpl->setContent($this->form->getHTML());
3487 function getNotesHTML($a_content_object = null, $a_enable_private_notes =
true, $a_enable_public_notes =
false, $a_enable_notes_deletion =
false, $a_callback = null)
3491 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
3494 if(!$a_content_object)
3496 $notes_gui =
new ilNoteGUI($this->notes_parent_id,
3497 (
int)$this->obj->getId(),
"pg");
3499 $a_enable_private_notes =
true;
3500 $a_enable_public_notes =
true;
3501 $a_enable_notes_deletion =
false;
3506 $notes_gui =
new ilNoteGUI($a_content_object->getParentId(),
3507 $a_content_object->getId(), $a_content_object->getParentType());
3510 if($a_enable_private_notes)
3514 if ($a_enable_public_notes)
3516 $notes_gui->enablePublicNotes();
3517 if ((
bool)$a_enable_notes_deletion)
3519 $notes_gui->enablePublicNotesDeletion(
true);
3525 $notes_gui->addObserver($a_callback);
3528 $next_class = $this->ctrl->getNextClass($this);
3529 if ($next_class ==
"ilnotegui")
3531 $html = $this->ctrl->forwardCommand($notes_gui);
3535 $html = $notes_gui->getNotesHTML();
3545 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
3548 if (count($q_ids) > 0)
3550 foreach ($q_ids as $q_id)
3554 ?
"./assessment/0/".$q_id.
"/images/"
3556 $js[$q_id] = $q_exporter->exportQuestion($q_id, $image_path, $this->getOutputMode());
3579 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
3582 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/pure.js");
3583 $tpl->addJavaScript(
"./Modules/Scorm2004/scripts/questions/question_handling.js");
3584 $tpl->addCss(
"./Modules/Scorm2004/templates/default/question_handling.css");
3588 $tpl->addJavaScript(
"./Services/COPage/js/ilCOPageQuestionHandler.js");
3589 $url = $ilCtrl->getLinkTarget($this,
"processAnswer",
"",
true,
false);
3590 $tpl->addOnloadCode(
"ilCOPageQuestionHandler.initCallback('".$url.
"');");
3593 if ($this->
getPageConfig()->getDisableDefaultQuestionFeedback())
3595 $tpl->addOnloadCode(
"ilias.questions.default_feedback = false;");
3613 $a_tpl->addOnloadCode(self::getJSTextInitCode($a_lang).
3614 'ilCOPagePres.updateQuestionOverviews();
3630 $a_lang = $ilUser->getLanguage();
3635 ilias.questions.txt.wrong_answers = "'.$lng->txtlng(
"content",
"cont_wrong_answers", $a_lang).
'";
3636 ilias.questions.txt.wrong_answers_single = "'.$lng->txtlng(
"content",
"cont_wrong_answers_single", $a_lang).
'";
3637 ilias.questions.txt.tries_remaining = "'.$lng->txtlng(
"content",
"cont_tries_remaining", $a_lang).
'";
3638 ilias.questions.txt.please_try_again = "'.$lng->txtlng(
"content",
"cont_please_try_again", $a_lang).
'";
3639 ilias.questions.txt.all_answers_correct = "'.$lng->txtlng(
"content",
"cont_all_answers_correct", $a_lang).
'";
3640 ilias.questions.txt.nr_of_tries_exceeded = "'.$lng->txtlng(
"content",
"cont_nr_of_tries_exceeded", $a_lang).
'";
3641 ilias.questions.txt.correct_answers_shown = "'.$lng->txtlng(
"content",
"cont_correct_answers_shown", $a_lang).
'";
3642 ilias.questions.txt.correct_answers_also = "'.$lng->txtlng(
"content",
"cont_correct_answers_also", $a_lang).
'";
3643 ilias.questions.txt.correct_answer_also = "'.$lng->txtlng(
"content",
"cont_correct_answer_also", $a_lang).
'";
3644 ilias.questions.txt.ov_all_correct = "'.$lng->txtlng(
"content",
"cont_ov_all_correct", $a_lang).
'";
3645 ilias.questions.txt.ov_some_correct = "'.$lng->txtlng(
"content",
"cont_ov_some_correct", $a_lang).
'";
3646 ilias.questions.txt.ov_wrong_answered = "'.$lng->txtlng(
"content",
"cont_ov_wrong_answered", $a_lang).
'";
3647 ilias.questions.txt.please_select = "'.$lng->txtlng(
"content",
"cont_please_select", $a_lang).
'";
3648 ilias.questions.refresh_lang();
3667 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
3684 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
3685 $a_output =
"<script>var ScormApi=null;".ilQuestionExporter::questionsJS().
"</script>".$a_output;
3706 $ilTabs->activateTab(
"edit");
3709 $this->tpl->setContent($form->getHTML());
3722 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3726 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
3727 $ac =
new ilLinkInputGUI($this->lng->txt(
'cont_resource'),
'opened_content');
3729 $ac->setInternalLinkDefault(
"Media_Media", 0);
3730 $ac->setInternalLinkFilterTypes(array(
"PageObject_FAQ",
"GlossaryItem",
"Media_Media",
"Media_FAQ"));
3731 $val = $this->obj->getInitialOpenedContent();
3732 if ($val[
"id"] !=
"" && $val[
"type"] !=
"")
3734 $ac->setValue($val[
"type"].
"|".$val[
"id"].
"|".$val[
"target"]);
3737 $form->addItem($ac);
3739 $form->addCommandButton(
"saveInitialOpenedContent", $this->lng->txt(
"save"));
3740 $form->addCommandButton(
"edit", $this->lng->txt(
"cancel"));
3741 $form->setTitle($this->lng->txt(
"cont_initial_attached_content"));
3742 $form->setFormAction($ilCtrl->getFormAction($this));
3757 $this->obj->saveInitialOpenedContent(
3764 $ilCtrl->redirect($this,
"edit");
3786 $ilCtrl->setParameter($this,
"transl",
$_GET[
"totransl"]);
3787 $ilCtrl->redirect($this,
"edit");
3798 $ilCtrl->setParameter($this,
"totransl", $l);
3799 $lng->loadLanguageModule(
"meta");
3801 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
3803 $cgui->setFormAction($ilCtrl->getFormAction($this));
3804 $cgui->setHeaderText($lng->txt(
"cont_page_translation_does_not_exist").
": ".
3805 $lng->txt(
"meta_l_".$l));
3806 $cgui->setCancel($lng->txt(
"cancel"),
"editMasterLanguage");
3807 $cgui->setConfirm($lng->txt(
"confirm"),
"createPageTranslation");
3808 $tpl->setContent($cgui->getHTML());
3818 $ilCtrl->setParameter($this,
"transl",
"");
3819 $ilCtrl->redirect($this,
"edit");
3831 $ilCtrl->setParameter($this,
"transl", $l);
3832 $ilCtrl->redirect($this,
"edit");
3844 $ilCtrl->redirect($this,
"preview");