24 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectGUI.php");
25 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
26 require_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
27 require_once (
"./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
65 $this->obj =& $a_pg_obj;
66 $this->obj->setLMId($this->content_object->getId());
76 $next_class = $this->ctrl->getNextClass($this);
77 $cmd = $this->ctrl->getCmd();
96 case "ilpageobjectgui":
101 $showViewInFrameset =
true;
103 $this->ctrl->setReturn($this,
"edit");
111 $page_gui =&
new ilPageObjectGUI($this->obj->content_object->getType(),
112 $this->obj->getId());
114 $page_gui->activateMetaDataEditor($this->content_object->getID(),
115 $this->obj->getId(), $this->obj->getType(),
119 if ($showViewInFrameset)
125 $view_frame =
"ilContObj".$this->content_object->getID();
127 $page_gui->setViewPageLink(ILIAS_HTTP_PATH.
"/goto.php?target=pg_".$this->obj->getId().
131 $page_gui->setIntLinkHelpDefault(
"StructureObject",
$_GET[
"ref_id"]);
132 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
133 $page_gui->getPageObject()->buildDom();
134 $int_links = $page_gui->getPageObject()->getInternalLinks();
136 $page_gui->setLinkXML($link_xml);
138 $page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
139 $page_gui->setFileDownloadLink(
"ilias.php?cmd=downloadFile&ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
140 $page_gui->setFullscreenLink(
"ilias.php?cmd=fullscreen&ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
141 $page_gui->setLinkParams(
"ref_id=".$this->content_object->getRefId());
142 $page_gui->setSourcecodeDownloadScript(
"ilias.php?ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
143 $page_gui->setPresentationTitle(
145 $this->content_object->getPageHeader(), $this->content_object->isActiveNumbering()));
146 $page_gui->setLocator($contObjLocator);
147 $page_gui->setHeader($this->lng->txt(
"page").
": ".$this->obj->getTitle());
148 $page_gui->setEnabledActivation(
true);
149 $page_gui->setActivationListener($this,
"activatePage");
150 $page_gui->setActivated($this->obj->getActive());
152 $up_gui = ($this->content_object->getType() ==
"dbk")
154 :
"ilobjlearningmodulegui";
155 $ilCtrl->setParameterByClass($up_gui,
"active_node", $this->obj->getId());
156 $page_gui->setExplorerUpdater(
"tree",
"tree_div",
157 $ilCtrl->getLinkTargetByClass($up_gui,
"explorer",
"",
true));
160 $tpl->setTitle($this->lng->txt(
"page").
": ".$this->obj->getTitle());
162 $ret = $this->ctrl->forwardCommand($page_gui);
164 $tpl->setContent(
$ret);
180 $this->ctrl->setCmdClass(
"ilpageobjectgui");
181 $this->ctrl->setCmd(
"edit");
191 $this->ctrl->setCmdClass(
"ilpageobjectgui");
192 $this->ctrl->setCmd(
"preview");
203 $this->obj->setType(
"pg");
206 $this->obj->setLMId($this->content_object->getId());
207 $this->obj->create();
212 if (
$_GET[
"obj_id"] != 0)
230 if (
$_GET[
"obj_id"] != 0)
243 if ($a_layoutframes ==
"")
245 $a_layoutframes = array();
247 $link_info =
"<IntLinkInfos>";
248 foreach ($a_int_links as $int_link)
250 $target = $int_link[
"Target"];
251 if (substr($target, 0, 4) ==
"il__")
255 $type = $int_link[
"Type"];
256 $targetframe = ($int_link[
"TargetFrame"] !=
"")
257 ? $int_link[
"TargetFrame"]
263 case "StructureObject":
266 if ($lm_id == $cont_obj->getId())
269 if ($type ==
"PageObject")
271 $this->ctrl->setParameter($this,
"obj_id",
$target_id);
272 $href = $this->ctrl->getLinkTargetByClass(get_class($this),
"edit");
276 $this->ctrl->setParameterByClass(
"ilstructureobjectgui",
"obj_id",
$target_id);
277 $href = $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui",
"view");
279 $href = str_replace(
"&",
"&", $href);
280 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
284 if ($type ==
"PageObject")
286 $href =
"../goto.php?target=pg_".$target_id;
290 $href =
"../goto.php?target=st_".$target_id;
292 $ltarget =
"ilContObj".$lm_id;
297 $ltarget = $nframe =
"_blank";
298 $href =
"ilias.php?cmdClass=illmpresentationgui&baseClass=ilLMPresentationGUI&".
299 "obj_type=$type&cmd=glossary&ref_id=".$_GET[
"ref_id"].
300 "&obj_id=".$target_id.
"&frame=$nframe";
304 $ltarget = $nframe =
"_blank";
305 $href =
"ilias.php?cmdClass=illmpresentationgui&baseClass=ilLMPresentationGUI&obj_type=$type&cmd=media&ref_id=".$_GET[
"ref_id"].
306 "&mob_id=".$target_id.
"&frame=$nframe";
309 case "RepositoryItem":
312 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
317 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
318 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
321 $link_info.=
"</IntLinkInfos>";
336 require_once(
"classes/class.ilHistoryGUI.php");
338 $this->content_object->getType().
":pg");
339 $hist_html = $hist_gui->getHistoryTable(
340 $this->ctrl->getParameterArray($this,
"history"),
341 $this->content_object->isActiveHistoryUserComments()
344 $this->tpl->setVariable(
"ADM_CONTENT", $hist_html);
352 require_once(
"classes/class.ilHistory.php");
354 "", $this->content_object->getType().
":pg",
367 #include_once("classes/class.ilTabsGUI.php");
368 #$tabs_gui =& new ilTabsGUI();
371 $this->tpl->setCurrentBlock(
"header_image");
373 $this->tpl->parseCurrentBlock();
374 $this->tpl->setCurrentBlock(
"content");
376 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
377 $this->tpl->setVariable(
"HEADER",
378 $this->lng->txt($this->obj->getType()).
": ".$this->obj->getTitle());
389 $tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this,
"view")
390 , array(
"",
"view"),
"ilpageobjectgui");
392 $tabs_gui->addTarget(
"cont_preview", $this->ctrl->getLinkTarget($this,
"preview")
393 ,
"preview",
"ilpageobjectgui");
398 $tabs_gui->addTarget(
"meta_data",
399 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
400 "",
"ilmdeditorgui");
402 $tabs_gui->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history")
403 ,
"history", get_class($this));
405 $tabs = $this->ctrl->getTabs();
406 foreach ($tabs as
$tab)
408 $tabs_gui->addTarget($tab[
"lang_var"], $tab[
"link"]
409 , $tab[
"cmd"], $tab[
"class"]);
422 function _goto($a_target, $a_target_ref_id =
"")
433 if (in_array($a_target_ref_id, $ref_ids))
435 $ref_ids = array_merge(array($a_target_ref_id), $ref_ids);
442 if ($ilAccess->checkAccess(
"read",
"", $ref_id))
446 $_GET[
"baseClass"] =
"ilLMPresentationGUI";
447 $_GET[
"obj_id"] = $a_target;
449 include_once(
"ilias.php");
454 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
456 $_GET[
"cmd"] =
"frameset";
457 $_GET[
"target"] =
"";
458 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
461 include(
"repository.php");
465 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);