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);
 
   81                                 include_once(
"./Services/COPage/classes/class.ilPageConfig.php");
 
   83                                 $pconfig->setPreventRteUsage(
true);
 
   84                                 $page_gui->setPageConfig($pconfig);
 
   86                                 if ($ilSetting->get(
"block_activated_news"))
 
   88                                         $page_gui->setEnabledNews(
true, $this->obj->content_object->getId(),
 
   89                                                 $this->obj->content_object->getType());
 
   93                                 if ($showViewInFrameset)
 
   99                                         $view_frame = 
"ilContObj".$this->content_object->getID();
 
  101                                 $page_gui->setViewPageLink(ILIAS_HTTP_PATH.
"/goto.php?target=pg_".$this->obj->getId().
 
  105                                 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  107                                         $this->content_object->getStyleSheetId(), 
"lm"));
 
  108                                 $page_gui->setIntLinkHelpDefault(
"StructureObject", 
$_GET[
"ref_id"]);
 
  109                                 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
 
  110                                 $page_gui->getPageObject()->buildDom();
 
  111                                 $int_links = $page_gui->getPageObject()->getInternalLinks();
 
  113                                 $page_gui->setLinkXML($link_xml);
 
  115                                 $page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
 
  116                                 $page_gui->setFileDownloadLink(
"ilias.php?cmd=downloadFile&ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
 
  117                                 $page_gui->setFullscreenLink(
"ilias.php?cmd=fullscreen&ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
 
  118                                 $page_gui->setLinkParams(
"ref_id=".$this->content_object->getRefId());
 
  119                                 $page_gui->setSourcecodeDownloadScript(
"ilias.php?ref_id=".
$_GET[
"ref_id"].
"&baseClass=ilLMPresentationGUI");
 
  120                                 $page_gui->setPresentationTitle(
 
  122                                         $this->content_object->getPageHeader(), $this->content_object->isActiveNumbering()));
 
  123                                 $page_gui->setLocator($contObjLocator);
 
  124                                 $page_gui->setHeader($this->lng->txt(
"page").
": ".$this->obj->getTitle());
 
  125                                 $page_gui->setEnabledActivation(
true);
 
  126                                 $page_gui->setEnabledSelfAssessment(
true, 
false);
 
  127                                 $page_gui->setEnabledInternalLinks(
true);
 
  128                                 $page_gui->setEnableKeywords(
true);
 
  129                                 $page_gui->setEnabledInternalLinks(
true);
 
  130                                 $page_gui->setEnableAnchors(
true);
 
  131                                 if ($lm_set->get(
"time_scheduled_page_activation"))
 
  133                                         $page_gui->setEnabledScheduledActivation(
true);
 
  135                                 $page_gui->setActivationListener($this, 
"activatePage");
 
  138                                 if ($mset->get(
"mep_activate_pages"))
 
  140                                         $page_gui->enableContentIncludes(
true);
 
  145                                 $up_gui = ($this->content_object->getType() == 
"dbk")
 
  147                                         : 
"ilobjlearningmodulegui";
 
  148                                 $ilCtrl->setParameterByClass($up_gui, 
"active_node", $this->obj->getId());
 
  149                                 $page_gui->setExplorerUpdater(
"tree", 
"tree_div",
 
  150                                 $ilCtrl->getLinkTargetByClass($up_gui, 
"explorer", 
"", 
true));
 
  153                                 $tpl->setTitle($this->lng->txt(
"page").
": ".$this->obj->getTitle());
 
  154                                 if ($this->content_object->getLayoutPerPage())
 
  156                                         $page_gui->setTabHook($this, 
"addPageTabs");
 
  158                                 $ret = $this->ctrl->forwardCommand($page_gui);
 
  161                                 $tpl->setContent(
$ret);
 
  177                 $this->ctrl->setCmdClass(
"ilpageobjectgui");
 
  178                 $this->ctrl->setCmd(
"edit");
 
  188                 $this->ctrl->setCmdClass(
"ilpageobjectgui");
 
  189                 $this->ctrl->setCmd(
"preview");
 
  200                 $this->obj->setType(
"pg");
 
  203                 $this->obj->setLMId($this->content_object->getId());
 
  204                 $this->obj->create();
 
  209                 if (
$_GET[
"obj_id"] != 0)
 
  219                 $up_gui = ($this->content_object->getType() == 
"dbk")
 
  221                         : 
"ilobjlearningmodulegui";
 
  222                 $this->ctrl->redirectByClass($up_gui, 
"pages");
 
  230                 if (
$_GET[
"obj_id"] != 0)
 
  235                 $up_gui = ($this->content_object->getType() == 
"dbk")
 
  237                         : 
"ilobjlearningmodulegui";
 
  238                 $this->ctrl->redirectByClass($up_gui, 
"pages");
 
  246                 if ($a_layoutframes == 
"")
 
  248                         $a_layoutframes = array();
 
  250                 $link_info = 
"<IntLinkInfos>";
 
  251                 foreach ($a_int_links as $int_link)
 
  253                         $target = $int_link[
"Target"];
 
  254                         if (substr($target, 0, 4) == 
"il__")
 
  258                                 $type = $int_link[
"Type"];
 
  259                                 $targetframe = ($int_link[
"TargetFrame"] != 
"")
 
  260                                         ? $int_link[
"TargetFrame"]
 
  264                                 $anc = $anc_add = 
"";
 
  265                                 if ($int_link[
"Anchor"] != 
"")
 
  267                                         $anc = $int_link[
"Anchor"];
 
  268                                         $anc_add = 
"_".rawurlencode($int_link[
"Anchor"]);
 
  274                                         case "StructureObject":
 
  277                                                 if ($lm_id == $cont_obj->getId())
 
  280                                                         if ($type == 
"PageObject")
 
  282                                                                 $this->ctrl->setParameter($this, 
"obj_id", 
$target_id);
 
  283                                                                 $href = $this->ctrl->getLinkTargetByClass(get_class($this), 
"edit");
 
  287                                                                 $this->ctrl->setParameterByClass(
"ilstructureobjectgui", 
"obj_id", 
$target_id);
 
  288                                                                 $href = $this->ctrl->getLinkTargetByClass(
"ilstructureobjectgui", 
"view");
 
  290                                                         $href = str_replace(
"&", 
"&", $href);
 
  291                                                         $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
  295                                                         if ($type == 
"PageObject")
 
  297                                                                 $href = 
"../goto.php?target=pg_".$target_id.$anc_add;
 
  301                                                                 $href = 
"../goto.php?target=st_".$target_id;
 
  303                                                         $ltarget = 
"ilContObj".$lm_id;
 
  308                                                 $ltarget = $nframe = 
"_blank";
 
  309                                                 $href = 
"ilias.php?cmdClass=illmpresentationgui&baseClass=ilLMPresentationGUI&".
 
  310                                                         "obj_type=$type&cmd=glossary&ref_id=".$_GET[
"ref_id"].
 
  311                                                         "&obj_id=".$target_id.
"&frame=$nframe";
 
  315                                                 $ltarget = $nframe = 
"_blank";
 
  316                                                 $href = 
"ilias.php?cmdClass=illmpresentationgui&baseClass=ilLMPresentationGUI&obj_type=$type&cmd=media&ref_id=".$_GET[
"ref_id"].
 
  317                                                         "&mob_id=".$target_id.
"&frame=$nframe";
 
  320                                         case "RepositoryItem":
 
  323                                                 $href = 
"./goto.php?target=".$obj_type.
"_".
$target_id;
 
  329                                 $anc_par = 
'Anchor="'.$anc.
'"';
 
  331                                 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
 
  332                                         "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
 
  335                 $link_info.= 
"</IntLinkInfos>";
 
  367                 require_once(
"classes/class.ilHistory.php");
 
  369                         "", $this->content_object->getType().
":pg",
 
  382                 #include_once("classes/class.ilTabsGUI.php"); 
  383                 #$tabs_gui =& new ilTabsGUI(); 
  384                 $this->getTabs($ilTabs);
 
  386                 $this->tpl->setCurrentBlock(
"header_image");
 
  388                 $this->tpl->parseCurrentBlock();
 
  389                 $this->tpl->setCurrentBlock(
"content");
 
  391                 #$this->tpl->setVariable("TABS", $tabs_gui->getHTML()); 
  392                 $this->tpl->setVariable(
"HEADER",
 
  393                         $this->lng->txt($this->obj->getType()).
": ".$this->obj->getTitle());
 
  443                 $first = strpos($a_target, 
"_");
 
  444                 $second = strpos($a_target, 
"_", $first + 1);
 
  445                 $page_id = substr($a_target, 0, $first);
 
  448                         $page_id = substr($a_target, 0, $first);
 
  451                                 $ref_id = substr($a_target, $first + 1, $second - ($first + 1));
 
  452                                 $anchor = substr($a_target, $second + 1);
 
  456                                 $ref_id = substr($a_target, $first + 1);
 
  461                         $page_id = $a_target;
 
  471                 if (in_array(
$ref_id, $ref_ids))
 
  473                         $ref_ids = array_merge(array(
$ref_id), $ref_ids);
 
  480                         if ($ilAccess->checkAccess(
"read", 
"", $ref_id))
 
  484                                 $_GET[
"baseClass"] = 
"ilLMPresentationGUI";
 
  485                                 $_GET[
"obj_id"] = $page_id;
 
  487                                 $_GET[
"anchor"] = $anchor;
 
  488                                 include_once(
"ilias.php");
 
  493                 if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID))
 
  495                         $_GET[
"cmd"] = 
"frameset";
 
  496                         $_GET[
"target"] = 
"";
 
  497                         $_GET[
"ref_id"] = ROOT_FOLDER_ID;
 
  505                                 $lng->loadLanguageModule(
"content");
 
  508                         include(
"repository.php");
 
  512                 $ilErr->raiseError($lng->txt(
"msg_no_perm_read_lm"), $ilErr->FATAL);
 
  522                 $page_gui =& 
new ilPageObjectGUI($this->obj->content_object->getType(),
 
  523                         $this->obj->getId());
 
  525                 $page_gui->activateMetaDataEditor($this->content_object->getID(),
 
  526                         $this->obj->getId(), $this->obj->getType(),
 
  528                 $page_gui->setActivationListener($this, 
"activatePage");
 
  529                 $page_gui->setTabHook($this, 
"addPageTabs");
 
  530                 $page_gui->setEnabledActivation(
true);
 
  532                 if ($lm_set->get(
"time_scheduled_page_activation"))
 
  534                         $page_gui->setEnabledScheduledActivation(
true);
 
  537                 $tpl->setTitle($this->lng->txt(
"page").
": ".$this->obj->getTitle());
 
  538                 $ilCtrl->getHTML($page_gui);
 
  539                 $ilTabs->setTabActive(
"cont_layout");
 
  541                 $tpl->setContent($this->form->getHTML());
 
  553                 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  561                         $im_tag = 
ilUtil::img($im, $this->content_object->getLayout());
 
  564                         "<table><tr><td>".$im_tag.
"</td><td><b>".$lng->txt(
"cont_lm_default_layout").
 
  565                         "</b>: ".$lng->txt(
"cont_layout_".$this->content_object->getLayout()).
"</td></tr></table>";
 
  573                         $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>";
 
  576                 $layout->setValue($this->obj->getLayout());
 
  577                 $this->form->addItem($layout);
 
  579                 $this->form->addCommandButton(
"saveLayout", $lng->txt(
"save"));
 
  581                 $this->form->setTitle($lng->txt(
"cont_page_layout"));
 
  582                 $this->form->setFormAction($ilCtrl->getFormAction($this));
 
  595                 if ($this->form->checkInput())
 
  599                         $ilCtrl->redirect($this, 
"editLayout");
 
  601                 $this->form->setValuesByPost();
 
  602                 $tpl->setContent($this->form->getHtml());
 
  612                 $ilTabs->addTarget(
"cont_layout",
 
  613                          $ilCtrl->getLinkTarget($this, 
'editLayout'), 
"editLayout");