4require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
 
    5require_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
 
    6require_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
    7require_once 
'Modules/LearningModule/classes/class.ilLMPageObject.php';
 
   96        $this->
user = $DIC->user();
 
   97        $this->rbacsystem = 
$DIC->rbac()->system();
 
   98        $this->
error = $DIC[
"ilErr"];
 
   99        $this->nav_history = 
$DIC[
"ilNavigationHistory"];
 
  100        $this->access = 
$DIC->access();
 
  102        $this->locator = 
$DIC[
"ilLocator"];
 
  103        $this->tree = 
$DIC->repositoryTree();
 
  104        $this->help = 
$DIC[
"ilHelp"];
 
  113        $lng->loadLanguageModule(
"content");
 
  117        $this->offline = 
false;
 
  118        $this->frames = array();
 
  120        $this->ctrl->saveParameter($this, array(
"ref_id", 
"transl", 
"focus_id", 
"focus_return"));
 
  123        include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
 
  125        $this->lm = $this->lm_gui->object;
 
  128        include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
 
  133        if ($this->ot->getContentActivated()) {
 
  134            $langs = $this->ot->getLanguages();
 
  135            if (isset($langs[
$_GET[
"transl"]]) || 
$_GET[
"transl"] == $this->ot->getMasterLanguage()) {
 
  136                $this->lang = 
$_GET[
"transl"];
 
  137            } elseif (isset($langs[
$ilUser->getCurrentLanguage()])) {
 
  138                $this->lang = 
$ilUser->getCurrentLanguage();
 
  140            if ($this->lang == $this->ot->getMasterLanguage()) {
 
  147            if ($this->lm->getOfflineStatus()) {
 
  152        include_once(
"./Modules/LearningModule/classes/class.ilLMTree.php");
 
  159        if ((
int) 
$_GET[
"focus_id"] > 0 && $this->lm_tree->isInTree((
int) 
$_GET[
"focus_id"])) {
 
  160            $this->focus_id = (int) 
$_GET[
"focus_id"];
 
  179        if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) &&
 
  180            (!(($this->ctrl->getCmd() == 
"infoScreen" || $this->ctrl->getNextClass() == 
"ilinfoscreengui")
 
  181            && $ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"])))) {
 
  185        $next_class = $this->ctrl->getNextClass($this);
 
  186        $cmd = $this->ctrl->getCmd(
"layout", array(
"showPrintView"));
 
  188        $cmd = (isset(
$_POST[
'cmd'][
'citation']))
 
  192        $obj_id = 
$_GET[
"obj_id"];
 
  193        $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
  194        $ilNavigationHistory->addItem(
$_GET[
"ref_id"], $this->ctrl->getLinkTarget($this), 
"lm");
 
  195        $this->ctrl->setParameter($this, 
"obj_id", $obj_id);
 
  197        switch ($next_class) {
 
  202            case "ilinfoscreengui":
 
  206            case "ilcommonactiondispatchergui":
 
  207                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  209                $gui->enableCommentsSettings(
false);
 
  210                $this->ctrl->forwardCommand($gui);
 
  214                include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
  220            case "ilglossarydefpagegui":
 
  221                include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  227            case "illearningprogressgui":
 
  229                include_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
  231                $this->ctrl->forwardCommand($new_gui);
 
  235                include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
 
  237                $rating_gui->setObject($this->lm->getId(), 
"lm", 
$_GET[
"obj_id"], 
"lm");
 
  238                $this->ctrl->forwardCommand($rating_gui);
 
  242                $ret = $this->$cmd();
 
  253        $this->offline = $a_offline;
 
  254        $this->export_all_languages = $a_all_languages;
 
  273        $this->export_format = $a_format;
 
  283        return $this->export_format;
 
  312        include_once(
"./Modules/LearningModule/classes/class.ilLMTracker.php");
 
  321        if (!is_array($a_attributes)) {
 
  324        foreach ($a_attributes as $attribute) {
 
  325            $attr[$attribute->name()] = $attribute->value();
 
  335        return $this->frames;
 
  346            $layout = $this->lm->getLayout();
 
  347            if ($this->lm->getLayoutPerPage()) {
 
  349                if (!in_array(
$_GET[
"frame"], array(
"", 
"_blank")) && 
$_GET[
"from_page"] > 0) {
 
  350                    $pg_id = (int) 
$_GET[
"from_page"];
 
  354                if (in_array(
$_GET[
"cmd"], array(
"media", 
"glossary")) && 
$_GET[
"back_pg"] > 0) {
 
  355                    $pg_id = (int) 
$_GET[
"back_pg"];
 
  374        if (
$ilUser->getId() != ANONYMOUS_USER_ID && 
$_GET[
"focus_id"] == 
"") {
 
  375            include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
 
  379            if ($last_accessed_page &&
 
  380                $last_accessed_page != $this->lm_tree->getLastActivePage()) {
 
  381                $_GET[
"obj_id"] = $last_accessed_page;
 
  391    public function layout($a_xml = 
"main.xml", $doShow = 
true)
 
  405        $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/" . $layout . 
"/" . $a_xml);
 
  408            include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
 
  410                $layout . 
"/" . $a_xml . 
".");
 
  412        $this->layout_doc = $doc;
 
  418            ? 
"/ilLayout/ilFrame[1]" 
  419            : 
"//ilFrame[@name='" . 
$_GET[
"frame"] . 
"']";
 
  422        if (count($found) != 1) {
 
  423            include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
 
  425                " path " . 
$path . 
" in " . $layout . 
"/" . $a_xml . 
". LM Layout is " . $this->lm->getLayout());
 
  433        $this->frames = array();
 
  438            $content .= $this->
buildTag(
"end", 
"frameset");
 
  439            $this->tpl = 
new ilTemplate(
"tpl.frameset.html", 
true, 
true, 
"Modules/LearningModule");
 
  441            $this->tpl->setVariable(
"FS_CONTENT", $content);
 
  443                $content = $this->tpl->get();
 
  449                && (
$_GET[
"frame"] != 
"_blank" || 
$_GET[
"obj_type"] != 
"MediaObject")) {
 
  455                if (empty(
$_GET[
"obj_type"])) {
 
  456                    $obj_type = 
"PageObject";
 
  458                    $obj_type = 
$_GET[
"obj_type"];
 
  462                $childs = $node->child_nodes();
 
  464                foreach ($childs as $child) {
 
  465                    if ($child->node_name() == $obj_type) {
 
  474                    include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
 
  476                        $_GET[
"frame"] . 
"' and object type '" . $obj_type . 
"'.");
 
  481            $in_module = (
$attributes[
"template_location"] == 
"module")
 
  486                $this->tpl->setBodyClass(
"");
 
  495                $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
  496                $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
  499            include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
  504            include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
 
  510            $childs = $node->child_nodes();
 
  512            foreach ($childs as $child) {
 
  513                $child_attr = $this->
attrib2arr($child->attributes());
 
  515                switch ($child->node_name()) {
 
  522                        $this->
ilTOC($child_attr[
"target_frame"]);
 
  527                        switch ($this->lm->getType()) {
 
  532                                $content = $this->
ilPage($child);
 
  541                    case "ilLMNavigation":
 
  555                            $child_attr[
"inline"],
 
  557                            $child_attr[
"location"]
 
  588                include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
 
  593                $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
 
  594                include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  596                $this->tpl->addOnLoadCode($close_call);
 
  601                if (
$_GET[
"frame"] == 
"") {
 
  602                    include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
 
  604                    $last_frame_url = 
$store->get(
"cf_" . $this->lm->getId());
 
  605                    if ($last_frame_url != 
"") {
 
  606                        $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('" . $last_frame_url . 
"', 'center_bottom');");
 
  609                    if (in_array($layout, array(
"toc2windyn"))) {
 
  610                        $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('" .
 
  611                            $ilCtrl->getLinkTarget($this, 
"saveFrameUrl", 
"", 
false, 
false) . 
"'); 
  612                                                        il.LearningModule.openInitFrames(); 
  615                    $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('" .
 
  616                        $ilCtrl->getLinkTarget($this, 
"refreshToc", 
"", 
false, 
false) . 
"'); 
  622                $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
 
  624                $this->tpl->fillJavaScriptFiles();
 
  625                $this->tpl->fillScreenReaderFocus();
 
  627                $this->tpl->fillCssFiles();
 
  630                $this->tpl->resetJavascript();
 
  631                $this->tpl->resetCss();
 
  632                $this->tpl->setBodyClass(
"ilLMNoMenu");
 
  634                include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
  636                    if (
$f[
"type"] == 
"js") {
 
  637                        $this->tpl->addJavascript(
$f[
"target"]);
 
  639                    if (
$f[
"type"] == 
"css") {
 
  640                        $this->tpl->addCSS(
$f[
"target"]);
 
  643                $this->tpl->fillJavaScriptFiles(
true);
 
  644                $this->tpl->fillCssFiles(
true);
 
  648            $this->tpl->fillBodyClass();
 
  656            $this->tpl->fillTabs();
 
  657            if ($this->fill_on_load_code) {
 
  658                $this->tpl->fillOnLoadCode();
 
  661            $content = $this->tpl->get();
 
  662            $content = str_replace(
"{", 
"{", $content);
 
  663            $content = str_replace(
"}", 
"}", $content);
 
  665            header(
'Content-type: text/html; charset=UTF-8');
 
  668            $this->tpl->fillLeftNav();
 
  669            $this->tpl->fillOnLoadCode();
 
  671            $content = $this->tpl->get();
 
  685        include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
 
  687        if (
$_GET[
"url"] != 
"") {
 
  688            $store->set(
"cf_" . $this->lm->getId(), 
$_GET[
"url"]);
 
  690            $store->set(
"cf_" . $this->lm->getId(), 
$_GET[
"url"]);
 
  702        if (
$_GET[
"frame"] != 
"_blank") {
 
  715        if (
$_GET[
"frame"] != 
"_blank") {
 
  718            $this->tpl = 
new ilTemplate(
"tpl.glossary_term_output.html", 
true, 
true, 
true);
 
  726                $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
  728                $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
  735                return $this->tpl->get();
 
  747        $ltiview = 
$DIC[
"lti"];
 
  748        if ($ltiview->isActive()) {
 
  749            include_once 
'./Services/LTI/classes/class.ilMainMenuGUI.php';
 
  752            include_once 
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
 
  757            $this->tpl->touchBlock(
"pg_intro");
 
  758            $this->tpl->touchBlock(
"pg_outro");
 
  764            $ilMainMenu->setLoginTargetPar(
"pg_" . $page_id . 
"_" . $this->lm->getRefId());
 
  769        $this->tpl->touchBlock(
"pg_intro");
 
  770        $this->tpl->touchBlock(
"pg_outro");
 
  771        $this->tpl->setBodyClass(
"std");
 
  772        $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
 
  774        $this->tpl->setVariable(
"MAINMENU_SPACER", $ilMainMenu->getSpacerClass());
 
  780    public function ilTOC($a_get_explorer = 
false)
 
  782        include_once(
"./Modules/LearningModule/classes/class.ilLMTOCExplorerGUI.php");
 
  783        $exp = 
new ilLMTOCExplorerGUI($this, 
"ilTOC", $this, $this->lang, $this->focus_id, $this->export_all_languages);
 
  784        $exp->setMainTemplate($this->tpl);
 
  788        if ($this->deactivated_page) {
 
  789            $page_id = 
$_GET[
"obj_id"];
 
  792            $exp->setPathOpen((
int) $page_id);
 
  795        if ($this->chapter_has_no_active_page &&
 
  797            $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
  799            if ($this->lm->getTOCMode() == 
"pages") {
 
  800                if ($this->deactivated_page) {
 
  801                    $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
  803                    $exp->setHighlightNode($page_id);
 
  806                $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
 
  810            $exp->setOfflineMode(
true);
 
  812        if (!$exp->handleCommand()) {
 
  813            if ($a_get_explorer) {
 
  816                $this->tpl->setCurrentBlock(
"il_toc");
 
  817                $this->tpl->setVariable(
"EXPLORER", $exp->getHTML());
 
  818                $this->tpl->parseCurrentBlock();
 
  831        if ($this->
offlineMode() && $this->lang != 
"" && $this->lang != 
"-") {
 
  832            include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
 
  834            $data = $ot->getLanguages();
 
  840        return $this->lm->getTitle();
 
  849        $this->tpl->setVariable(
"MENU", $this->lm_gui->setilLMMenu(
 
  850            $this->offlineMode(),
 
  851            $this->getExportFormat(),
 
  855            $this->getCurrentPageId(),
 
  857            $this->export_all_languages
 
  866        $this->tpl->setCurrentBlock(
"header_image");
 
  868            $this->tpl->setVariable(
"IMG_HEADER", 
"./images/icon_lm.svg");
 
  872        $this->tpl->parseCurrentBlock();
 
  873        $this->tpl->setCurrentBlock(
"lm_head");
 
  875        $this->tpl->parseCurrentBlock();
 
  885        if ($this->
abstract) {
 
  889        $showViewInFrameset = 
true;
 
  891        if ($showViewInFrameset) {
 
  894            $buttonTarget = 
"_top";
 
  898        include_once(
"./Services/UICore/classes/class.ilTemplate.php");
 
  899        $tpl_menu = 
new ilTemplate(
"tpl.lm_sub_menu.html", 
true, 
true, 
true);
 
  909                $tpl_menu->setCurrentBlock(
"edit_page");
 
  911                $tpl_menu->setVariable(
"EDIT_LINK", ILIAS_HTTP_PATH . 
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . 
$_GET[
"ref_id"] .
 
  912                    "&obj_id=" . $page_id . 
"&to_page=1");
 
  913                $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
 
  914                $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
 
  915                $tpl_menu->parseCurrentBlock();
 
  920            include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
 
  923                $page_id . 
"_" . $this->lm->getRefId(),
 
  931                $this->lm->getPageHeader(),
 
  932                $this->lm->isActiveNumbering(),
 
  933                $this->lm_set->get(
"time_scheduled_page_activation"),
 
  938            if ($pg_title != 
"") {
 
  939                $title .= 
": " . $pg_title;
 
  942            $plinkgui->setTitle(
$title);
 
  944            $tpl_menu->setCurrentBlock(
"perma_link");
 
  945            $tpl_menu->setVariable(
"PERMA_LINK", $plinkgui->getHTML());
 
  946            $tpl_menu->parseCurrentBlock();
 
  949        $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
 
  970        include_once 
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
 
  974            $this->lm->getType(),
 
  980        include_once 
"Services/Object/classes/class.ilObjectListGUI.php";
 
  981        ilObjectListGUI::prepareJSLinks(
 
  982            $this->ctrl->getLinkTarget($this, 
"redrawHeaderAction", 
"", 
true),
 
  983            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"ilnotegui"), 
"", 
"", 
true, 
false),
 
  984            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"iltagginggui"), 
"", 
"", 
true, 
false),
 
  988        $lg = $dispatcher->initHeaderAction();
 
  989        $lg->enableNotes(
true);
 
  990        $lg->enableComments($this->lm->publicNotes(), 
false);
 
  992        if ($this->lm->hasRating() && !$this->offlineMode()) {
 
  995                $this->lng->txt(
"lm_rating"),
 
  997                array(
"ilcommonactiondispatchergui", 
"ilratinggui")
 
 1002            $this->tpl->setVariable(
"HEAD_ACTION", 
$lg->getHeaderAction($this->tpl));
 
 1005            return $lg->getHeaderAction() .
 
 1006                $tpl->getOnLoadCodeForAsynch();
 
 1036        if (!$this->lm->publicNotes()) {
 
 1040        $next_class = $this->ctrl->getNextClass($this);
 
 1042        include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
 1048        $notes_gui = 
new ilNoteGUI($this->lm->getId(), $this->getCurrentPageId(), 
"pg");
 
 1050        if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]) &&
 
 1052            $notes_gui->enablePublicNotesDeletion(
true);
 
 1055        $this->ctrl->setParameter($this, 
"frame", 
$_GET[
"frame"]);
 
 1056        $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1058        $notes_gui->enablePrivateNotes();
 
 1059        if ($this->lm->publicNotes()) {
 
 1060            $notes_gui->enablePublicNotes();
 
 1063        if ($next_class == 
"ilnotegui") {
 
 1064            $html = $this->ctrl->forwardCommand($notes_gui);
 
 1066            $html = $notes_gui->getNotesHTML();
 
 1068        $this->tpl->setVariable(
"NOTES", 
$html);
 
 1078        $ltiview = 
$DIC[
"lti"];
 
 1083        require_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
 
 1085        if (empty(
$_GET[
"obj_id"])) {
 
 1086            $a_id = $this->lm_tree->getRootId();
 
 1088            $a_id = 
$_GET[
"obj_id"];
 
 1091        if (!$a_std_templ_loaded) {
 
 1092            $this->tpl->addBlockFile(
"STATUSLINE", 
"statusline", 
"tpl.statusline.html");
 
 1095        if (!$this->lm->cleanFrames()) {
 
 1096            $frame_param = 
$_GET[
"frame"];
 
 1103            $frame_target = 
"_top";
 
 1108            if ($ltiview->isActive()) {
 
 1111                $ilLocator->addItem(
"...", 
"");
 
 1113                $par_id = 
$tree->getParentId(
$_GET[
"ref_id"]);
 
 1114                $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", $par_id);
 
 1115                $ilLocator->addItem(
 
 1117                    $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", 
"frameset"),
 
 1121                $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", 
$_GET[
"ref_id"]);
 
 1124            $ilLocator->setOffline(
true);
 
 1127        if ($this->lm_tree->isInTree($a_id)) {
 
 1128            $path = $this->lm_tree->getPathFull($a_id);
 
 1131                if (
$row[
"type"] != 
"pg") {
 
 1132                    if (
$row[
"child"] != $this->lm_tree->getRootId()) {
 
 1133                        $ilLocator->addItem(
 
 1138                                    $this->lm->isActiveNumbering(),
 
 1139                                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 1147                            $this->getLink(
$_GET[
"ref_id"], 
"layout", 
$row[
"child"], $frame_param, 
"StructureObject"),
 
 1151                        $ilLocator->addItem(
 
 1153                            $this->
getLink(
$_GET[
"ref_id"], 
"layout", 
"", $frame_param),
 
 1161            $ilLocator->addItem(
 
 1166            require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
 
 1169            $ilLocator->addItem(
 
 1170                $lm_obj->getTitle(),
 
 1171                $this->getLink(
$_GET[
"ref_id"], 
"layout", $a_id, $frame_param),
 
 1177            $debug = 
"DEBUG: <font color=\"red\">" . $this->type . 
"::" . $this->
id . 
"::" . 
$_GET[
"cmd"] . 
"</font><br/>";
 
 1183        $this->tpl->setLocator();
 
 1195        if (!$this->
offlineMode() && $this->current_page_id !== 
false) {
 
 1199        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 1201        $this->chapter_has_no_active_page = 
false;
 
 1202        $this->deactivated_page = 
false;
 
 1205        if (empty(
$_GET[
"obj_id"])) {
 
 1206            $obj_id = $this->lm_tree->getRootId();
 
 1208            $obj_id = 
$_GET[
"obj_id"];
 
 1211                $this->lm->getType(),
 
 1212                $this->lm_set->get(
"time_scheduled_page_activation")
 
 1217                $this->deactivated_page = 
true;
 
 1222        if (!$this->lm_tree->isInTree($obj_id)) {
 
 1226        $curr_node = $this->lm_tree->getNodeData($obj_id);
 
 1230            $this->lm->getType(),
 
 1231            $this->lm_set->get(
"time_scheduled_page_activation")
 
 1234        if ($curr_node[
"type"] == 
"pg" &&
 
 1236            $page_id = $curr_node[
"obj_id"];
 
 1241            while ($succ_node && !$active) {
 
 1242                $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
"pg");
 
 1243                $page_id = $succ_node[
"obj_id"];
 
 1246                    $this->lm->getType(),
 
 1247                    $this->lm_set->get(
"time_scheduled_page_activation")
 
 1251            if ($succ_node[
"type"] != 
"pg") {
 
 1252                $this->chapter_has_no_active_page = 
true;
 
 1257            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 1258               $this->lm_gui->object->getPublicAccessMode() == 
'selected') {
 
 1261                while ($public === 
false && $page_id > 0) {
 
 1262                    $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
'pg');
 
 1263                    $page_id = $succ_node[
'obj_id'];
 
 1269            if ($this->lm_tree->isInTree($page_id)) {
 
 1270                $path = $this->lm_tree->getPathId($page_id);
 
 1272                    $this->chapter_has_no_active_page = 
true;
 
 1277        $this->current_page_id = $page_id;
 
 1284        $this->tpl = 
new ilTemplate(
"tpl.page.html", 
true, 
true, 
true);
 
 1286        $this->tpl->setVariable(
"MENU", $this->lm_gui->setilCitationMenu());
 
 1288        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 1290        $this->pg_obj = $this->
getLMPage($page_id);
 
 1291        $xml = $this->pg_obj->getXMLContent();
 
 1292        $this->lm_gui->showCitation(
$xml);
 
 1299        if (!is_object($this->layout_doc)) {
 
 1305        $path = 
"/ilLayout/ilLinkTargets/LinkTarget";
 
 1308        for (
$i = 0; 
$i < count(
$res->nodeset); 
$i++) {
 
 1310            $frame = 
$res->nodeset[
$i]->get_attribute(
"Frame");
 
 1311            $onclick = 
$res->nodeset[
$i]->get_attribute(
"OnClick");
 
 1312            $targets[
$type] = array(
"Type" => 
$type, 
"Frame" => $frame, 
"OnClick" => $onclick);
 
 1325    public function ilPage(&$a_page_node, $a_page_id = 0)
 
 1334        $ilHelp->setScreenIdComponent(
"lm");
 
 1335        $ilHelp->setScreenId(
"content");
 
 1336        $ilHelp->setSubScreenId(
"content");
 
 1338        $this->fill_on_load_code = 
true;
 
 1343        if ($requested_page_lm != $this->lm->getId()) {
 
 1344            if ($_REQUEST[
"frame"] == 
"") {
 
 1348                $read_access = 
false;
 
 1350                    if (
$access->checkAccess(
"read", 
"", $ref_id)) {
 
 1351                        $read_access = 
true;
 
 1354                if (!$read_access) {
 
 1362        if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 1363           $this->lm_gui->object->getPublicAccessMode() == 
'selected') {
 
 1378            if ($this->lm->getRestrictForwardNavigation()) {
 
 1387        require_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
 1388        require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
 
 1391        if ($a_page_id == 0) {
 
 1397                include_once 
'./Services/Search/classes/class.ilUserSearchCache.php';
 
 1400                $search_string = $cache->getQuery();
 
 1403                if (is_array($search_string)) {
 
 1404                    $search_string = $search_string[
"lom_content"];
 
 1407                include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
 
 1408                include_once(
"./Services/Search/classes/class.ilQueryParser.php");
 
 1412                $words = $p->getQuotedWords();
 
 1413                if (is_array($words)) {
 
 1414                    foreach ($words as 
$w) {
 
 1419                $this->fill_on_load_code = 
true;
 
 1422            $page_id = $a_page_id;
 
 1426        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 1428            $this->tpl->setVariable(
 
 1429                "LOCATION_CONTENT_STYLESHEET",
 
 1433            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 1435        $this->tpl->parseCurrentBlock();
 
 1438        if ($this->chapter_has_no_active_page &&
 
 1441                "tpl.no_content_message.html",
 
 1444                "Modules/LearningModule" 
 1446            $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_no_page_in_chapter"));
 
 1453            $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
 
 1454            return $mtpl->get();
 
 1458        if ($this->deactivated_page) {
 
 1460                "tpl.no_content_message.html",
 
 1463                "Modules/LearningModule" 
 1465            $m = $this->lng->txt(
"cont_page_currently_deactivated");
 
 1467            if ($act_data[
"show_activation_info"] &&
 
 1468                (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 1469                $m .= 
"<p>" . sprintf(
 
 1470                    $this->lng->txt(
"cont_page_activation_on"),
 
 1477            $mtpl->setVariable(
"MESSAGE", 
$m);
 
 1484            $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
 
 1485            return $mtpl->get();
 
 1490        if ($this->focus_id > 0) {
 
 1491            $path = $this->lm_tree->getPathId($page_id);
 
 1494            if (!in_array($this->focus_id, 
$path)) {
 
 1496                    "tpl.out_of_focus_message.html",
 
 1499                    "Modules/LearningModule" 
 1501                $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message"));
 
 1502                $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
 
 1505                    $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
 
 1506                    $this->ctrl->setParameter($this, 
"obj_id", $this->focus_id);
 
 1507                    $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1508                    $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1510                    $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
 
 1511                    include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1515                $this->ctrl->setParameter($this, 
"focus_id", 
"");
 
 1516                $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1517                $this->ctrl->setParameter($this, 
"focus_id", 
$_GET[
"focus_id"]);
 
 1519                $focus_mess = $mtpl->get();
 
 1526                if ($sp == 0 || !in_array($this->focus_id, $path2)) {
 
 1528                        "tpl.out_of_focus_message.html",
 
 1531                        "Modules/LearningModule" 
 1533                    $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message_last_page"));
 
 1534                    $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
 
 1537                        $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
 
 1538                        $this->ctrl->setParameter($this, 
"obj_id", $this->focus_id);
 
 1539                        $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1540                        $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1542                        $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
 
 1543                        include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1547                    $this->ctrl->setParameter($this, 
"focus_id", 
"");
 
 1548                    $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1549                    $this->ctrl->setParameter($this, 
"focus_id", 
$_GET[
"focus_id"]);
 
 1551                    $focus_mess = $mtpl->get();
 
 1557        if ($page_id == 0) {
 
 1558            $cont = $this->lng->txt(
"cont_no_page");
 
 1559            $this->tpl->setVariable(
"PAGE_CONTENT", $cont);
 
 1566        $page_object = $page_object_gui->getPageObject();
 
 1567        $page_object->buildDom();
 
 1568        $page_object->registerOfflineHandler($this);
 
 1570        $int_links = $page_object->getInternalLinks();
 
 1574        $page_object_gui->setTemplateOutput(
false);
 
 1577        $ilUser->setDesktopItemParameters($this->lm->getRefId(), $this->lm->getType(), $page_id);
 
 1580        include_once 
'./Modules/Course/classes/class.ilCourseLMHistory.php';
 
 1589        $lm_pg_obj->setLMId($this->lm->getId());
 
 1591        $page_object_gui->setLinkXML($link_xml);
 
 1595        $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 1598        if ($page_id == 0 || ($page_id != $this->lm->getHeaderPage() &&
 
 1599            $page_id != $this->lm->getFooterPage())) {
 
 1600            $page_object_gui->setPresentationTitle(
 
 1602                    $lm_pg_obj->getId(),
 
 1603                    $this->lm->getPageHeader(),
 
 1604                    $this->lm->isActiveNumbering(),
 
 1605                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 1617            $page_object_gui->setEnabledPageFocus(
false);
 
 1618            $page_object_gui->getPageConfig()->setEnableSelfAssessment(
false);
 
 1622        $page_object_gui->setLinkParams(
"ref_id=" . $this->lm->getRefId());
 
 1623        $page_object_gui->setTemplateTargetVar(
"PAGE_CONTENT");
 
 1627        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 1629            $this->tpl->setVariable(
 
 1630                "LOCATION_SYNTAX_STYLESHEET",
 
 1634            $this->tpl->setVariable(
 
 1635                "LOCATION_SYNTAX_STYLESHEET",
 
 1636                "syntaxhighlight.css" 
 1639        $this->tpl->parseCurrentBlock();
 
 1642        $ret = $page_object_gui->presentation($page_object_gui->getOutputMode());
 
 1645        if ($this->lm->getHeaderPage() > 0 &&
 
 1646            $page_id != $this->lm->getHeaderPage() &&
 
 1647            ($page_id == 0 || $page_id != $this->lm->getFooterPage())) {
 
 1649                $head = $this->
ilPage($a_page_node, $this->lm->getHeaderPage());
 
 1654        if ($this->lm->getFooterPage() > 0 &&
 
 1655            $page_id != $this->lm->getFooterPage() &&
 
 1656            ($page_id == 0 || $page_id != $this->lm->getHeaderPage())) {
 
 1658                $foot = $this->
ilPage($a_page_node, $this->lm->getFooterPage());
 
 1664        if ($this->lm->hasRatingPages() && !$this->offlineMode()) {
 
 1665            include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
 
 1667            $rating_gui->setObject($this->lm->getId(), 
"lm", $page_id, 
"lm");
 
 1668            $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
 
 1675            $this->ctrl->setParameter($this, 
"pgid", $page_id);
 
 1676            $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('" .
 
 1677                $this->ctrl->getLinkTarget($this, 
"updatePageRating", 
"", 
true, 
false) .
 
 1679            $this->ctrl->setParameter($this, 
"pgid", 
"");
 
 1681            $rating = 
'<div id="ilrtrpg" style="text-align:right">' .
 
 1682                $rating_gui->getHtml(
true, 
true, 
"il.LearningModule.saveRating(%rating%);") .
 
 1686        $this->tpl->setVariable(
"PAGE_CONTENT", $rating . $head . $focus_mess . 
$ret . $foot);
 
 1688        return $head . $focus_mess . 
$ret . $foot;
 
 1695        $pg_id = 
$_GET[
"pgid"];
 
 1696        if (!$this->ctrl->isAsynch() || !$pg_id) {
 
 1700        include_once 
'./Services/Rating/classes/class.ilRating.php';
 
 1701        $rating = (int) 
$_POST[
"rating"];
 
 1721        include_once 
'./Services/Rating/classes/class.ilRatingGUI.php';
 
 1723        $rating->setObject($this->lm->getId(), 
"lm", $pg_id, 
"lm", 
$ilUser->getId());
 
 1724        $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
 
 1726        echo $rating->getHtml(
true, 
true, 
"il.LearningModule.saveRating(%rating%);");
 
 1728        echo $this->tpl->getOnLoadCodeForAsynch();
 
 1740        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1742            $this->lm->getStyleSheetId(),
 
 1746            $a_page_gui->setOutputMode(
"presentation");
 
 1747            $this->fill_on_load_code = 
true;
 
 1749            $a_page_gui->setOutputMode(
"offline");
 
 1751            $this->fill_on_load_code = 
false;
 
 1756        $a_page_gui->setFileDownloadLink($this->
getLink(
$_GET[
"ref_id"], 
"downloadFile"));
 
 1758            $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1760        $a_page_gui->setFullscreenLink($this->
getLink(
$_GET[
"ref_id"], 
"fullscreen"));
 
 1774        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 1776            $this->tpl->setVariable(
 
 1777                "LOCATION_CONTENT_STYLESHEET",
 
 1781            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 1783        $this->tpl->parseCurrentBlock();
 
 1785        $this->tpl->addBlockFile(
"PAGE_CONTENT", 
"pg_content", 
"tpl.page_preconditions.html", 
true);
 
 1788        include_once(
"./Services/Repository/classes/class.ilRepositoryExplorer.php");
 
 1789        foreach ($conds as $cond) {
 
 1790            include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1792            $this->tpl->setCurrentBlock(
"condition");
 
 1794            $this->tpl->setVariable(
"LINK_ITEM", $obj_link);
 
 1795            if ($cond[
"operator"] == 
"passed") {
 
 1796                $cond_str = $this->lng->txt(
"passed");
 
 1798                $cond_str = $this->lng->txt(
"condition_" . $cond[
"operator"]);
 
 1800            $this->tpl->setVariable(
"VAL_CONDITION", $cond_str . 
" " . $cond[
"value"]);
 
 1801            $this->tpl->parseCurrentBlock();
 
 1803        $this->tpl->setCurrentBlock(
"pg_content");
 
 1805        $this->tpl->setVariable(
 
 1806            "TXT_MISSING_PRECONDITIONS",
 
 1808                $this->lng->txt(
"cont_missing_preconditions"),
 
 1812        $this->tpl->setVariable(
"TXT_ITEM", $this->lng->txt(
"object"));
 
 1813        $this->tpl->setVariable(
"TXT_CONDITION", $this->lng->txt(
"condition"));
 
 1816        $parent = $this->lm_tree->getParentId($topchap);
 
 1817        $childs = $this->lm_tree->getChildsByType($parent, 
"st");
 
 1821        foreach ($childs as $child) {
 
 1822            if ($child[
"child"] == $topchap) {
 
 1825            if (
$i++ == ($j + 1)) {
 
 1826                $succ_node = $this->lm_tree->fetchSuccessorNode($child[
"child"], 
"pg");
 
 1829        if ($succ_node != 
"") {
 
 1830            $framestr = (!empty(
$_GET[
"frame"]))
 
 1831                ? 
"frame=" . 
$_GET[
"frame"] . 
"&" 
 1834            $showViewInFrameset = 
true;
 
 1835            $link = 
"<br /><a href=\"" .
 
 1836                $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"], 
$_GET[
"frame"]) .
 
 1837                "\">" . $this->lng->txt(
"cont_skip_chapter") . 
"</a>";
 
 1838            $this->tpl->setVariable(
"LINK_SKIP_CHAPTER", $link);
 
 1841        $this->tpl->parseCurrentBlock();
 
 1853        $showViewInFrameset = 
true;
 
 1855        if ($a_layoutframes == 
"") {
 
 1856            $a_layoutframes = array();
 
 1858        $link_info = 
"<IntLinkInfos>";
 
 1859        foreach ($a_int_links as $int_link) {
 
 1860            $target = $int_link[
"Target"];
 
 1861            if (substr(
$target, 0, 4) == 
"il__") {
 
 1864                $type = $int_link[
"Type"];
 
 1865                $targetframe = ($int_link[
"TargetFrame"] != 
"")
 
 1866                    ? $int_link[
"TargetFrame"]
 
 1870                $anc = $anc_add = 
"";
 
 1871                if ($int_link[
"Anchor"] != 
"") {
 
 1872                    $anc = $int_link[
"Anchor"];
 
 1873                    $anc_add = 
"_" . rawurlencode($int_link[
"Anchor"]);
 
 1878                    case "StructureObject":
 
 1880                        if ($lm_id == $this->lm->getId() ||
 
 1881                            ($targetframe != 
"None" && $targetframe != 
"New")) {
 
 1882                            $ltarget = $a_layoutframes[$targetframe][
"Frame"];
 
 1886                            $nframe = ($ltarget == 
"")
 
 1889                            if ($ltarget == 
"") {
 
 1890                                if ($showViewInFrameset) {
 
 1891                                    $ltarget = 
"_parent";
 
 1917                                if (
$type == 
"PageObject") {
 
 1918                                    $href = 
"./goto.php?target=pg_" . 
$target_id . $anc_add;
 
 1920                                    $href = 
"./goto.php?target=st_" . 
$target_id;
 
 1923                                if (
$type == 
"PageObject") {
 
 1924                                    $href = ILIAS_HTTP_PATH . 
"/goto.php?target=pg_" . 
$target_id . $anc_add . 
"&client_id=" . CLIENT_ID;
 
 1926                                    $href = ILIAS_HTTP_PATH . 
"/goto.php?target=st_" . 
$target_id . 
"&client_id=" . CLIENT_ID;
 
 1929                            if ($targetframe != 
"New") {
 
 1932                                $ltarget = 
"_blank";
 
 1937                    case "GlossaryItem":
 
 1938                        if ($targetframe == 
"None") {
 
 1939                            $targetframe = 
"Glossary";
 
 1941                        $ltarget = $a_layoutframes[$targetframe][
"Frame"];
 
 1942                        $nframe = ($ltarget == 
"")
 
 1950                        $ltarget = $a_layoutframes[$targetframe][
"Frame"];
 
 1951                        $nframe = ($ltarget == 
"")
 
 1958                    case "RepositoryItem":
 
 1962                            $href = 
"./goto.php?target=" . $obj_type . 
"_" . 
$target_id;
 
 1964                            $href = ILIAS_HTTP_PATH . 
"/goto.php?target=" . $obj_type . 
"_" . 
$target_id . 
"&client_id=" . CLIENT_ID;
 
 1970                        include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
 1978                            $href = 
$ilCtrl->getLinkTarget($this, 
"downloadFile");
 
 1979                            $ilCtrl->setParameter($this, 
"file_id", 
"");
 
 1980                            $ilCtrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1986                        if ($obj_type == 
"usr") {
 
 1987                            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 1988                            $back = $this->ctrl->getLinkTarget($this, 
"layout");
 
 1990                            $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
$target_id);
 
 1991                            $this->ctrl->setParameterByClass(
 
 1992                                "ilpublicuserprofilegui",
 
 1997                            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 1999                                $href = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui", 
"getHTML");
 
 2001                            $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
"");
 
 2008                $anc_par = 
'Anchor="' . $anc . 
'"';
 
 2011                    $link_info .= 
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " .
 
 2012                        "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" $anc_par/>";
 
 2024        $link_info .= 
"</IntLinkInfos>";
 
 2033        $link_info = 
"<LinkTargets>";
 
 2035            $link_info .= 
"<LinkTarget TargetFrame=\"" . 
$t[
"Type"] . 
"\" LinkTarget=\"" . 
$t[
"Frame"] . 
"\" OnClick=\"" . 
$t[
"OnClick"] . 
"\" />";
 
 2037        $link_info .= 
"</LinkTargets>";
 
 2048        require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
 
 2052        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2054            $this->tpl->setVariable(
 
 2055                "LOCATION_CONTENT_STYLESHEET",
 
 2059            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2061        $this->tpl->parseCurrentBlock();
 
 2064        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 2067            $this->tpl->setVariable(
 
 2068                "LOCATION_SYNTAX_STYLESHEET",
 
 2072            $this->tpl->setVariable(
 
 2073                "LOCATION_SYNTAX_STYLESHEET",
 
 2074                "syntaxhighlight.css" 
 2077        $this->tpl->parseCurrentBlock();
 
 2079        $int_links = $term_gui->getInternalLinks();
 
 2082        $term_gui->setLinkXML($link_xml);
 
 2086            $ilCtrl->setParameter($this, 
"pg_type", 
"glo");
 
 2088        $term_gui->output($this->
offlineMode(), $this->tpl);
 
 2093            $ilCtrl->setParameter($this, 
"pg_type", 
"");
 
 2104        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2106            $this->tpl->setVariable(
 
 2107                "LOCATION_CONTENT_STYLESHEET",
 
 2111            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2113        $this->tpl->parseCurrentBlock();
 
 2121            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 2123            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
 2126        $this->tpl->setCurrentBlock(
"ilMedia");
 
 2133        require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 2135        if (!empty(
$_GET[
"pg_id"])) {
 
 2136            require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 2138            $pg_obj->buildDom();
 
 2143            $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
 
 2162        $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
 2163        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
 2175        $mode = (
$_GET[
"cmd"] == 
"fullscreen")
 
 2180            $this->
getLink($this->lm->getRefId(), 
"fullscreen");
 
 2181        $params = array(
'mode' => $mode, 
'enlarge_path' => $enlarge_path,
 
 2182            'link_params' => 
"ref_id=" . $this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
 
 2183            'ref_id' => $this->lm->getRefId(), 
'pg_frame' => $pg_frame, 
'webspace_path' => $wb_path);
 
 2184        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
$params);
 
 2189        $this->tpl->setVariable(
"MEDIA_CONTENT", 
$output);
 
 2192        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
 2199    public function ilJavaScript($a_inline = 
"", $a_file = 
"", $a_location = 
"")
 
 2201        if ($a_inline != 
"") {
 
 2202            $js_tpl = 
new ilTemplate($a_inline, 
true, 
false, $a_location);
 
 2203            $js = $js_tpl->get();
 
 2204            $this->tpl->setVariable(
"INLINE_JS", 
$js);
 
 2220        if (empty($page_id)) {
 
 2228        if ($this->chapter_has_no_active_page &&
 
 2230            $c_id = 
$_GET[
"obj_id"];
 
 2232            if ($this->deactivated_page) {
 
 2233                $c_id = 
$_GET[
"obj_id"];
 
 2239            $succ_node = $this->lm_tree->fetchSuccessorNode($c_id, 
"pg");
 
 2240            $c_id = $succ_node[
"obj_id"];
 
 2244                $this->lm->getType(),
 
 2245                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2248            if ($succ_node[
"obj_id"] > 0 &&
 
 2249                $ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2250                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 2253            } elseif ($succ_node[
"obj_id"] > 0 && !$active) {
 
 2256                if ($act_data[
"show_activation_info"] &&
 
 2257                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 2268            return $succ_node[
"obj_id"];
 
 2282        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 2284        include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
 
 2288        if (empty($page_id)) {
 
 2293        if (!$this->lm_tree->isInTree($page_id)) {
 
 2297            $limpos = strpos(
$_GET[
"back_pg"], 
":");
 
 2299                $back_pg = substr(
$_GET[
"back_pg"], 0, $limpos);
 
 2301                $back_pg = 
$_GET[
"back_pg"];
 
 2303            if (!$this->lm->cleanFrames()) {
 
 2306                        $this->lm->getRefId(),
 
 2317                        $this->lm->getRefId(),
 
 2328            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
 
 2329            $this->tpl->setVariable(
"IMG_PREV", $back_img);
 
 2330            $this->tpl->setVariable(
"HREF_PREV", $back_href);
 
 2331            $this->tpl->setVariable(
"FRAME_PREV", $back_target);
 
 2332            $this->tpl->setVariable(
"TXT_PREV", $this->lng->txt(
"back"));
 
 2333            $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"back"));
 
 2334            $this->tpl->setVariable(
 
 2338            $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
 
 2339                ? 
"images/spacer.png" 
 2341            $this->tpl->parseCurrentBlock();
 
 2342            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
 
 2343            $this->tpl->setVariable(
"IMG_PREV2", $back_img);
 
 2344            $this->tpl->setVariable(
"HREF_PREV2", $back_href);
 
 2345            $this->tpl->setVariable(
"FRAME_PREV2", $back_target);
 
 2346            $this->tpl->setVariable(
"TXT_PREV2", $this->lng->txt(
"back"));
 
 2347            $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"back"));
 
 2348            $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
 
 2349                ? 
"images/spacer.png" 
 2351            $this->tpl->parseCurrentBlock();
 
 2359        if ($this->chapter_has_no_active_page &&
 
 2361            $c_id = 
$_GET[
"obj_id"];
 
 2363            if ($this->deactivated_page) {
 
 2364                $c_id = 
$_GET[
"obj_id"];
 
 2370            $succ_node = $this->lm_tree->fetchSuccessorNode($c_id, 
"pg");
 
 2371            $c_id = $succ_node[
"obj_id"];
 
 2375                $this->lm->getType(),
 
 2376                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2379            if ($succ_node[
"obj_id"] > 0 &&
 
 2380                $ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2381                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 2384            } elseif ($succ_node[
"obj_id"] > 0 && !$active) {
 
 2387                if ($act_data[
"show_activation_info"] &&
 
 2388                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 2398        $succ_str = ($succ_node !== 
false)
 
 2399            ? 
" -> " . $succ_node[
"obj_id"] . 
"_" . $succ_node[
"type"]
 
 2404        if ($this->deactivated_page) {
 
 2405            $c_id = 
$_GET[
"obj_id"];
 
 2410            $pre_node = $this->lm_tree->fetchPredecessorNode($c_id, 
"pg");
 
 2411            $c_id = $pre_node[
"obj_id"];
 
 2414                $this->lm->getType(),
 
 2415                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2417            if ($pre_node[
"obj_id"] > 0 &&
 
 2418                $ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2419                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 2422            } elseif ($pre_node[
"obj_id"] > 0 && !$active) {
 
 2425                if ($act_data[
"show_activation_info"] &&
 
 2426                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 2436        $pre_str = ($pre_node !== 
false)
 
 2437            ? $pre_node[
"obj_id"] . 
"_" . $pre_node[
"type"] . 
" -> " 
 2441        $framestr = (!empty(
$_GET[
"frame"]))
 
 2442            ? 
"frame=" . 
$_GET[
"frame"] . 
"&" 
 2448        $showViewInFrameset = 
true;
 
 2450        if ($pre_node != 
"") {
 
 2453                $pre_node[
"obj_id"],
 
 2454                $this->lm->getPageHeader(),
 
 2455                $this->lm->isActiveNumbering(),
 
 2456                $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2466            if (!$this->lm->cleanFrames()) {
 
 2468                    $this->
getLink($this->lm->getRefId(), 
"layout", $pre_node[
"obj_id"], 
$_GET[
"frame"]);
 
 2470            } elseif ($showViewInFrameset && !$this->
offlineMode()) {
 
 2472                    $this->
getLink($this->lm->getRefId(), 
"layout", $pre_node[
"obj_id"]);
 
 2476                    $this->
getLink($this->lm->getRefId(), 
"layout", $pre_node[
"obj_id"]);
 
 2477                $prev_target = 
'target="_top" ';
 
 2480            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2482                $output = $this->lng->txt(
"msg_page_not_public");
 
 2485            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
 
 2486            $this->tpl->setVariable(
"IMG_PREV", $prev_img);
 
 2487            $this->tpl->setVariable(
"HREF_PREV", $prev_href);
 
 2488            $this->tpl->setVariable(
"FRAME_PREV", $prev_target);
 
 2489            $this->tpl->setVariable(
"TXT_PREV", $prev_title);
 
 2490            $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"previous"));
 
 2491            $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
 
 2492                ? 
"images/spacer.png" 
 2494            $this->tpl->setVariable(
 
 2498            $this->tpl->parseCurrentBlock();
 
 2499            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
 
 2500            $this->tpl->setVariable(
"IMG_PREV2", $prev_img);
 
 2501            $this->tpl->setVariable(
"HREF_PREV2", $prev_href);
 
 2502            $this->tpl->setVariable(
"FRAME_PREV2", $prev_target);
 
 2503            $this->tpl->setVariable(
"TXT_PREV2", $prev_title);
 
 2504            $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"previous"));
 
 2505            $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
 
 2506                ? 
"images/spacer.png" 
 2508            $this->tpl->parseCurrentBlock();
 
 2510        if ($succ_node != 
"") {
 
 2513                $succ_node[
"obj_id"],
 
 2514                $this->lm->getPageHeader(),
 
 2515                $this->lm->isActiveNumbering(),
 
 2516                $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2525            if (!$this->lm->cleanFrames()) {
 
 2527                    $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"], 
$_GET[
"frame"]);
 
 2529            } elseif ($showViewInFrameset && !$this->
offlineMode()) {
 
 2531                    $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"]);
 
 2535                    $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"]);
 
 2536                $succ_target = 
' target="_top" ';
 
 2539            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2541                $output = $this->lng->txt(
"msg_page_not_public");
 
 2544            $this->tpl->setCurrentBlock(
"ilLMNavigation_Next");
 
 2545            $this->tpl->setVariable(
"IMG_SUCC", $succ_img);
 
 2546            $this->tpl->setVariable(
"HREF_SUCC", $succ_href);
 
 2547            $this->tpl->setVariable(
"FRAME_SUCC", $succ_target);
 
 2548            $this->tpl->setVariable(
"TXT_SUCC", $succ_title);
 
 2549            $this->tpl->setVariable(
"ALT_SUCC", $this->lng->txt(
"next"));
 
 2550            $this->tpl->setVariable(
"SPACER_SUCC", $this->
offlineMode()
 
 2551                ? 
"images/spacer.png" 
 2553            $this->tpl->setVariable(
 
 2557            $this->tpl->parseCurrentBlock();
 
 2558            $this->tpl->setCurrentBlock(
"ilLMNavigation_Next2");
 
 2559            $this->tpl->setVariable(
"IMG_SUCC2", $succ_img);
 
 2560            $this->tpl->setVariable(
"HREF_SUCC2", $succ_href);
 
 2561            $this->tpl->setVariable(
"FRAME_SUCC2", $succ_target);
 
 2562            $this->tpl->setVariable(
"TXT_SUCC2", $succ_title);
 
 2563            $this->tpl->setVariable(
"ALT_SUCC2", $this->lng->txt(
"next"));
 
 2564            $this->tpl->setVariable(
"SPACER_SUCC2", $this->
offlineMode()
 
 2565                ? 
"images/spacer.png" 
 2567            $this->tpl->parseCurrentBlock();
 
 2571                if ($this->lm->getRestrictForwardNavigation()) {
 
 2572                    if ($this->
getTracker()->hasPredIncorrectAnswers($succ_node[
"obj_id"])) {
 
 2573                        $this->tpl->addOnLoadCode(
"$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
 
 2583        $child_nodes = $a_node->child_nodes();
 
 2584        foreach ($child_nodes as $child) {
 
 2585            if ($child->node_name() == 
"ilFrame") {
 
 2588                if ((!empty(
$attributes[
"rows"])) || (!empty($attrubtes[
"cols"]))) {
 
 2596                                $this->lm->getRefId(),
 
 2619                            $this->lm->getRefId(),
 
 2633                        if (
$_GET[
"anchor"] != 
"") {
 
 2655        if (
$type == 
"end") {
 
 2661        if (is_array($attr)) {
 
 2662            foreach ($attr as $k => $v) {
 
 2663                $tag .= 
" " . $k . 
"=\"$v\"";
 
 2684        if (!$this->lm->isActiveTOC() || !$this->lm->isActiveLMMenu()) {
 
 2689        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2691            $this->tpl->setVariable(
 
 2692                "LOCATION_CONTENT_STYLESHEET",
 
 2696            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2698        $this->tpl->parseCurrentBlock();
 
 2706            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 2708            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
 2714        $this->tpl->getStandardTemplate();
 
 2719        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 2720            $this->offlineMode(),
 
 2721            $this->getExportFormat(),
 
 2727            $this->export_all_languages
 
 2731        $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
 
 2735        include_once(
"./Modules/LearningModule/classes/class.ilLMTableOfContentsExplorerGUI.php");
 
 2737        $exp->setMainTemplate($this->tpl);
 
 2739        if (!$exp->handleCommand()) {
 
 2742            if ($this->deactivated_page) {
 
 2743                $page_id = 
$_GET[
"obj_id"];
 
 2749                if ($this->chapter_has_no_active_page &&
 
 2751                    $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
 2753                    if ($this->lm->getTOCMode() == 
"pages") {
 
 2754                        if ($this->deactivated_page) {
 
 2755                            $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
 2757                            $exp->setHighlightNode($page_id);
 
 2760                        $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
 
 2765                $exp->setOfflineMode(
true);
 
 2768            $this->tpl->setVariable(
"ADM_CONTENT", $exp->getHTML());
 
 2772            $this->tpl->resetJavascript();
 
 2773            $this->tpl->resetCss();
 
 2774            $this->tpl->setBodyClass(
"ilLMNoMenu");
 
 2776            include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
 2778                if (
$f[
"type"] == 
"js") {
 
 2779                    $this->tpl->addJavascript(
$f[
"target"]);
 
 2781                if (
$f[
"type"] == 
"css") {
 
 2782                    $this->tpl->addCSS(
$f[
"target"]);
 
 2785            $this->tpl->fillJavaScriptFiles(
true);
 
 2786            $this->tpl->fillOnLoadCode();
 
 2788            return $this->tpl->get();
 
 2802        $this->ctrl->setCmd(
"showSummary");
 
 2803        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 2827            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 2829            $this->tpl->setStyleSheetLocation(
"./" . $style_name);
 
 2832        $this->tpl->getStandardTemplate();
 
 2836        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 2837            $this->offlineMode(),
 
 2838            $this->getExportFormat(),
 
 2844            $this->export_all_languages
 
 2848        if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])) {
 
 2851            $ilLocator->addRepositoryItems();
 
 2852            $this->tpl->setLocator();
 
 2865        $this->lng->loadLanguageModule(
"meta");
 
 2867        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
 2870        $info->enablePrivateNotes();
 
 2871        $info->enableLearningProgress();
 
 2873        $info->enableNews();
 
 2874        if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) {
 
 2876            $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
 2878            $info->enableNewsEditing();
 
 2880            if ($enable_internal_rss) {
 
 2881                $info->setBlockProperty(
"news", 
"settings", 
true);
 
 2903        $info->addMetaDataSections($this->lm->getId(), 0, $this->lm->getType());
 
 2906            $this->tpl->setContent(
$info->getHTML());
 
 2907            return $this->tpl->get();
 
 2910            $this->ctrl->forwardCommand(
$info);
 
 2924        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 2925        if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
 
 2929        include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
 
 2932        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2934            $this->tpl->setVariable(
 
 2935                "LOCATION_CONTENT_STYLESHEET",
 
 2939            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2941        $this->tpl->parseCurrentBlock();
 
 2945        $this->tpl->getStandardTemplate();
 
 2947        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 2948            $this->offlineMode(),
 
 2949            $this->getExportFormat(),
 
 2955            $this->export_all_languages
 
 2959        $this->tpl->addBlockFile(
 
 2962            "tpl.lm_print_selection.html",
 
 2963            "Modules/LearningModule" 
 2975        $this->ctrl->setParameterByClass(
"illmpresentationgui", 
"obj_id", 
$_GET[
"obj_id"]);
 
 2976        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
 
 2978        $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
 
 2981        if (!is_array(
$_POST[
"item"])) {
 
 2982            if (
$_GET[
"obj_id"] != 
"") {
 
 2991        foreach (
$nodes as $node) {
 
 2996                $this->lm->getType(),
 
 2997                $this->lm_set->get(
"time_scheduled_page_activation")
 
 3000            if ($node[
"type"] == 
"pg" &&
 
 3005            $text = $img_scr = $img_alt = 
"";
 
 3009            switch ($node[
"type"]) {
 
 3015                            $this->lm->getPageHeader(),
 
 3016                            $this->lm->isActiveNumbering(),
 
 3017                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3023                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3024                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3027                            $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3031                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"pg");
 
 3038                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"obj_lm");
 
 3047                            $this->lm->isActiveNumbering(),
 
 3048                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3053                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3054                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3057                            $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3061                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"st");
 
 3066                $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3069            $this->nl->addListNode(
 
 3082        if (
$_GET[
"obj_id"] > 0 && !$this->lm_tree->isInTree(
$_GET[
"obj_id"])) {
 
 3086                    $this->lm->getPageHeader(),
 
 3087                    $this->lm->isActiveNumbering(),
 
 3088                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3094            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3095               $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3098                    $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3106            $this->nl->addListNode(
 
 3117        $f = $this->form->getHTML();
 
 3121        $tb->addFormButton(
$lng->txt(
"cont_show_print_view"), 
"showPrintView");
 
 3122        $this->tpl->setVariable(
"TOOLBAR", $tb->getHTML());
 
 3124        $this->tpl->setVariable(
"ITEM_SELECTION", 
$f);
 
 3138            if ($this->lm->getRestrictForwardNavigation()) {
 
 3139                $nodes = array_filter(
$nodes, 
function ($node) use ($tracker) {
 
 3140                    return !$tracker->hasPredIncorrectAnswers($node[
"child"]);
 
 3156        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3161        $radg->setValue(
"page");
 
 3163        $radg->addOption($op1);
 
 3165        $radg->addOption($op2);
 
 3167        $radg->addOption($op3);
 
 3169        include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
 
 3172        $op3->addSubItem($nl);
 
 3175        $this->form->addItem($radg);
 
 3177        $this->form->addCommandButton(
"showPrintView", 
$lng->txt(
"cont_show_print_view"));
 
 3178        $this->form->setOpenTag(
false);
 
 3179        $this->form->setCloseTag(
false);
 
 3181        $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
 
 3182        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
 3194        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 3196        if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
 
 3204        if (
$_POST[
"sel_type"] == 
"page") {
 
 3205            if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id, 
$_POST[
"obj_id"])) {
 
 3206                $_POST[
"obj_id"][] = $c_obj_id;
 
 3209        if (
$_POST[
"sel_type"] == 
"chapter" && $c_obj_id > 0) {
 
 3210            $path = $this->lm_tree->getPathFull($c_obj_id);
 
 3211            $chap_id = 
$path[1][
"child"];
 
 3213                $_POST[
"obj_id"][] = $chap_id;
 
 3223            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 3225            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
 3229        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 3231            $this->tpl->setVariable(
 
 3232                "LOCATION_CONTENT_STYLESHEET",
 
 3236            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 3238        $this->tpl->parseCurrentBlock();
 
 3241        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 3242        $this->tpl->setVariable(
 
 3243            "LOCATION_SYNTAX_STYLESHEET",
 
 3246        $this->tpl->parseCurrentBlock();
 
 3249        $this->tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.lm_print_view.html", 
true);
 
 3254        $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
 
 3256        include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
 3257        include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
 
 3258        include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
 
 3263        $glossary_links = array();
 
 3264        $output_header = 
false;
 
 3265        $media_links = array();
 
 3268        if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
 
 3270                $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
 
 3271                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3273                    $this->lm->getStyleSheetId(),
 
 3279                $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 3280                $page_object_gui->setOutputMode(
"print");
 
 3281                $page_object_gui->setPresentationTitle(
"");
 
 3282                $page_object_gui->setFileDownloadLink(
"#");
 
 3283                $page_object_gui->setFullscreenLink(
"#");
 
 3284                $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 3285                $footer_page_content = $page_object_gui->showPage();
 
 3288        if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
 
 3290                $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
 
 3291                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3293                    $this->lm->getStyleSheetId(),
 
 3299                $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 3300                $page_object_gui->setOutputMode(
"print");
 
 3301                $page_object_gui->setPresentationTitle(
"");
 
 3302                $page_object_gui->setFileDownloadLink(
"#");
 
 3303                $page_object_gui->setFullscreenLink(
"#");
 
 3304                $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 3305                $header_page_content = $page_object_gui->showPage();
 
 3310        if (is_array(
$_POST[
"obj_id"])) {
 
 3311            foreach (
$_POST[
"obj_id"] as $k) {
 
 3312                if ($k > 0 && !$this->lm_tree->isInTree($k)) {
 
 3314                        $nodes[] = array(
"obj_id" => $k, 
"type" => 
"pg", 
"free" => 
true);
 
 3320            $ilCtrl->redirect($this, 
"showPrintViewSelection");
 
 3323        foreach (
$nodes as $node_key => $node) {
 
 3327                $this->lm->getType(),
 
 3328                $this->lm_set->get(
"time_scheduled_page_activation")
 
 3330            if ($node[
"type"] == 
"pg" && !$active) {
 
 3336            if ($node[
"depth"] <= $act_level) {
 
 3337                if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"], 
$_POST[
"obj_id"])) {
 
 3338                    $act_level = $node[
"depth"];
 
 3345            if ($this->lm->getRestrictForwardNavigation()) {
 
 3346                if ($this->
getTracker()->hasPredIncorrectAnswers($node[
"obj_id"])) {
 
 3353                if ($node[
"type"] == 
"du") {
 
 3354                    $output_header = 
true;
 
 3358                if ($node[
"type"] == 
"st") {
 
 3359                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3360                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3367                    $this->tpl->setCurrentBlock(
"print_chapter");
 
 3369                    $chapter_title = $chap->_getPresentationTitle(
 
 3371                        $this->lm->isActiveNumbering(),
 
 3372                        $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3376                    $this->tpl->setVariable(
 
 3382                        if (
$nodes[$node_key + 1][
"type"] == 
"pg") {
 
 3383                            $this->tpl->setVariable(
 
 3385                                $header_page_content
 
 3387                            $did_chap_page_header = 
true;
 
 3391                    $this->tpl->parseCurrentBlock();
 
 3392                    $this->tpl->setCurrentBlock(
"print_block");
 
 3393                    $this->tpl->parseCurrentBlock();
 
 3397                if ($node[
"type"] == 
"pg") {
 
 3398                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3399                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3405                    $this->tpl->setCurrentBlock(
"print_item");
 
 3408                    $page_id = $node[
"obj_id"];
 
 3410                    $page_object = $page_object_gui->getPageObject();
 
 3411                    include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3413                        $this->lm->getStyleSheetId(),
 
 3420                    $lm_pg_obj->setLMId($this->lm->getId());
 
 3423                    $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 3424                    $page_object_gui->setOutputMode(
"print");
 
 3425                    $page_object_gui->setPresentationTitle(
"");
 
 3427                    if ($this->lm->getPageHeader() == 
IL_PAGE_TITLE || $node[
"free"] === 
true) {
 
 3429                            $lm_pg_obj->getId(),
 
 3430                            $this->lm->getPageHeader(),
 
 3431                            $this->lm->isActiveNumbering(),
 
 3432                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3440                        if ($this->lm->isActiveNumbering()) {
 
 3441                            $chapter_title = trim(substr(
 
 3443                                strpos($chapter_title, 
" ")
 
 3447                        if ($page_title != $chapter_title) {
 
 3448                            $page_object_gui->setPresentationTitle($page_title);
 
 3453                    $hcont = $header_page_content;
 
 3454                    $fcont = $footer_page_content;
 
 3457                        if ($did_chap_page_header) {
 
 3460                        if (
$nodes[$node_key + 1][
"type"] == 
"pg" &&
 
 3461                            !(
$nodes[$node_key + 1][
"depth"] <= $act_level
 
 3462                             && !in_array(
$nodes[$node_key + 1][
"obj_id"], 
$_POST[
"obj_id"]))) {
 
 3467                    $page_object_gui->setFileDownloadLink(
"#");
 
 3468                    $page_object_gui->setFullscreenLink(
"#");
 
 3469                    $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 3470                    $page_content = $page_object_gui->showPage();
 
 3472                        $this->tpl->setVariable(
 
 3474                            $hcont . $page_content . $fcont
 
 3477                        $this->tpl->setVariable(
 
 3479                            $hcont . $page_content . $fcont . 
"<br />" 
 3482                    $chapter_title = 
"";
 
 3483                    $this->tpl->parseCurrentBlock();
 
 3484                    $this->tpl->setCurrentBlock(
"print_block");
 
 3485                    $this->tpl->parseCurrentBlock();
 
 3492                    foreach ($int_links as 
$key => $link) {
 
 3493                        if ($link[
"type"] == 
"git" &&
 
 3494                            ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0)) {
 
 3495                            $glossary_links[
$key] = $link;
 
 3497                        if ($link[
"type"] == 
"mob" &&
 
 3498                            ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0)) {
 
 3500                            $mob_links[
$key] = $link;
 
 3510                        $page_object->buildDom();
 
 3511                        $links = $page_object->getInternalLinks();
 
 3512                        foreach (
$links as $link) {
 
 3513                            if ($link[
"Type"] == 
"MediaObject" 
 3514                                && $link[
"TargetFrame"] != 
"" 
 3515                                && $link[
"TargetFrame"] != 
"None") {
 
 3516                                $media_links[] = $link;
 
 3528        if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix()) {
 
 3529            include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 3530            include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
 3535            foreach ($glossary_links as 
$key => $link) {
 
 3537                $terms[$term . 
":" . 
$key] = array(
"key" => 
$key, 
"link" => $link, 
"term" => $term);
 
 3542            foreach ($terms as 
$t) {
 
 3549                foreach ($defs as 
$def) {
 
 3551                    if (count($defs) > 1) {
 
 3552                        $this->tpl->setCurrentBlock(
"def_title");
 
 3553                        $this->tpl->setVariable(
 
 3555                            $this->lng->txt(
"cont_definition") . 
" " . ($def_cnt++)
 
 3557                        $this->tpl->parseCurrentBlock();
 
 3559                    include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
 3561                    $page_gui->setTemplateOutput(
false);
 
 3562                    $page_gui->setOutputMode(
"print");
 
 3564                    $this->tpl->setCurrentBlock(
"definition");
 
 3565                    $page_gui->setFileDownloadLink(
"#");
 
 3566                    $page_gui->setFullscreenLink(
"#");
 
 3567                    $page_gui->setSourceCodeDownloadScript(
"#");
 
 3568                    $output = $page_gui->showPage();
 
 3569                    $this->tpl->setVariable(
"VAL_DEFINITION", 
$output);
 
 3570                    $this->tpl->parseCurrentBlock();
 
 3574                $this->tpl->setCurrentBlock(
"term");
 
 3575                $this->tpl->setVariable(
 
 3579                $this->tpl->parseCurrentBlock();
 
 3584            $this->tpl->setCurrentBlock(
"glossary");
 
 3585            $annex_title = $this->lng->txt(
"cont_annex") . 
" " .
 
 3586                chr(64 + $annex_cnt) . 
": " . $this->lng->txt(
"glo");
 
 3587            $this->tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
 
 3588            $this->tpl->parseCurrentBlock();
 
 3590            $annexes[] = $annex_title;
 
 3594        if (count($media_links) > 0) {
 
 3595            include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 3596            include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
 
 3598            foreach ($media_links as $media) {
 
 3599                if (substr($media[
"Target"], 0, 4) == 
"il__") {
 
 3600                    $arr = explode(
"_", $media[
"Target"]);
 
 3601                    $id = $arr[count($arr) - 1];
 
 3604                    $med_item = $med_obj->getMediaItem(
"Standard");
 
 3605                    if (is_object($med_item)) {
 
 3606                        if (is_int(strpos($med_item->getFormat(), 
"image"))) {
 
 3607                            $this->tpl->setCurrentBlock(
"ref_image");
 
 3610                            if ($med_item->getLocationType() == 
"LocalFile") {
 
 3611                                $this->tpl->setVariable(
 
 3614                                    "/" . $med_item->getLocation()
 
 3617                                $this->tpl->setVariable(
 
 3619                                    $med_item->getLocation()
 
 3623                            if ($med_item->getCaption() != 
"") {
 
 3624                                $this->tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
 
 3626                                $this->tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
 
 3628                            $this->tpl->parseCurrentBlock();
 
 3636            $this->tpl->setCurrentBlock(
"ref_images");
 
 3637            $annex_title = $this->lng->txt(
"cont_annex") . 
" " .
 
 3638                chr(64 + $annex_cnt) . 
": " . $this->lng->txt(
"cont_ref_images");
 
 3639            $this->tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
 
 3640            $this->tpl->parseCurrentBlock();
 
 3642            $annexes[] = $annex_title;
 
 3646        if ($output_header) {
 
 3647            $this->tpl->setCurrentBlock(
"print_header");
 
 3649            if ($this->lm->getDescription() != 
"none") {
 
 3650                include_once(
"Services/MetaData/classes/class.ilMD.php");
 
 3651                $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 3652                $md_gen = $md->getGeneral();
 
 3653                foreach ($md_gen->getDescriptionIds() as 
$id) {
 
 3654                    $md_des = $md_gen->getDescription(
$id);
 
 3658                $this->tpl->setVariable(
 
 3663            $this->tpl->parseCurrentBlock();
 
 3667            foreach ($nodes2 as $node2) {
 
 3668                if ($node2[
"type"] == 
"st" 
 3670                    for ($j = 1; $j < $node2[
"depth"]; $j++) {
 
 3671                        $this->tpl->setCurrentBlock(
"indent");
 
 3673                        $this->tpl->parseCurrentBlock();
 
 3675                    $this->tpl->setCurrentBlock(
"toc_entry");
 
 3676                    $this->tpl->setVariable(
 
 3681                            $this->lm->isActiveNumbering(),
 
 3682                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3688                    $this->tpl->parseCurrentBlock();
 
 3693            foreach ($annexes as $annex) {
 
 3694                $this->tpl->setCurrentBlock(
"indent");
 
 3696                $this->tpl->parseCurrentBlock();
 
 3697                $this->tpl->setCurrentBlock(
"toc_entry");
 
 3698                $this->tpl->setVariable(
"TXT_TOC_TITLE", $annex);
 
 3699                $this->tpl->parseCurrentBlock();
 
 3702            $this->tpl->setCurrentBlock(
"toc");
 
 3703            $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
 
 3704            $this->tpl->parseCurrentBlock();
 
 3706            $this->tpl->setCurrentBlock(
"print_start_block");
 
 3707            $this->tpl->parseCurrentBlock();
 
 3711        include_once 
'Services/MetaData/classes/class.ilMD.php';
 
 3712        $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 3713        if (is_object($lifecycle = $md->getLifecycle())) {
 
 3714            $sep = $author = 
"";
 
 3715            foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
 
 3716                $md_con = $lifecycle->getContribute($con_id);
 
 3717                if ($md_con->getRole() == 
"Author") {
 
 3718                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 3719                        $md_ent = $md_con->getEntity($ent_id);
 
 3720                        $author = $author . $sep . $md_ent->getEntity();
 
 3725            if ($author != 
"") {
 
 3726                $this->lng->loadLanguageModule(
"meta");
 
 3727                $this->tpl->setCurrentBlock(
"author");
 
 3728                $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
 
 3729                $this->tpl->setVariable(
"LM_AUTHOR", $author);
 
 3730                $this->tpl->parseCurrentBlock();
 
 3736        if (is_object($md_rights = $md->getRights())) {
 
 3737            $copyright = $md_rights->getDescription();
 
 3738            include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
 3741            if ($copyright != 
"") {
 
 3742                $this->lng->loadLanguageModule(
"meta");
 
 3743                $this->tpl->setCurrentBlock(
"copyright");
 
 3744                $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
 
 3745                $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
 
 3746                $this->tpl->parseCurrentBlock();
 
 3750        $this->tpl->show(
false);
 
 3759        $page_gui->downloadFile();
 
 3768        require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 3770        $pg_obj->send_paragraph(
$_GET[
"par_id"], 
$_GET[
"downloadtitle"]);
 
 3778        if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
 
 3783        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 3785            $this->tpl->setVariable(
 
 3786                "LOCATION_CONTENT_STYLESHEET",
 
 3790            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 3792        $this->tpl->parseCurrentBlock();
 
 3796        $this->tpl->getStandardTemplate();
 
 3798        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 3799            $this->offlineMode(),
 
 3800            $this->getExportFormat(),
 
 3806            $this->export_all_languages
 
 3811        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.lm_download_list.html", 
"Modules/LearningModule");
 
 3824        include_once 
'Services/MetaData/classes/class.ilMD.php';
 
 3825        $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 3826        if (is_object($md_rights = $md->getRights())) {
 
 3827            $copyright = $md_rights->getDescription();
 
 3829            include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
 3832            if ($copyright != 
"") {
 
 3833                $this->lng->loadLanguageModule(
"meta");
 
 3834                $this->tpl->setCurrentBlock(
"copyright");
 
 3835                $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
 
 3836                $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
 
 3837                $this->tpl->parseCurrentBlock();
 
 3842        include_once(
"./Modules/LearningModule/classes/class.ilLMDownloadTableGUI.php");
 
 3844        $this->tpl->setVariable(
"DOWNLOAD_TABLE", $download_table->getHTML());
 
 3854        if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
 
 3858        $base_type = explode(
"_", 
$_GET[
"type"]);
 
 3859        $base_type = $base_type[0];
 
 3860        $file = $this->lm->getPublicExportFile($base_type);
 
 3861        if ($this->lm->getPublicExportFile($base_type) != 
"") {
 
 3862            $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
 
 3863            if (is_file($dir . 
"/" . $file)) {
 
 3881        return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $a_ref_id . 
"&obj_id=" . $a_obj_id . 
"&focus_id=" .
 
 3882            $a_obj_id . 
"&focus_return=" . $a_return_ref_id;
 
 3895        $a_back_link = 
"append",
 
 3907        $back_pg = 
$_GET[
"back_pg"];
 
 3908        if ($a_obj_id != 
"" && !$this->lm_tree->isInTree($a_obj_id) && $cur_page_id != 
"" &&
 
 3909            $a_back_link == 
"append") {
 
 3910            if ($back_pg != 
"") {
 
 3911                $back_pg = $cur_page_id . 
":" . $back_pg;
 
 3913                $back_pg = $cur_page_id;
 
 3916            if ($a_back_link == 
"reduce") {
 
 3917                $limpos = strpos(
$_GET[
"back_pg"], 
":");
 
 3920                    $back_pg = substr($back_pg, strpos($back_pg, 
":") + 1);
 
 3924            } elseif ($a_back_link != 
"keep") {
 
 3931            if (
$_GET[
"from_page"] == 
"") {
 
 3933                if (!in_array($a_frame, array(
"", 
"_blank"))) {
 
 3934                    $this->ctrl->setParameter($this, 
"from_page", $cur_page_id);
 
 3939                if (!in_array($a_frame, array(
"", 
"_blank"))) {
 
 3940                    $this->ctrl->setParameter($this, 
"from_page", 
$_GET[
"from_page"]);
 
 3944            if ($a_anchor != 
"") {
 
 3945                $this->ctrl->setParameter($this, 
"anchor", rawurlencode($a_anchor));
 
 3947            if ($a_srcstring != 
"") {
 
 3948                $this->ctrl->setParameter($this, 
"srcstring", $a_srcstring);
 
 3952                    $link = $this->ctrl->getLinkTarget($this, 
"fullscreen", 
"", 
false, 
false);
 
 3957                    if ($back_pg != 
"") {
 
 3958                        $this->ctrl->setParameter($this, 
"back_pg", $back_pg);
 
 3960                    if ($a_frame != 
"") {
 
 3961                        $this->ctrl->setParameter($this, 
"frame", $a_frame);
 
 3963                    if ($a_obj_id != 
"") {
 
 3966                                $this->ctrl->setParameter($this, 
"mob_id", $a_obj_id);
 
 3970                                $this->ctrl->setParameter($this, 
"obj_id", $a_obj_id);
 
 3971                                $link .= 
"&obj_id=" . $a_obj_id;
 
 3976                        $this->ctrl->setParameter($this, 
"obj_type", 
$a_type);
 
 3978                    $link = $this->ctrl->getLinkTarget($this, $a_cmd, $a_anchor);
 
 3981                    $this->ctrl->setParameter($this, 
"frame", 
"");
 
 3982                    $this->ctrl->setParameter($this, 
"obj_id", 
"");
 
 3983                    $this->ctrl->setParameter($this, 
"mob_id", 
"");
 
 3988            if ($this->export_all_languages) {
 
 3989                if ($this->lang != 
"" && $this->lang != 
"-") {
 
 3995                case "downloadFile":
 
 3999                    $link = 
"fullscreen.html";          
 
 4004                    if ($a_obj_id == 
"") {
 
 4005                        $a_obj_id = $this->lm_tree->getRootId();
 
 4006                        $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id, 
"pg");
 
 4007                        $a_obj_id = $pg_node[
"obj_id"];
 
 4009                    if (
$a_type == 
"StructureObject") {
 
 4010                        $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id, 
"pg");
 
 4011                        $a_obj_id = $pg_node[
"obj_id"];
 
 4013                    if ($a_frame != 
"" && $a_frame != 
"_blank") {
 
 4014                        if ($a_frame != 
"toc") {
 
 4015                            $link = 
"frame_" . $a_obj_id . 
"_" . $a_frame . $lang_suffix . 
".html";
 
 4017                            $link = 
"frame_" . $a_frame . $lang_suffix . 
".html";
 
 4022                            $link = 
"lm_pg_" . $nid . $lang_suffix . 
".html";
 
 4024                            $link = 
"lm_pg_" . $a_obj_id . $lang_suffix . 
".html";
 
 4030                    $link = 
"term_" . $a_obj_id . 
".html";
 
 4034                    $link = 
"media_" . $a_obj_id . 
".html";
 
 4042        $this->ctrl->clearParameters($this);
 
 4056        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 4058            $this->tpl->setVariable(
 
 4059                "LOCATION_CONTENT_STYLESHEET",
 
 4063            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 4065        $this->tpl->parseCurrentBlock();
 
 4067        $tpl = 
new ilTemplate(
"tpl.page_message_screen.html", 
true, 
true, 
"Modules/LearningModule");
 
 4070        $this->tpl->setVariable(
"PAGE_CONTENT", 
$tpl->get());
 
 4104            $target = $this->ctrl->getLinkTarget($this, 
"");
 
 4106            return $this->ctrl->getLinkTarget($this, 
"");
 
 4121        $this->offline_directory = $offdir;
 
 4142        $directory = $this->
getOfflineDirectory() . 
"/codefiles/" . $page_id . 
"/" . $paragraph_id;
 
 4144        $file = $directory . 
"/" . 
$title;
 
 4145        if (!($fp = @fopen($file, 
"w+"))) {
 
 4146            die(
"<b>Error</b>: Could not open \"" . $file . 
"\" for writing" .
 
 4147                " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
 4158        $this->tpl->fillWindowTitle();
 
 4159        $this->tpl->fillContentLanguage();
 
 4171        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 4172        include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
 4174            return new ilLMPageGUI($a_id, 0, 
false, $this->lang);
 
 4187        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 4189            return new ilLMPage($a_id, 0, $this->lang);
 
 4199        $exp = $this->
ilTOC(
true);
 
 4201        echo $exp->getHTML() .
 
 4202            "<script>" . $exp->getOnLoadCode() . 
"</script>";
 
An exception for terminatinating execution or to throw for unit testing.
Handles display of the main menu for LTI.
error($a_errmsg)
set error message @access public
static getAttribute($a_func_id)
Get accesskey HTML attribute.
static addCss()
Add required css.
static addJavaScript(ilTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
Class ilCommonActionDispatcherGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static _updateLastAccess($a_user_id, $a_lm_ref_id, $a_page_id)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
Glossary definition page GUI class.
static getDefinitionList($a_term_id)
static
GUI class for glossary terms.
static _lookGlossaryTerm($term_id)
get glossary term
static get($a_glyph, $a_text="")
Get glyph html.
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
TableGUI class for lm download files.
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static getExportId($a_lm_id, $a_lmobj_id, $a_type="pg")
Get export ID.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static _isPagePublic($a_node_id, $a_check_public_mode=false)
static _lookupTitle($a_obj_id)
Lookup title.
static lookupLayout($a_obj_id)
Lookup type.
static _exists($a_id)
checks wether a lm content object with specified id exists or not
Extension of ilPageObjectGUI for learning modules.
static _getPresentationTitle( $a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
Extension of ilPageObject for learning modules.
Base exception class for learning module presentation.
Class ilLMPresentationGUI.
offlineMode()
checks wether offline content generation is activated
ilLMNotes()
output notes of page
outputInfoScreen($a_standard_locator=false)
info screen
ilLMNavigation()
inserts sequential learning module navigation at template variable LMNAVIGATION_CONTENT
ilMainMenu()
output main menu
setOfflineMode($a_offline=true, $a_all_languages=false)
set offline mode (content is generated for offline package)
handleCodeParagraph($page_id, $paragraph_id, $title, $text)
store paragraph into file directory files/codefile_$pg_id_$paragraph_id/downloadtitle
getCurrentPageId()
Get the current page id.
ilLMMenu()
output learning module menu
initPrintViewSelectionForm()
Init print view selection form.
layout($a_xml="main.xml", $doShow=true)
generates frame layout
processNodes(&$a_content, &$a_node)
download_paragraph()
download source code paragraph
getExportFormat()
get export format
export()
calls export of digilib-object at this point other lm-objects can be exported
addHeaderAction($a_redraw=false)
Add header action.
initScreenHead($a_active_tab="info")
showPrintView()
show print view
nop()
this dummy function is needed for offline package creation
downloadFile()
download file of file lists
showMessageScreen($a_content)
Show message screen.
getSourcecodeDownloadLink()
showPreconditionsOfPage()
show preconditions of the page
executeCommand()
execute command
getFocusLink($a_ref_id, $a_obj_id, $a_return_ref_id)
Get focused link (used in learning objectives courses)
attrib2arr($a_attributes)
showNavRestrictionDueToQuestions()
Show message if navigation to page is not allowed due to unanswered questions.
showDownloadList()
show download list
getLMPageGUI($a_id)
Get lm page gui object.
filterNonAccessibleNode($nodes)
showInfoScreen()
info screen call from inside learning module
getLMPage($a_id)
Get lm page object.
setOfflineDirectory($offdir)
set offline directory to offdir
getOfflineDirectory()
get offline directory
getCurrentFrameSet()
get frames of current frame set
ilTOC($a_get_explorer=false)
table of contents
ilLMHead()
output lm header
getSuccessorPage()
Get successor page.
showPrintViewSelection()
show selection screen for print view
setExportFormat($a_format)
set export format
ilLMSubMenu()
output learning module submenu
showTableOfContents()
table of contents
saveFrameUrl()
Save frame url.
getLinkXML($a_int_links, $a_layoutframes)
get xml for links
redrawHeaderAction()
Redraw header action.
downloadExportFile()
send download file (xml/html)
getLinkTargetsXML()
Get XMl for Link Targets.
determineLayout()
Determine layout.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
ilPage(&$a_page_node, $a_page_id=0)
process <ilPage> content tag
getLink( $a_ref_id, $a_cmd="", $a_obj_id="", $a_frame="", $a_type="", $a_back_link="append", $a_anchor="", $a_srcstring="")
handles links for learning module presentation
basicPageGuiInit($a_page_gui)
Basic page gui initialisation.
refreshToc()
Refresh toc (called if questions have been answered correctly)
showNoPageAccess()
Show info message, if page is not accessible in public area.
buildTag($type, $name, $attr="")
generate a tag with given name and attributes
ilLocator($a_std_templ_loaded=false)
locator
ilJavaScript($a_inline="", $a_file="", $a_location="")
Puts JS into template.
ilGlossary()
show glossary term
showNoPublicAccess()
Show info message, if page is not accessible in public area.
getLMPresentationTitle()
Get lm presentationtitle.
LM presentation (left frame) explorer GUI class.
LM presentation (separate toc screen) explorer GUI class.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
static getInstance($a_tree_id)
Get Instance.
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _parseCopyright($a_copyright)
Parse copyright.
Handles display of the main menu.
static _getLastAccessedPage($a_ref_id, $a_user_id="")
get last accessed page
static getSupplyingExportFiles($a_target_dir=".")
Get supplying export files.
static _getMissingPreconditionsTopChapter($cont_obj_ref_id, $cont_obj_id, $page_id)
get top chapter of page for that any precondition is missing
static _checkPreconditionsOfPage($cont_ref_id, $cont_obj_id, $page_id)
checks wether the preconditions of a page are fulfilled or not
static _getMissingPreconditionsOfPage($cont_ref_id, $cont_obj_id, $page_id)
gets all missing preconditions of page
Class ilLearningModuleGUI.
static getContentPrintStyle()
get content print style
static getSyntaxStylePath()
get syntax style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static getInstance($a_obj_id)
Get instance.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static lookupParentId($a_id, $a_type)
Lookup parent id.
static _lookupActivationData($a_id, $a_parent_type, $a_lang="-")
Lookup activation data.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Class for permanent links.
This class represents an option in a radio group.
static resetRatingForUserAndObject( $a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id)
Reset rating for a user and an object.
static writeRatingForUserAndObject( $a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id, $a_rating, $a_category_id=0)
Write rating for a user and an object.
Session based immediate storage.
static _getPresentationTitle( $a_st_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
get presentation title
special template class to simplify handling of ITX/PEAR
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
static init($a_tpl=null)
Init.
static _getInstance($a_usr_id)
Get singleton instance.
static hasPublicProfile($a_user_id)
Has public profile.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static getWebspaceDir($mode="filesystem")
get webspace directory
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static now()
Return current timestamp in Y-m-d H:i:s format.
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getGotoForWikiPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
static initConnection(ilTemplate $a_main_tpl=null)
Init YUI Connection module.
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if(!array_key_exists('StateId', $_REQUEST)) $id
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
if(array_key_exists('yes', $_REQUEST)) $attributes
xpath_eval($xpath_context, $eval_str, $contextnode=null)
domxml_open_mem($str, $mode=0, &$error=null)
xpath_new_context($dom_document)
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
if(function_exists( 'posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
foreach($_POST as $key=> $value) $res