4 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectGUI.php");
5 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
6 require_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
7 require_once (
"./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
45 $this->obj =& $a_pg_obj;
46 $this->obj->setLMId($this->content_object->getId());
56 $next_class = $this->ctrl->getNextClass($this);
57 $cmd = $this->ctrl->getCmd();
64 case "ilpageobjectgui":
69 $showViewInFrameset =
true;
72 $this->ctrl->setReturn($this,
"edit");
76 $page_gui->activateMetaDataEditor($this->content_object->getID(),
77 $this->obj->getId(), $this->obj->getType(),
79 $page_gui->setEnabledPCTabs(
true);
82 if ($showViewInFrameset)
88 $view_frame =
"ilContObj".$this->content_object->getID();
90 $page_gui->setViewPageLink(ILIAS_HTTP_PATH.
"/goto.php?target=pg_".$this->obj->getId().
94 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
96 $this->content_object->getStyleSheetId(),
"lm"));
97 $page_gui->setIntLinkHelpDefault(
"StructureObject",
$_GET[
"ref_id"]);
98 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
99 $page_gui->getPageObject()->buildDom();
100 $int_links = $page_gui->getPageObject()->getInternalLinks();
102 $page_gui->setLinkXML($link_xml);
104 $page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
105 $page_gui->setFileDownloadLink(
"ilias.php?cmd=downloadFile&ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
106 $page_gui->setFullscreenLink(
"ilias.php?cmd=fullscreen&ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
107 $page_gui->setLinkParams(
"ref_id=".$this->content_object->getRefId());
108 $page_gui->setSourcecodeDownloadScript(
"ilias.php?ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
109 $page_gui->setPresentationTitle(
111 $this->content_object->getPageHeader(), $this->content_object->isActiveNumbering()));
112 $page_gui->setLocator($contObjLocator);
113 $page_gui->setHeader($this->lng->txt(
"page").
": ".$this->obj->getTitle());
114 $page_gui->setEnabledActivation(
true);
115 if ($lm_set->get(
"time_scheduled_page_activation"))
117 $page_gui->setEnabledScheduledActivation(
true);
119 $page_gui->setActivationListener($this,
"activatePage");
122 if ($mset->get(
"mep_activate_pages"))
124 $page_gui->enableContentIncludes(
true);
129 $up_gui = ($this->content_object->getType() ==
"dbk")
131 :
"ilobjlearningmodulegui";
132 $ilCtrl->setParameterByClass($up_gui,
"active_node", $this->obj->getId());
133 $page_gui->setExplorerUpdater(
"tree",
"tree_div",
134 $ilCtrl->getLinkTargetByClass($up_gui,
"explorer",
"",
true));
137 $tpl->setTitle($this->lng->txt(
"page").
": ".$this->obj->getTitle());
138 if ($this->content_object->getLayoutPerPage())
140 $page_gui->setTabHook($this,
"addPageTabs");
142 $ret = $this->ctrl->forwardCommand($page_gui);
145 $tpl->setContent(
$ret);
161 $this->ctrl->setCmdClass(
"ilpageobjectgui");
162 $this->ctrl->setCmd(
"edit");
172 $this->ctrl->setCmdClass(
"ilpageobjectgui");
173 $this->ctrl->setCmd(
"preview");
184 $this->obj->setType(
"pg");
187 $this->obj->setLMId($this->content_object->getId());
188 $this->obj->create();
193 if (
$_GET[
"obj_id"] != 0)
210 if (
$_GET[
"obj_id"] != 0)
223 if ($a_layoutframes ==
"")
225 $a_layoutframes = array();
227 $link_info =
"<IntLinkInfos>";
228 foreach ($a_int_links as $int_link)
230 $target = $int_link[
"Target"];
231 if (substr($target, 0, 4) ==
"il__")
235 $type = $int_link[
"Type"];
236 $targetframe = ($int_link[
"TargetFrame"] !=
"")
237 ? $int_link[
"TargetFrame"]
241 $anc = $anc_add =
"";
242 if ($int_link[
"Anchor"] !=
"")
244 $anc = $int_link[
"Anchor"];
245 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
251 case "StructureObject":
254 if ($lm_id == $cont_obj->getId())
257 if (
$type ==
"PageObject")
259 $this->ctrl->setParameter($this,
"obj_id",
$target_id);
260 $href = $this->ctrl->getLinkTargetByClass(get_class($this),
"edit");
264 $this->ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id",
$target_id);
265 $href = $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view");
267 $href = str_replace(
"&",
"&", $href);
268 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
272 if (
$type ==
"PageObject")
274 $href =
"../goto.php?target=pg_".$target_id.$anc_add;
278 $href =
"../goto.php?target=st_".$target_id;
280 $ltarget =
"ilContObj".$lm_id;
285 $ltarget = $nframe =
"_blank";
286 $href =
"ilias.php?cmdClass=illmpresentationgui&baseClass=ilLMPresentationGUI&".
287 "obj_type=$type&cmd=glossary&ref_id=".$_GET[
"ref_id"].
288 "&obj_id=".$target_id.
"&frame=$nframe";
292 $ltarget = $nframe =
"_blank";
293 $href =
"ilias.php?cmdClass=illmpresentationgui&baseClass=ilLMPresentationGUI&obj_type=$type&cmd=media&ref_id=".$_GET[
"ref_id"].
294 "&mob_id=".$target_id.
"&frame=$nframe";
297 case "RepositoryItem":
300 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
306 $anc_par =
'Anchor="'.$anc.
'"';
308 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
309 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
312 $link_info.=
"</IntLinkInfos>";
344 require_once(
"classes/class.ilHistory.php");
346 "", $this->content_object->getType().
":pg",
359 #include_once("classes/class.ilTabsGUI.php");
360 #$tabs_gui =& new ilTabsGUI();
361 $this->getTabs($ilTabs);
363 $this->tpl->setCurrentBlock(
"header_image");
365 $this->tpl->parseCurrentBlock();
366 $this->tpl->setCurrentBlock(
"content");
368 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
369 $this->tpl->setVariable(
"HEADER",
370 $this->lng->txt($this->obj->getType()).
": ".$this->obj->getTitle());
420 $first = strpos($a_target,
"_");
421 $second = strpos($a_target,
"_", $first + 1);
422 $page_id = substr($a_target, 0, $first);
425 $page_id = substr($a_target, 0, $first);
428 $ref_id = substr($a_target, $first + 1, $second - ($first + 1));
429 $anchor = substr($a_target, $second + 1);
433 $ref_id = substr($a_target, $first + 1);
438 $page_id = $a_target;
448 if (in_array(
$ref_id, $ref_ids))
450 $ref_ids = array_merge(array(
$ref_id), $ref_ids);
457 if ($ilAccess->checkAccess(
"read",
"", $ref_id))
461 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
462 $_GET[
"obj_id"] = $page_id;
464 $_GET[
"anchor"] = $anchor;
465 include_once(
"ilias.php");
470 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
472 $_GET[
"cmd"] =
"frameset";
473 $_GET[
"target"] =
"";
474 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
477 include(
"repository.php");
481 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
491 $page_gui =&
new ilPageObjectGUI($this->obj->content_object->getType(),
492 $this->obj->getId());
494 $page_gui->activateMetaDataEditor($this->content_object->getID(),
495 $this->obj->getId(), $this->obj->getType(),
497 $page_gui->setActivationListener($this,
"activatePage");
498 $page_gui->setTabHook($this,
"addPageTabs");
499 $page_gui->setEnabledActivation(
true);
501 if ($lm_set->get(
"time_scheduled_page_activation"))
503 $page_gui->setEnabledScheduledActivation(
true);
506 $tpl->setTitle($this->lng->txt(
"page").
": ".$this->obj->getTitle());
507 $ilCtrl->getHTML($page_gui);
508 $ilTabs->setTabActive(
"cont_layout");
510 $tpl->setContent($this->form->getHTML());
522 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
530 $im_tag =
ilUtil::img($im, $this->content_object->getLayout());
533 "<table><tr><td>".$im_tag.
"</td><td><b>".$lng->txt(
"cont_lm_default_layout").
534 "</b>: ".$lng->txt(
"cont_layout_".$this->content_object->getLayout()).
"</td></tr></table>";
542 $option[
$l] =
"<table><tr><td>".$im_tag.
"</td><td><b>".$lng->txt(
"cont_layout_".
$l).
"</b>: ".$lng->txt(
"cont_layout_".
$l.
"_desc").
"</td></tr></table>";
545 $layout->setValue($this->obj->getLayout());
546 $this->form->addItem($layout);
548 $this->form->addCommandButton(
"saveLayout", $lng->txt(
"save"));
550 $this->form->setTitle($lng->txt(
"cont_page_layout"));
551 $this->form->setFormAction($ilCtrl->getFormAction($this));
564 if ($this->form->checkInput())
568 $ilCtrl->redirect($this,
"editLayout");
570 $this->form->setValuesByPost();
571 $tpl->setContent($this->form->getHtml());
581 $ilTabs->addTarget(
"cont_layout",
582 $ilCtrl->getLinkTarget($this,
'editLayout'),
"editLayout");