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");
 
   94        $this->
user = $DIC->user();
 
   95        $this->rbacsystem = 
$DIC->rbac()->system();
 
   96        $this->
error = $DIC[
"ilErr"];
 
   97        $this->nav_history = 
$DIC[
"ilNavigationHistory"];
 
   98        $this->access = 
$DIC->access();
 
  100        $this->locator = 
$DIC[
"ilLocator"];
 
  101        $this->tree = 
$DIC->repositoryTree();
 
  102        $this->help = 
$DIC[
"ilHelp"];
 
  111        $lng->loadLanguageModule(
"content");
 
  115        $this->offline = 
false;
 
  116        $this->frames = array();
 
  118        $this->ctrl->saveParameter($this, array(
"ref_id", 
"transl", 
"focus_id", 
"focus_return"));
 
  121        include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
 
  123        $this->lm = $this->lm_gui->object;
 
  126        include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
 
  131        if ($this->ot->getContentActivated()) {
 
  132            $langs = $this->ot->getLanguages();
 
  133            if (isset($langs[
$_GET[
"transl"]]) || 
$_GET[
"transl"] == $this->ot->getMasterLanguage()) {
 
  134                $this->lang = 
$_GET[
"transl"];
 
  135            } elseif (isset($langs[
$ilUser->getCurrentLanguage()])) {
 
  136                $this->lang = 
$ilUser->getCurrentLanguage();
 
  138            if ($this->lang == $this->ot->getMasterLanguage()) {
 
  145            if (!$this->lm->getOnline()) {
 
  150        include_once(
"./Modules/LearningModule/classes/class.ilLMTree.php");
 
  157        if ((
int) 
$_GET[
"focus_id"] > 0 && $this->lm_tree->isInTree((
int) 
$_GET[
"focus_id"])) {
 
  158            $this->focus_id = (int) 
$_GET[
"focus_id"];
 
  176        if (!$ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"]) &&
 
  177            (!(($this->ctrl->getCmd() == 
"infoScreen" || $this->ctrl->getNextClass() == 
"ilinfoscreengui")
 
  178            && $ilAccess->checkAccess(
"visible", 
"", 
$_GET[
"ref_id"])))) {
 
  182        $next_class = $this->ctrl->getNextClass($this);
 
  183        $cmd = $this->ctrl->getCmd(
"layout", array(
"showPrintView"));
 
  185        $cmd = (isset(
$_POST[
'cmd'][
'citation']))
 
  189        $obj_id = 
$_GET[
"obj_id"];
 
  190        $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
  191        $ilNavigationHistory->addItem(
$_GET[
"ref_id"], $this->ctrl->getLinkTarget($this), 
"lm");
 
  192        $this->ctrl->setParameter($this, 
"obj_id", $obj_id);
 
  194        switch ($next_class) {
 
  199            case "ilinfoscreengui":
 
  203            case "ilcommonactiondispatchergui":
 
  204                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  206                $gui->enableCommentsSettings(
false);
 
  207                $this->ctrl->forwardCommand($gui);
 
  211                include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
  217            case "ilglossarydefpagegui":
 
  218                include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
  224            case "illearningprogressgui":
 
  226                include_once 
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
 
  228                $this->ctrl->forwardCommand($new_gui);
 
  232                include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
 
  234                $rating_gui->setObject($this->lm->getId(), 
"lm", 
$_GET[
"obj_id"], 
"lm");
 
  235                $this->ctrl->forwardCommand($rating_gui);
 
  239                $ret = $this->$cmd();
 
  250        $this->offline = $a_offline;
 
  251        $this->export_all_languages = $a_all_languages;
 
  270        $this->export_format = $a_format;
 
  280        return $this->export_format;
 
  309        include_once(
"./Modules/LearningModule/classes/class.ilLMTracker.php");
 
  318        if (!is_array($a_attributes)) {
 
  321        foreach ($a_attributes as $attribute) {
 
  322            $attr[$attribute->name()] = $attribute->value();
 
  332        return $this->frames;
 
  343            $layout = $this->lm->getLayout();
 
  344            if ($this->lm->getLayoutPerPage()) {
 
  346                if (!in_array(
$_GET[
"frame"], array(
"", 
"_blank")) && 
$_GET[
"from_page"] > 0) {
 
  347                    $pg_id = (int) 
$_GET[
"from_page"];
 
  351                if (in_array(
$_GET[
"cmd"], array(
"media", 
"glossary")) && 
$_GET[
"back_pg"] > 0) {
 
  352                    $pg_id = (int) 
$_GET[
"back_pg"];
 
  371        if (
$ilUser->getId() != ANONYMOUS_USER_ID && 
$_GET[
"focus_id"] == 
"") {
 
  372            include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
 
  376            if ($last_accessed_page &&
 
  377                $last_accessed_page != $this->lm_tree->getLastActivePage()) {
 
  378                $_GET[
"obj_id"] = $last_accessed_page;
 
  388    public function layout($a_xml = 
"main.xml", $doShow = 
true)
 
  402        $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/" . 
$layout . 
"/" . $a_xml);
 
  405            include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
 
  409        $this->layout_doc = $doc;
 
  415            ? 
"/ilLayout/ilFrame[1]" 
  416            : 
"//ilFrame[@name='" . 
$_GET[
"frame"] . 
"']";
 
  419        if (count($found) != 1) {
 
  420            include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
 
  422                " path " . 
$path . 
" in " . 
$layout . 
"/" . $a_xml . 
". LM Layout is " . $this->lm->getLayout());
 
  430        $this->frames = array();
 
  435            $content .= $this->
buildTag(
"end", 
"frameset");
 
  436            $this->tpl = 
new ilTemplate(
"tpl.frameset.html", 
true, 
true, 
"Modules/LearningModule");
 
  438            $this->tpl->setVariable(
"FS_CONTENT", $content);
 
  440                $content = $this->tpl->get();
 
  446                && (
$_GET[
"frame"] != 
"_blank" || 
$_GET[
"obj_type"] != 
"MediaObject")) {
 
  452                if (empty(
$_GET[
"obj_type"])) {
 
  453                    $obj_type = 
"PageObject";
 
  455                    $obj_type = 
$_GET[
"obj_type"];
 
  459                $childs = $node->child_nodes();
 
  461                foreach ($childs as $child) {
 
  462                    if ($child->node_name() == $obj_type) {
 
  471                    include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
 
  473                        $_GET[
"frame"] . 
"' and object type '" . $obj_type . 
"'.");
 
  478            $in_module = (
$attributes[
"template_location"] == 
"module")
 
  483                $this->tpl->setBodyClass(
"");
 
  492                $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
  493                $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
  496            include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
 
  501            include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
 
  507            $childs = $node->child_nodes();
 
  509            foreach ($childs as $child) {
 
  510                $child_attr = $this->
attrib2arr($child->attributes());
 
  512                switch ($child->node_name()) {
 
  519                        $this->
ilTOC($child_attr[
"target_frame"]);
 
  524                        switch ($this->lm->getType()) {
 
  529                                $content = $this->
ilPage($child);
 
  538                    case "ilLMNavigation":
 
  552                            $child_attr[
"inline"],
 
  554                            $child_attr[
"location"]
 
  585                include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
 
  590                $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
 
  591                include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
 
  593                $this->tpl->addOnLoadCode($close_call);
 
  598                if (
$_GET[
"frame"] == 
"") {
 
  599                    include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
 
  601                    $last_frame_url = 
$store->get(
"cf_" . $this->lm->getId());
 
  602                    if ($last_frame_url != 
"") {
 
  603                        $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('" . $last_frame_url . 
"', 'center_bottom');");
 
  606                    if (in_array(
$layout, array(
"toc2windyn"))) {
 
  607                        $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('" .
 
  608                            $ilCtrl->getLinkTarget($this, 
"saveFrameUrl", 
"", 
false, 
false) . 
"'); 
  609                                                        il.LearningModule.openInitFrames(); 
  612                    $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('" .
 
  613                        $ilCtrl->getLinkTarget($this, 
"refreshToc", 
"", 
false, 
false) . 
"'); 
  619                $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
 
  621                $this->tpl->fillJavaScriptFiles();
 
  622                $this->tpl->fillScreenReaderFocus();
 
  624                $this->tpl->fillCssFiles();
 
  627                $this->tpl->resetJavascript();
 
  628                $this->tpl->resetCss();
 
  629                $this->tpl->setBodyClass(
"ilLMNoMenu");
 
  631                include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
  633                    if ($f[
"type"] == 
"js") {
 
  634                        $this->tpl->addJavascript($f[
"target"]);
 
  636                    if ($f[
"type"] == 
"css") {
 
  637                        $this->tpl->addCSS($f[
"target"]);
 
  640                $this->tpl->fillJavaScriptFiles(
true);
 
  641                $this->tpl->fillCssFiles(
true);
 
  645            $this->tpl->fillBodyClass();
 
  653            $this->tpl->fillTabs();
 
  654            if ($this->fill_on_load_code) {
 
  655                $this->tpl->fillOnLoadCode();
 
  658            $content =  $this->tpl->get();
 
  659            $content = str_replace(
"{", 
"{", $content);
 
  660            $content = str_replace(
"}", 
"}", $content);
 
  662            header(
'Content-type: text/html; charset=UTF-8');
 
  665            $this->tpl->fillLeftNav();
 
  666            $this->tpl->fillOnLoadCode();
 
  668            $content =  $this->tpl->get();
 
  682        include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
 
  684        if (
$_GET[
"url"] != 
"") {
 
  685            $store->set(
"cf_" . $this->lm->getId(), 
$_GET[
"url"]);
 
  687            $store->set(
"cf_" . $this->lm->getId(), 
$_GET[
"url"]);
 
  699        if (
$_GET[
"frame"] != 
"_blank") {
 
  712        if (
$_GET[
"frame"] != 
"_blank") {
 
  715            $this->tpl = 
new ilTemplate(
"tpl.glossary_term_output.html", 
true, 
true, 
true);
 
  723                $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
  725                $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
  732                return $this->tpl->get();
 
  744        $ltiview = 
$DIC[
"lti"];
 
  745        if ($ltiview->isActive()) {
 
  746            include_once 
'./Services/LTI/classes/class.ilMainMenuGUI.php';
 
  749            include_once 
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
 
  754            $this->tpl->touchBlock(
"pg_intro");
 
  755            $this->tpl->touchBlock(
"pg_outro");
 
  761            $ilMainMenu->setLoginTargetPar(
"pg_" . $page_id . 
"_" . $this->lm->getRefId());
 
  766        $this->tpl->touchBlock(
"pg_intro");
 
  767        $this->tpl->touchBlock(
"pg_outro");
 
  768        $this->tpl->setBodyClass(
"std");
 
  769        $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
 
  771        $this->tpl->setVariable(
"MAINMENU_SPACER", $ilMainMenu->getSpacerClass());
 
  777    public function ilTOC($a_get_explorer = 
false)
 
  779        include_once(
"./Modules/LearningModule/classes/class.ilLMTOCExplorerGUI.php");
 
  780        $exp = 
new ilLMTOCExplorerGUI($this, 
"ilTOC", $this, $this->lang, $this->focus_id, $this->export_all_languages);
 
  781        $exp->setMainTemplate($this->tpl);
 
  783        if (!$exp->handleCommand()) {
 
  786            if ($this->deactivated_page) {
 
  787                $page_id = 
$_GET[
"obj_id"];
 
  790                $exp->setPathOpen((
int) $page_id);
 
  793            if ($this->chapter_has_no_active_page &&
 
  795                $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
  797                if ($this->lm->getTOCMode() == 
"pages") {
 
  798                    if ($this->deactivated_page) {
 
  799                        $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
  801                        $exp->setHighlightNode($page_id);
 
  804                    $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
 
  808                $exp->setOfflineMode(
true);
 
  811            if ($a_get_explorer) {
 
  814                $this->tpl->setCurrentBlock(
"il_toc");
 
  815                $this->tpl->setVariable(
"EXPLORER", $exp->getHTML());
 
  816                $this->tpl->parseCurrentBlock();
 
  829        if ($this->
offlineMode() && $this->lang != 
"" && $this->lang != 
"-") {
 
  830            include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
 
  832            $data = $ot->getLanguages();
 
  838        return $this->lm->getTitle();
 
  847        $this->tpl->setVariable(
"MENU", $this->lm_gui->setilLMMenu(
 
  848            $this->offlineMode(),
 
  849            $this->getExportFormat(),
 
  853            $this->getCurrentPageId(),
 
  855            $this->export_all_languages
 
  864        $this->tpl->setCurrentBlock(
"header_image");
 
  866            $this->tpl->setVariable(
"IMG_HEADER", 
"./images/icon_lm.svg");
 
  870        $this->tpl->parseCurrentBlock();
 
  871        $this->tpl->setCurrentBlock(
"lm_head");
 
  873        $this->tpl->parseCurrentBlock();
 
  883        if ($this->
abstract) {
 
  887        $showViewInFrameset = 
true;
 
  889        if ($showViewInFrameset) {
 
  892            $buttonTarget = 
"_top";
 
  896        include_once(
"./Services/UICore/classes/class.ilTemplate.php");
 
  897        $tpl_menu = 
new ilTemplate(
"tpl.lm_sub_menu.html", 
true, 
true, 
true);
 
  907                $tpl_menu->setCurrentBlock(
"edit_page");
 
  909                $tpl_menu->setVariable(
"EDIT_LINK", ILIAS_HTTP_PATH . 
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . 
$_GET[
"ref_id"] .
 
  910                    "&obj_id=" . $page_id . 
"&to_page=1");
 
  911                $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
 
  912                $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
 
  913                $tpl_menu->parseCurrentBlock();
 
  918            include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
 
  921                $page_id . 
"_" . $this->lm->getRefId(),
 
  929                $this->lm->getPageHeader(),
 
  930                $this->lm->isActiveNumbering(),
 
  931                $this->lm_set->get(
"time_scheduled_page_activation"),
 
  936            if ($pg_title != 
"") {
 
  937                $title.= 
": " . $pg_title;
 
  940            $plinkgui->setTitle(
$title);
 
  942            $tpl_menu->setCurrentBlock(
"perma_link");
 
  943            $tpl_menu->setVariable(
"PERMA_LINK", $plinkgui->getHTML());
 
  944            $tpl_menu->parseCurrentBlock();
 
  947        $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
 
  968        include_once 
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
 
  972            $this->lm->getType(),
 
  978        include_once 
"Services/Object/classes/class.ilObjectListGUI.php";
 
  979        ilObjectListGUI::prepareJSLinks(
 
  980            $this->ctrl->getLinkTarget($this, 
"redrawHeaderAction", 
"", 
true),
 
  981            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"ilnotegui"), 
"", 
"", 
true, 
false),
 
  982            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"iltagginggui"), 
"", 
"", 
true, 
false),
 
  986        $lg = $dispatcher->initHeaderAction();
 
  987        $lg->enableNotes(
true);
 
  988        $lg->enableComments($this->lm->publicNotes(), 
false);
 
  990        if ($this->lm->hasRating() && !$this->offlineMode()) {
 
  993                $this->lng->txt(
"lm_rating"),
 
  995                array(
"ilcommonactiondispatchergui", 
"ilratinggui")
 
 1000            $this->tpl->setVariable(
"HEAD_ACTION", 
$lg->getHeaderAction($this->tpl));
 
 1003            return $lg->getHeaderAction() .
 
 1004                $tpl->getOnLoadCodeForAsynch();
 
 1034        if (!$this->lm->publicNotes()) {
 
 1038        $next_class = $this->ctrl->getNextClass($this);
 
 1040        include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
 1046        $notes_gui = 
new ilNoteGUI($this->lm->getId(), $this->getCurrentPageId(), 
"pg");
 
 1048        if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"]) &&
 
 1050            $notes_gui->enablePublicNotesDeletion(
true);
 
 1053        $this->ctrl->setParameter($this, 
"frame", 
$_GET[
"frame"]);
 
 1054        $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1056        $notes_gui->enablePrivateNotes();
 
 1057        if ($this->lm->publicNotes()) {
 
 1058            $notes_gui->enablePublicNotes();
 
 1061        if ($next_class == 
"ilnotegui") {
 
 1062            $html = $this->ctrl->forwardCommand($notes_gui);
 
 1064            $html = $notes_gui->getNotesHTML();
 
 1066        $this->tpl->setVariable(
"NOTES", 
$html);
 
 1076        $ltiview = 
$DIC[
"lti"];
 
 1081        require_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
 
 1083        if (empty(
$_GET[
"obj_id"])) {
 
 1084            $a_id = $this->lm_tree->getRootId();
 
 1086            $a_id = 
$_GET[
"obj_id"];
 
 1089        if (!$a_std_templ_loaded) {
 
 1090            $this->tpl->addBlockFile(
"STATUSLINE", 
"statusline", 
"tpl.statusline.html");
 
 1093        if (!$this->lm->cleanFrames()) {
 
 1094            $frame_param = 
$_GET[
"frame"];
 
 1101            $frame_target = 
"_top";
 
 1106            if ($ltiview->isActive()) {
 
 1109                $ilLocator->addItem(
"...", 
"");
 
 1111                $par_id = 
$tree->getParentId(
$_GET[
"ref_id"]);
 
 1112                $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", $par_id);
 
 1113                $ilLocator->addItem(
 
 1115                    $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", 
"frameset"),
 
 1119                $ilCtrl->setParameterByClass(
"ilrepositorygui", 
"ref_id", 
$_GET[
"ref_id"]);
 
 1122            $ilLocator->setOffline(
true);
 
 1125        if ($this->lm_tree->isInTree($a_id)) {
 
 1126            $path = $this->lm_tree->getPathFull($a_id);
 
 1129                if (
$row[
"type"] != 
"pg") {
 
 1130                    if (
$row[
"child"] != $this->lm_tree->getRootId()) {
 
 1131                        $ilLocator->addItem(
 
 1136                                    $this->lm->isActiveNumbering(),
 
 1137                                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 1145                            $this->getLink(
$_GET[
"ref_id"], 
"layout", 
$row[
"child"], $frame_param, 
"StructureObject"),
 
 1149                        $ilLocator->addItem(
 
 1151                            $this->
getLink(
$_GET[
"ref_id"], 
"layout", 
"", $frame_param),
 
 1159            $ilLocator->addItem(
 
 1164            require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
 
 1167            $ilLocator->addItem(
 
 1168                $lm_obj->getTitle(),
 
 1169                $this->getLink(
$_GET[
"ref_id"], 
"layout", $a_id, $frame_param),
 
 1175            $debug = 
"DEBUG: <font color=\"red\">" . $this->type . 
"::" . $this->
id . 
"::" . 
$_GET[
"cmd"] . 
"</font><br/>";
 
 1181        $this->tpl->setLocator();
 
 1193        if (!$this->
offlineMode() && $this->current_page_id !== 
false) {
 
 1197        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 1199        $this->chapter_has_no_active_page = 
false;
 
 1200        $this->deactivated_page = 
false;
 
 1203        if (empty(
$_GET[
"obj_id"])) {
 
 1204            $obj_id = $this->lm_tree->getRootId();
 
 1206            $obj_id = 
$_GET[
"obj_id"];
 
 1209                $this->lm->getType(),
 
 1210                $this->lm_set->get(
"time_scheduled_page_activation")
 
 1215                $this->deactivated_page = 
true;
 
 1220        if (!$this->lm_tree->isInTree($obj_id)) {
 
 1224        $curr_node = $this->lm_tree->getNodeData($obj_id);
 
 1228            $this->lm->getType(),
 
 1229            $this->lm_set->get(
"time_scheduled_page_activation")
 
 1232        if ($curr_node[
"type"] == 
"pg" &&
 
 1234            $page_id = $curr_node[
"obj_id"];
 
 1239            while ($succ_node && !$active) {
 
 1240                $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
"pg");
 
 1241                $page_id = $succ_node[
"obj_id"];
 
 1244                    $this->lm->getType(),
 
 1245                    $this->lm_set->get(
"time_scheduled_page_activation")
 
 1249            if ($succ_node[
"type"] != 
"pg") {
 
 1250                $this->chapter_has_no_active_page = 
true;
 
 1255            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 1256               $this->lm_gui->object->getPublicAccessMode() == 
'selected') {
 
 1259                while ($public === 
false && $page_id > 0) {
 
 1260                    $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
'pg');
 
 1261                    $page_id = $succ_node[
'obj_id'];
 
 1267            if ($this->lm_tree->isInTree($page_id)) {
 
 1268                $path = $this->lm_tree->getPathId($page_id);
 
 1270                    $this->chapter_has_no_active_page = 
true;
 
 1275        $this->current_page_id = $page_id;
 
 1282        $this->tpl = 
new ilTemplate(
"tpl.page.html", 
true, 
true, 
true);
 
 1284        $this->tpl->setVariable(
"MENU", $this->lm_gui->setilCitationMenu());
 
 1286        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 1288        $this->pg_obj = $this->
getLMPage($page_id);
 
 1289        $xml = $this->pg_obj->getXMLContent();
 
 1290        $this->lm_gui->showCitation(
$xml);
 
 1297        if (!is_object($this->layout_doc)) {
 
 1303        $path = 
"/ilLayout/ilLinkTargets/LinkTarget";
 
 1306        for (
$i = 0; 
$i < count(
$res->nodeset); 
$i++) {
 
 1308            $frame = 
$res->nodeset[
$i]->get_attribute(
"Frame");
 
 1309            $onclick = 
$res->nodeset[
$i]->get_attribute(
"OnClick");
 
 1310            $targets[
$type] = array(
"Type" => 
$type, 
"Frame" => $frame, 
"OnClick" => $onclick);
 
 1323    public function ilPage(&$a_page_node, $a_page_id = 0)
 
 1332        $ilHelp->setScreenIdComponent(
"lm");
 
 1333        $ilHelp->setScreenId(
"content");
 
 1334        $ilHelp->setSubScreenId(
"content");
 
 1336        $this->fill_on_load_code = 
true;
 
 1341        if ($requested_page_lm != $this->lm->getId()) {
 
 1342            if ($_REQUEST[
"frame"] == 
"") {
 
 1346                $read_access = 
false;
 
 1348                    if (
$access->checkAccess(
"read", 
"", $ref_id)) {
 
 1349                        $read_access = 
true;
 
 1352                if (!$read_access) {
 
 1360        if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 1361           $this->lm_gui->object->getPublicAccessMode() == 
'selected') {
 
 1376            if ($this->lm->getRestrictForwardNavigation()) {
 
 1385        require_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
 1386        require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
 
 1389        if ($a_page_id == 0) {
 
 1395                include_once 
'./Services/Search/classes/class.ilUserSearchCache.php';
 
 1398                $search_string = $cache->getQuery();
 
 1401                if (is_array($search_string)) {
 
 1402                    $search_string = $search_string[
"lom_content"];
 
 1405                include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
 
 1406                include_once(
"./Services/Search/classes/class.ilQueryParser.php");
 
 1410                $words = $p->getQuotedWords();
 
 1411                if (is_array($words)) {
 
 1412                    foreach ($words as 
$w) {
 
 1417                $this->fill_on_load_code = 
true;
 
 1420            $page_id = $a_page_id;
 
 1424        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 1426            $this->tpl->setVariable(
 
 1427                "LOCATION_CONTENT_STYLESHEET",
 
 1431            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 1433        $this->tpl->parseCurrentBlock();
 
 1436        if ($this->chapter_has_no_active_page &&
 
 1439                "tpl.no_content_message.html",
 
 1442                "Modules/LearningModule" 
 1444            $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_no_page_in_chapter"));
 
 1451            $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
 
 1452            return $mtpl->get();
 
 1456        if ($this->deactivated_page) {
 
 1458                "tpl.no_content_message.html",
 
 1461                "Modules/LearningModule" 
 1463            $m = $this->lng->txt(
"cont_page_currently_deactivated");
 
 1465            if ($act_data[
"show_activation_info"] &&
 
 1466                (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 1468                    $this->lng->txt(
"cont_page_activation_on"),
 
 1475            $mtpl->setVariable(
"MESSAGE", 
$m);
 
 1482            $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
 
 1483            return $mtpl->get();
 
 1488        if ($this->focus_id > 0) {
 
 1489            $path = $this->lm_tree->getPathId($page_id);
 
 1492            if (!in_array($this->focus_id, 
$path)) {
 
 1494                    "tpl.out_of_focus_message.html",
 
 1497                    "Modules/LearningModule" 
 1499                $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message"));
 
 1500                $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
 
 1503                    $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
 
 1504                    $this->ctrl->setParameter($this, 
"obj_id", $this->focus_id);
 
 1505                    $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1506                    $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1508                    $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
 
 1509                    include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1513                $this->ctrl->setParameter($this, 
"focus_id", 
"");
 
 1514                $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1515                $this->ctrl->setParameter($this, 
"focus_id", 
$_GET[
"focus_id"]);
 
 1517                $focus_mess = $mtpl->get();
 
 1524                if ($sp == 0 || !in_array($this->focus_id, $path2)) {
 
 1526                        "tpl.out_of_focus_message.html",
 
 1529                        "Modules/LearningModule" 
 1531                    $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message_last_page"));
 
 1532                    $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
 
 1535                        $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
 
 1536                        $this->ctrl->setParameter($this, 
"obj_id", $this->focus_id);
 
 1537                        $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1538                        $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1540                        $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
 
 1541                        include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1545                    $this->ctrl->setParameter($this, 
"focus_id", 
"");
 
 1546                    $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this, 
"layout"));
 
 1547                    $this->ctrl->setParameter($this, 
"focus_id", 
$_GET[
"focus_id"]);
 
 1549                    $focus_mess = $mtpl->get();
 
 1555        if ($page_id == 0) {
 
 1556            $cont = $this->lng->txt(
"cont_no_page");
 
 1557            $this->tpl->setVariable(
"PAGE_CONTENT", $cont);
 
 1564        $page_object = $page_object_gui->getPageObject();
 
 1565        $page_object->buildDom();
 
 1566        $page_object->registerOfflineHandler($this);
 
 1568        $int_links = $page_object->getInternalLinks();
 
 1572        $page_object_gui->setTemplateOutput(
false);
 
 1575        $ilUser->setDesktopItemParameters($this->lm->getRefId(), $this->lm->getType(), $page_id);
 
 1578        include_once 
'./Modules/Course/classes/class.ilCourseLMHistory.php';
 
 1587        $lm_pg_obj->setLMId($this->lm->getId());
 
 1589        $page_object_gui->setLinkXML($link_xml);
 
 1593        $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 1596        if ($page_id == 0 || ($page_id != $this->lm->getHeaderPage() &&
 
 1597            $page_id != $this->lm->getFooterPage())) {
 
 1598            $page_object_gui->setPresentationTitle(
 
 1600                    $lm_pg_obj->getId(),
 
 1601                    $this->lm->getPageHeader(),
 
 1602                    $this->lm->isActiveNumbering(),
 
 1603                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 1611            if (
$ilUser->getId() != ANONYMOUS_USER_ID && $page_id != 0 && !$this->offlineMode()) {
 
 1615            $page_object_gui->setEnabledPageFocus(
false);
 
 1616            $page_object_gui->getPageConfig()->setEnableSelfAssessment(
false);
 
 1620        $page_object_gui->setLinkParams(
"ref_id=" . $this->lm->getRefId());
 
 1621        $page_object_gui->setTemplateTargetVar(
"PAGE_CONTENT");
 
 1625        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 1627            $this->tpl->setVariable(
 
 1628                "LOCATION_SYNTAX_STYLESHEET",
 
 1632            $this->tpl->setVariable(
 
 1633                "LOCATION_SYNTAX_STYLESHEET",
 
 1634                "syntaxhighlight.css" 
 1637        $this->tpl->parseCurrentBlock();
 
 1640        $ret = $page_object_gui->presentation($page_object_gui->getOutputMode());
 
 1643        if ($this->lm->getHeaderPage() > 0 &&
 
 1644            $page_id != $this->lm->getHeaderPage() &&
 
 1645            ($page_id == 0 || $page_id != $this->lm->getFooterPage())) {
 
 1647                $head = $this->
ilPage($a_page_node, $this->lm->getHeaderPage());
 
 1652        if ($this->lm->getFooterPage() > 0 &&
 
 1653            $page_id != $this->lm->getFooterPage() &&
 
 1654            ($page_id == 0 || $page_id != $this->lm->getHeaderPage())) {
 
 1656                $foot = $this->
ilPage($a_page_node, $this->lm->getFooterPage());
 
 1662        if ($this->lm->hasRatingPages() && !$this->offlineMode()) {
 
 1663            include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
 
 1665            $rating_gui->setObject($this->lm->getId(), 
"lm", $page_id, 
"lm");
 
 1666            $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
 
 1673            $this->ctrl->setParameter($this, 
"pgid", $page_id);
 
 1674            $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('" .
 
 1675                $this->ctrl->getLinkTarget($this, 
"updatePageRating", 
"", 
true, 
false) .
 
 1677            $this->ctrl->setParameter($this, 
"pgid", 
"");
 
 1679            $rating = 
'<div id="ilrtrpg" style="text-align:right">' .
 
 1680                $rating_gui->getHtml(
true, 
true, 
"il.LearningModule.saveRating(%rating%);") .
 
 1684        $this->tpl->setVariable(
"PAGE_CONTENT", $rating . $head . $focus_mess . 
$ret . $foot);
 
 1686        return $head . $focus_mess . 
$ret . $foot;
 
 1693        $pg_id = 
$_GET[
"pgid"];
 
 1694        if (!$this->ctrl->isAsynch() || !$pg_id) {
 
 1698        include_once 
'./Services/Rating/classes/class.ilRating.php';
 
 1699        $rating = (int) 
$_POST[
"rating"];
 
 1719        include_once 
'./Services/Rating/classes/class.ilRatingGUI.php';
 
 1721        $rating->setObject($this->lm->getId(), 
"lm", $pg_id, 
"lm", 
$ilUser->getId());
 
 1722        $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
 
 1724        echo $rating->getHtml(
true, 
true, 
"il.LearningModule.saveRating(%rating%);");
 
 1726        echo $this->tpl->getOnLoadCodeForAsynch();
 
 1738        include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 1740            $this->lm->getStyleSheetId(),
 
 1744            $a_page_gui->setOutputMode(
"presentation");
 
 1745            $this->fill_on_load_code = 
true;
 
 1747            $a_page_gui->setOutputMode(
"offline");
 
 1749            $this->fill_on_load_code = 
false;
 
 1754        $a_page_gui->setFileDownloadLink($this->
getLink(
$_GET[
"ref_id"], 
"downloadFile"));
 
 1756            $this->ctrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1758        $a_page_gui->setFullscreenLink($this->
getLink(
$_GET[
"ref_id"], 
"fullscreen"));
 
 1772        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 1774            $this->tpl->setVariable(
 
 1775                "LOCATION_CONTENT_STYLESHEET",
 
 1779            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 1781        $this->tpl->parseCurrentBlock();
 
 1783        $this->tpl->addBlockFile(
"PAGE_CONTENT", 
"pg_content", 
"tpl.page_preconditions.html", 
true);
 
 1786        include_once(
"./Services/Repository/classes/class.ilRepositoryExplorer.php");
 
 1787        foreach ($conds as $cond) {
 
 1788            include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1790            $this->tpl->setCurrentBlock(
"condition");
 
 1792            $this->tpl->setVariable(
"LINK_ITEM", $obj_link);
 
 1793            if ($cond[
"operator"] == 
"passed") {
 
 1794                $cond_str = $this->lng->txt(
"passed");
 
 1796                $cond_str = $this->lng->txt(
"condition_" . $cond[
"operator"]);
 
 1798            $this->tpl->setVariable(
"VAL_CONDITION", $cond_str . 
" " . $cond[
"value"]);
 
 1799            $this->tpl->parseCurrentBlock();
 
 1801        $this->tpl->setCurrentBlock(
"pg_content");
 
 1803        $this->tpl->setVariable(
 
 1804            "TXT_MISSING_PRECONDITIONS",
 
 1806                $this->lng->txt(
"cont_missing_preconditions"),
 
 1810        $this->tpl->setVariable(
"TXT_ITEM", $this->lng->txt(
"object"));
 
 1811        $this->tpl->setVariable(
"TXT_CONDITION", $this->lng->txt(
"condition"));
 
 1814        $parent = $this->lm_tree->getParentId($topchap);
 
 1815        $childs = $this->lm_tree->getChildsByType($parent, 
"st");
 
 1819        foreach ($childs as $child) {
 
 1820            if ($child[
"child"] == $topchap) {
 
 1823            if (
$i++ == ($j+1)) {
 
 1824                $succ_node = $this->lm_tree->fetchSuccessorNode($child[
"child"], 
"pg");
 
 1827        if ($succ_node != 
"") {
 
 1828            $framestr = (!empty(
$_GET[
"frame"]))
 
 1829                ? 
"frame=" . 
$_GET[
"frame"] . 
"&" 
 1832            $showViewInFrameset = 
true;
 
 1833            $link = 
"<br /><a href=\"" .
 
 1834                $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"], 
$_GET[
"frame"]) .
 
 1835                "\">" . $this->lng->txt(
"cont_skip_chapter") . 
"</a>";
 
 1836            $this->tpl->setVariable(
"LINK_SKIP_CHAPTER", $link);
 
 1839        $this->tpl->parseCurrentBlock();
 
 1851        $showViewInFrameset = 
true;
 
 1853        if ($a_layoutframes == 
"") {
 
 1854            $a_layoutframes = array();
 
 1856        $link_info = 
"<IntLinkInfos>";
 
 1857        foreach ($a_int_links as $int_link) {
 
 1858            $target = $int_link[
"Target"];
 
 1859            if (substr(
$target, 0, 4) == 
"il__") {
 
 1862                $type = $int_link[
"Type"];
 
 1863                $targetframe = ($int_link[
"TargetFrame"] != 
"")
 
 1864                    ? $int_link[
"TargetFrame"]
 
 1868                $anc = $anc_add = 
"";
 
 1869                if ($int_link[
"Anchor"] != 
"") {
 
 1870                    $anc = $int_link[
"Anchor"];
 
 1871                    $anc_add = 
"_" . rawurlencode($int_link[
"Anchor"]);
 
 1876                    case "StructureObject":
 
 1878                        if ($lm_id == $this->lm->getId() ||
 
 1879                            ($targetframe != 
"None" && $targetframe != 
"New")) {
 
 1880                            $ltarget = $a_layoutframes[$targetframe][
"Frame"];
 
 1884                            $nframe = ($ltarget == 
"")
 
 1887                            if ($ltarget == 
"") {
 
 1888                                if ($showViewInFrameset) {
 
 1915                                if (
$type == 
"PageObject") {
 
 1916                                    $href = 
"./goto.php?target=pg_" . 
$target_id . $anc_add;
 
 1918                                    $href = 
"./goto.php?target=st_" . 
$target_id;
 
 1921                                if (
$type == 
"PageObject") {
 
 1922                                    $href = ILIAS_HTTP_PATH . 
"/goto.php?target=pg_" . 
$target_id . $anc_add . 
"&client_id=" . CLIENT_ID;
 
 1924                                    $href = ILIAS_HTTP_PATH . 
"/goto.php?target=st_" . 
$target_id . 
"&client_id=" . CLIENT_ID;
 
 1927                            if ($targetframe != 
"New") {
 
 1930                                $ltarget = 
"_blank";
 
 1935                    case "GlossaryItem":
 
 1936                        if ($targetframe == 
"None") {
 
 1937                            $targetframe = 
"Glossary";
 
 1939                        $ltarget = $a_layoutframes[$targetframe][
"Frame"];
 
 1940                        $nframe = ($ltarget == 
"")
 
 1948                        $ltarget = $a_layoutframes[$targetframe][
"Frame"];
 
 1949                        $nframe = ($ltarget == 
"")
 
 1956                    case "RepositoryItem":
 
 1960                            $href = 
"./goto.php?target=" . $obj_type . 
"_" . 
$target_id;
 
 1962                            $href = ILIAS_HTTP_PATH . 
"/goto.php?target=" . $obj_type . 
"_" . 
$target_id . 
"&client_id=" . CLIENT_ID;
 
 1968                        include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
 1976                            $href = 
$ilCtrl->getLinkTarget($this, 
"downloadFile");
 
 1977                            $ilCtrl->setParameter($this, 
"file_id", 
"");
 
 1978                            $ilCtrl->setParameter($this, 
"obj_id", 
$_GET[
"obj_id"]);
 
 1984                        if ($obj_type == 
"usr") {
 
 1985                            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 1986                            $back = $this->ctrl->getLinkTarget($this, 
"layout");
 
 1988                            $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
$target_id);
 
 1989                            $this->ctrl->setParameterByClass(
 
 1990                                "ilpublicuserprofilegui",
 
 1995                            include_once(
"./Services/User/classes/class.ilUserUtil.php");
 
 1997                                $href = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui", 
"getHTML");
 
 1999                            $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui", 
"user_id", 
"");
 
 2006                $anc_par = 
'Anchor="' . $anc . 
'"';
 
 2009                    $link_info .= 
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " .
 
 2010                        "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" $anc_par/>";
 
 2022        $link_info.= 
"</IntLinkInfos>";
 
 2031        $link_info = 
"<LinkTargets>";
 
 2033            $link_info.=
"<LinkTarget TargetFrame=\"" . 
$t[
"Type"] . 
"\" LinkTarget=\"" . 
$t[
"Frame"] . 
"\" OnClick=\"" . 
$t[
"OnClick"] . 
"\" />";
 
 2035        $link_info.= 
"</LinkTargets>";
 
 2046        require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
 
 2050        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2052            $this->tpl->setVariable(
 
 2053                "LOCATION_CONTENT_STYLESHEET",
 
 2057            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2059        $this->tpl->parseCurrentBlock();
 
 2062        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 2065            $this->tpl->setVariable(
 
 2066                "LOCATION_SYNTAX_STYLESHEET",
 
 2070            $this->tpl->setVariable(
 
 2071                "LOCATION_SYNTAX_STYLESHEET",
 
 2072                "syntaxhighlight.css" 
 2075        $this->tpl->parseCurrentBlock();
 
 2077        $int_links = $term_gui->getInternalLinks();
 
 2080        $term_gui->setLinkXML($link_xml);
 
 2084            $ilCtrl->setParameter($this, 
"pg_type", 
"glo");
 
 2086        $term_gui->output($this->
offlineMode(), $this->tpl);
 
 2091            $ilCtrl->setParameter($this, 
"pg_type", 
"");
 
 2102        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2104            $this->tpl->setVariable(
 
 2105                "LOCATION_CONTENT_STYLESHEET",
 
 2109            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2111        $this->tpl->parseCurrentBlock();
 
 2119            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 2121            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
 2124        $this->tpl->setCurrentBlock(
"ilMedia");
 
 2131        require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 2133        if (!empty(
$_GET[
"pg_id"])) {
 
 2134            require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 2136            $pg_obj->buildDom();
 
 2141            $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
 
 2160        $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
 2161        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
 2173        $mode = (
$_GET[
"cmd"] == 
"fullscreen")
 
 2178            $this->
getLink($this->lm->getRefId(), 
"fullscreen");
 
 2179        $params = array(
'mode' => $mode, 
'enlarge_path' => $enlarge_path,
 
 2180            'link_params' => 
"ref_id=" . $this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
 
 2181            'ref_id' => $this->lm->getRefId(), 
'pg_frame' => $pg_frame, 
'webspace_path' => $wb_path);
 
 2182        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, 
$params);
 
 2187        $this->tpl->setVariable(
"MEDIA_CONTENT", 
$output);
 
 2190        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
 
 2197    public function ilJavaScript($a_inline = 
"", $a_file = 
"", $a_location = 
"")
 
 2199        if ($a_inline != 
"") {
 
 2200            $js_tpl = 
new ilTemplate($a_inline, 
true, 
false, $a_location);
 
 2201            $js = $js_tpl->get();
 
 2202            $this->tpl->setVariable(
"INLINE_JS", 
$js);
 
 2218        if (empty($page_id)) {
 
 2226        if ($this->chapter_has_no_active_page &&
 
 2228            $c_id = 
$_GET[
"obj_id"];
 
 2230            if ($this->deactivated_page) {
 
 2231                $c_id = 
$_GET[
"obj_id"];
 
 2237            $succ_node = $this->lm_tree->fetchSuccessorNode($c_id, 
"pg");
 
 2238            $c_id = $succ_node[
"obj_id"];
 
 2242                $this->lm->getType(),
 
 2243                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2246            if ($succ_node[
"obj_id"] > 0 &&
 
 2247                $ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2248                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 2251            } elseif ($succ_node[
"obj_id"] > 0 && !$active) {
 
 2254                if ($act_data[
"show_activation_info"] &&
 
 2255                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 2266            return $succ_node[
"obj_id"];
 
 2280        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 2282        include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
 
 2286        if (empty($page_id)) {
 
 2291        if (!$this->lm_tree->isInTree($page_id)) {
 
 2295            $limpos = strpos(
$_GET[
"back_pg"], 
":");
 
 2297                $back_pg = substr(
$_GET[
"back_pg"], 0, $limpos);
 
 2299                $back_pg = 
$_GET[
"back_pg"];
 
 2301            if (!$this->lm->cleanFrames()) {
 
 2304                        $this->lm->getRefId(),
 
 2315                        $this->lm->getRefId(),
 
 2326            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
 
 2327            $this->tpl->setVariable(
"IMG_PREV", $back_img);
 
 2328            $this->tpl->setVariable(
"HREF_PREV", $back_href);
 
 2329            $this->tpl->setVariable(
"FRAME_PREV", $back_target);
 
 2330            $this->tpl->setVariable(
"TXT_PREV", $this->lng->txt(
"back"));
 
 2331            $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"back"));
 
 2332            $this->tpl->setVariable(
 
 2336            $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
 
 2337                ? 
"images/spacer.png" 
 2339            $this->tpl->parseCurrentBlock();
 
 2340            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
 
 2341            $this->tpl->setVariable(
"IMG_PREV2", $back_img);
 
 2342            $this->tpl->setVariable(
"HREF_PREV2", $back_href);
 
 2343            $this->tpl->setVariable(
"FRAME_PREV2", $back_target);
 
 2344            $this->tpl->setVariable(
"TXT_PREV2", $this->lng->txt(
"back"));
 
 2345            $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"back"));
 
 2346            $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
 
 2347                ? 
"images/spacer.png" 
 2349            $this->tpl->parseCurrentBlock();
 
 2357        if ($this->chapter_has_no_active_page &&
 
 2359            $c_id = 
$_GET[
"obj_id"];
 
 2361            if ($this->deactivated_page) {
 
 2362                $c_id = 
$_GET[
"obj_id"];
 
 2368            $succ_node = $this->lm_tree->fetchSuccessorNode($c_id, 
"pg");
 
 2369            $c_id = $succ_node[
"obj_id"];
 
 2373                $this->lm->getType(),
 
 2374                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2377            if ($succ_node[
"obj_id"] > 0 &&
 
 2378                $ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2379                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 2382            } elseif ($succ_node[
"obj_id"] > 0 && !$active) {
 
 2385                if ($act_data[
"show_activation_info"] &&
 
 2386                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 2396        $succ_str = ($succ_node !== 
false)
 
 2397            ? 
" -> " . $succ_node[
"obj_id"] . 
"_" . $succ_node[
"type"]
 
 2402        if ($this->deactivated_page) {
 
 2403            $c_id = 
$_GET[
"obj_id"];
 
 2408            $pre_node = $this->lm_tree->fetchPredecessorNode($c_id, 
"pg");
 
 2409            $c_id = $pre_node[
"obj_id"];
 
 2412                $this->lm->getType(),
 
 2413                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2415            if ($pre_node[
"obj_id"] > 0 &&
 
 2416                $ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2417                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 2420            } elseif ($pre_node[
"obj_id"] > 0 && !$active) {
 
 2423                if ($act_data[
"show_activation_info"] &&
 
 2424                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 2434        $pre_str = ($pre_node !== 
false)
 
 2435            ? $pre_node[
"obj_id"] . 
"_" . $pre_node[
"type"] . 
" -> " 
 2439        $framestr = (!empty(
$_GET[
"frame"]))
 
 2440            ? 
"frame=" . 
$_GET[
"frame"] . 
"&" 
 2446        $showViewInFrameset = 
true;
 
 2448        if ($pre_node != 
"") {
 
 2451                $pre_node[
"obj_id"],
 
 2452                $this->lm->getPageHeader(),
 
 2453                $this->lm->isActiveNumbering(),
 
 2454                $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2464            if (!$this->lm->cleanFrames()) {
 
 2466                    $this->
getLink($this->lm->getRefId(), 
"layout", $pre_node[
"obj_id"], 
$_GET[
"frame"]);
 
 2468            } elseif ($showViewInFrameset && !$this->
offlineMode()) {
 
 2470                    $this->
getLink($this->lm->getRefId(), 
"layout", $pre_node[
"obj_id"]);
 
 2474                    $this->
getLink($this->lm->getRefId(), 
"layout", $pre_node[
"obj_id"]);
 
 2475                $prev_target = 
'target="_top" ';
 
 2478            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2480                $output = $this->lng->txt(
"msg_page_not_public");
 
 2483            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
 
 2484            $this->tpl->setVariable(
"IMG_PREV", $prev_img);
 
 2485            $this->tpl->setVariable(
"HREF_PREV", $prev_href);
 
 2486            $this->tpl->setVariable(
"FRAME_PREV", $prev_target);
 
 2487            $this->tpl->setVariable(
"TXT_PREV", $prev_title);
 
 2488            $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"previous"));
 
 2489            $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
 
 2490                ? 
"images/spacer.png" 
 2492            $this->tpl->setVariable(
 
 2496            $this->tpl->parseCurrentBlock();
 
 2497            $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
 
 2498            $this->tpl->setVariable(
"IMG_PREV2", $prev_img);
 
 2499            $this->tpl->setVariable(
"HREF_PREV2", $prev_href);
 
 2500            $this->tpl->setVariable(
"FRAME_PREV2", $prev_target);
 
 2501            $this->tpl->setVariable(
"TXT_PREV2", $prev_title);
 
 2502            $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"previous"));
 
 2503            $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
 
 2504                ? 
"images/spacer.png" 
 2506            $this->tpl->parseCurrentBlock();
 
 2508        if ($succ_node != 
"") {
 
 2511                $succ_node[
"obj_id"],
 
 2512                $this->lm->getPageHeader(),
 
 2513                $this->lm->isActiveNumbering(),
 
 2514                $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2523            if (!$this->lm->cleanFrames()) {
 
 2525                    $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"], 
$_GET[
"frame"]);
 
 2527            } elseif ($showViewInFrameset && !$this->
offlineMode()) {
 
 2529                    $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"]);
 
 2533                    $this->
getLink($this->lm->getRefId(), 
"layout", $succ_node[
"obj_id"]);
 
 2534                $succ_target = 
' target="_top" ';
 
 2537            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 2539                $output = $this->lng->txt(
"msg_page_not_public");
 
 2542            $this->tpl->setCurrentBlock(
"ilLMNavigation_Next");
 
 2543            $this->tpl->setVariable(
"IMG_SUCC", $succ_img);
 
 2544            $this->tpl->setVariable(
"HREF_SUCC", $succ_href);
 
 2545            $this->tpl->setVariable(
"FRAME_SUCC", $succ_target);
 
 2546            $this->tpl->setVariable(
"TXT_SUCC", $succ_title);
 
 2547            $this->tpl->setVariable(
"ALT_SUCC", $this->lng->txt(
"next"));
 
 2548            $this->tpl->setVariable(
"SPACER_SUCC", $this->
offlineMode()
 
 2549                ? 
"images/spacer.png" 
 2551            $this->tpl->setVariable(
 
 2555            $this->tpl->parseCurrentBlock();
 
 2556            $this->tpl->setCurrentBlock(
"ilLMNavigation_Next2");
 
 2557            $this->tpl->setVariable(
"IMG_SUCC2", $succ_img);
 
 2558            $this->tpl->setVariable(
"HREF_SUCC2", $succ_href);
 
 2559            $this->tpl->setVariable(
"FRAME_SUCC2", $succ_target);
 
 2560            $this->tpl->setVariable(
"TXT_SUCC2", $succ_title);
 
 2561            $this->tpl->setVariable(
"ALT_SUCC2", $this->lng->txt(
"next"));
 
 2562            $this->tpl->setVariable(
"SPACER_SUCC2", $this->
offlineMode()
 
 2563                ? 
"images/spacer.png" 
 2565            $this->tpl->parseCurrentBlock();
 
 2569                if ($this->lm->getRestrictForwardNavigation()) {
 
 2570                    if ($this->
getTracker()->hasPredIncorrectAnswers($succ_node[
"obj_id"])) {
 
 2571                        $this->tpl->addOnLoadCode(
"$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
 
 2581        $child_nodes = $a_node->child_nodes();
 
 2582        foreach ($child_nodes as $child) {
 
 2583            if ($child->node_name() == 
"ilFrame") {
 
 2586                if ((!empty(
$attributes[
"rows"])) || (!empty($attrubtes[
"cols"]))) {
 
 2594                                $this->lm->getRefId(),
 
 2617                            $this->lm->getRefId(),
 
 2631                        if (
$_GET[
"anchor"] != 
"") {
 
 2653        if (
$type == 
"end") {
 
 2659        if (is_array($attr)) {
 
 2660            foreach ($attr as $k => $v) {
 
 2661                $tag .= 
" " . $k . 
"=\"$v\"";
 
 2682        if (!$this->lm->isActiveTOC() || !$this->lm->isActiveLMMenu()) {
 
 2687        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2689            $this->tpl->setVariable(
 
 2690                "LOCATION_CONTENT_STYLESHEET",
 
 2694            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2696        $this->tpl->parseCurrentBlock();
 
 2704            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 2706            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
 2712        $this->tpl->getStandardTemplate();
 
 2717        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 2718            $this->offlineMode(),
 
 2719            $this->getExportFormat(),
 
 2725            $this->export_all_languages
 
 2729        $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
 
 2733        include_once(
"./Modules/LearningModule/classes/class.ilLMTableOfContentsExplorerGUI.php");
 
 2735        $exp->setMainTemplate($this->tpl);
 
 2737        if (!$exp->handleCommand()) {
 
 2740            if ($this->deactivated_page) {
 
 2741                $page_id = 
$_GET[
"obj_id"];
 
 2747                if ($this->chapter_has_no_active_page &&
 
 2749                    $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
 2751                    if ($this->lm->getTOCMode() == 
"pages") {
 
 2752                        if ($this->deactivated_page) {
 
 2753                            $exp->setHighlightNode(
$_GET[
"obj_id"]);
 
 2755                            $exp->setHighlightNode($page_id);
 
 2758                        $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
 
 2763                $exp->setOfflineMode(
true);
 
 2766            $this->tpl->setVariable(
"ADM_CONTENT", $exp->getHTML());
 
 2770            $this->tpl->resetJavascript();
 
 2771            $this->tpl->resetCss();
 
 2772            $this->tpl->setBodyClass(
"ilLMNoMenu");
 
 2774            include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
 
 2776                if ($f[
"type"] == 
"js") {
 
 2777                    $this->tpl->addJavascript($f[
"target"]);
 
 2779                if ($f[
"type"] == 
"css") {
 
 2780                    $this->tpl->addCSS($f[
"target"]);
 
 2783            $this->tpl->fillJavaScriptFiles(
true);
 
 2784            $this->tpl->fillOnLoadCode();
 
 2786            return $this->tpl->get();
 
 2800        $this->ctrl->setCmd(
"showSummary");
 
 2801        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 2825            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 2827            $this->tpl->setStyleSheetLocation(
"./" . $style_name);
 
 2830        $this->tpl->getStandardTemplate();
 
 2834        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 2835            $this->offlineMode(),
 
 2836            $this->getExportFormat(),
 
 2842            $this->export_all_languages
 
 2846        if ($ilAccess->checkAccess(
"read", 
"", 
$_GET[
"ref_id"])) {
 
 2849            $ilLocator->addRepositoryItems();
 
 2850            $this->tpl->setLocator();
 
 2863        $this->lng->loadLanguageModule(
"meta");
 
 2865        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
 2868        $info->enablePrivateNotes();
 
 2869        $info->enableLearningProgress();
 
 2871        $info->enableNews();
 
 2872        if ($ilAccess->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) {
 
 2874            $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
 2876            $info->enableNewsEditing();
 
 2878            if ($enable_internal_rss) {
 
 2879                $info->setBlockProperty(
"news", 
"settings", 
true);
 
 2901        $info->addMetaDataSections($this->lm->getId(), 0, $this->lm->getType());
 
 2904            $this->tpl->setContent(
$info->getHTML());
 
 2905            return $this->tpl->get();
 
 2908            $this->ctrl->forwardCommand(
$info);
 
 2922        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 2923        if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
 
 2927        include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
 
 2930        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 2932            $this->tpl->setVariable(
 
 2933                "LOCATION_CONTENT_STYLESHEET",
 
 2937            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 2939        $this->tpl->parseCurrentBlock();
 
 2943        $this->tpl->getStandardTemplate();
 
 2945        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 2946            $this->offlineMode(),
 
 2947            $this->getExportFormat(),
 
 2953            $this->export_all_languages
 
 2957        $this->tpl->addBlockFile(
 
 2960            "tpl.lm_print_selection.html",
 
 2961            "Modules/LearningModule" 
 2973        $this->ctrl->setParameterByClass(
"illmpresentationgui", 
"obj_id", 
$_GET[
"obj_id"]);
 
 2974        $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
 
 2976        $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
 
 2979        if (!is_array(
$_POST[
"item"])) {
 
 2980            if (
$_GET[
"obj_id"] != 
"") {
 
 2989        foreach ($nodes as $node) {
 
 2994                $this->lm->getType(),
 
 2995                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2998            if ($node[
"type"] == 
"pg" &&
 
 3003            $text = $img_scr = $img_alt = 
"";
 
 3007            switch ($node[
"type"]) {
 
 3013                            $this->lm->getPageHeader(),
 
 3014                            $this->lm->isActiveNumbering(),
 
 3015                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3021                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3022                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3025                            $text.= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3029                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"pg");
 
 3036                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"obj_lm");
 
 3045                            $this->lm->isActiveNumbering(),
 
 3046                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3051                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3052                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3055                            $text.= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3059                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"st");
 
 3064                $text.= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3067            $this->nl->addListNode(
 
 3080        if (
$_GET[
"obj_id"] > 0 && !$this->lm_tree->isInTree(
$_GET[
"obj_id"])) {
 
 3084                    $this->lm->getPageHeader(),
 
 3085                    $this->lm->isActiveNumbering(),
 
 3086                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3092            if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3093               $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3096                    $text.= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 3104            $this->nl->addListNode(
 
 3115        $f = $this->form->getHTML();
 
 3119        $tb->addFormButton(
$lng->txt(
"cont_show_print_view"), 
"showPrintView");
 
 3120        $this->tpl->setVariable(
"TOOLBAR", $tb->getHTML());
 
 3122        $this->tpl->setVariable(
"ITEM_SELECTION", $f);
 
 3136            if ($this->lm->getRestrictForwardNavigation()) {
 
 3137                $nodes = array_filter($nodes, 
function ($node) use (
$tracker) {
 
 3138                    return !
$tracker->hasPredIncorrectAnswers($node[
"child"]);
 
 3154        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 3159        $radg->setValue(
"page");
 
 3161        $radg->addOption($op1);
 
 3163        $radg->addOption($op2);
 
 3165        $radg->addOption($op3);
 
 3167        include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
 
 3170        $op3->addSubItem($nl);
 
 3173        $this->form->addItem($radg);
 
 3175        $this->form->addCommandButton(
"showPrintView", 
$lng->txt(
"cont_show_print_view"));
 
 3176        $this->form->setOpenTag(
false);
 
 3177        $this->form->setCloseTag(
false);
 
 3179        $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
 
 3180        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
 3192        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 3194        if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
 
 3202        if (
$_POST[
"sel_type"] == 
"page") {
 
 3203            if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id, 
$_POST[
"obj_id"])) {
 
 3204                $_POST[
"obj_id"][] = $c_obj_id;
 
 3207        if (
$_POST[
"sel_type"] == 
"chapter" && $c_obj_id > 0) {
 
 3208            $path = $this->lm_tree->getPathFull($c_obj_id);
 
 3209            $chap_id = 
$path[1][
"child"];
 
 3211                $_POST[
"obj_id"][] = $chap_id;
 
 3221            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
 3223            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
 3227        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 3229            $this->tpl->setVariable(
 
 3230                "LOCATION_CONTENT_STYLESHEET",
 
 3234            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 3236        $this->tpl->parseCurrentBlock();
 
 3239        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
 3240        $this->tpl->setVariable(
 
 3241            "LOCATION_SYNTAX_STYLESHEET",
 
 3244        $this->tpl->parseCurrentBlock();
 
 3247        $this->tpl->addBlockFile(
"CONTENT", 
"content", 
"tpl.lm_print_view.html", 
true);
 
 3252        $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
 
 3254        include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
 3255        include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
 
 3256        include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
 
 3261        $glossary_links = array();
 
 3262        $output_header = 
false;
 
 3263        $media_links = array();
 
 3266        if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
 
 3268                $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
 
 3269                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3271                    $this->lm->getStyleSheetId(),
 
 3277                $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 3278                $page_object_gui->setOutputMode(
"print");
 
 3279                $page_object_gui->setPresentationTitle(
"");
 
 3280                $page_object_gui->setFileDownloadLink(
"#");
 
 3281                $page_object_gui->setFullscreenLink(
"#");
 
 3282                $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 3283                $footer_page_content = $page_object_gui->showPage();
 
 3286        if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
 
 3288                $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
 
 3289                include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3291                    $this->lm->getStyleSheetId(),
 
 3297                $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 3298                $page_object_gui->setOutputMode(
"print");
 
 3299                $page_object_gui->setPresentationTitle(
"");
 
 3300                $page_object_gui->setFileDownloadLink(
"#");
 
 3301                $page_object_gui->setFullscreenLink(
"#");
 
 3302                $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 3303                $header_page_content = $page_object_gui->showPage();
 
 3308        if (is_array(
$_POST[
"obj_id"])) {
 
 3309            foreach (
$_POST[
"obj_id"] as $k) {
 
 3310                if ($k > 0 && !$this->lm_tree->isInTree($k)) {
 
 3312                        $nodes[] = array(
"obj_id" => $k, 
"type" => 
"pg", 
"free" => 
true);
 
 3318            $ilCtrl->redirect($this, 
"showPrintViewSelection");
 
 3321        foreach ($nodes as $node_key => $node) {
 
 3325                $this->lm->getType(),
 
 3326                $this->lm_set->get(
"time_scheduled_page_activation")
 
 3328            if ($node[
"type"] == 
"pg" && !$active) {
 
 3334            if ($node[
"depth"] <= $act_level) {
 
 3335                if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"], 
$_POST[
"obj_id"])) {
 
 3336                    $act_level = $node[
"depth"];
 
 3343            if ($this->lm->getRestrictForwardNavigation()) {
 
 3344                if ($this->
getTracker()->hasPredIncorrectAnswers($node[
"obj_id"])) {
 
 3351                if ($node[
"type"] == 
"du") {
 
 3352                    $output_header = 
true;
 
 3356                if ($node[
"type"] == 
"st") {
 
 3357                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3358                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3365                    $this->tpl->setCurrentBlock(
"print_chapter");
 
 3367                    $chapter_title = $chap->_getPresentationTitle(
 
 3369                        $this->lm->isActiveNumbering(),
 
 3370                        $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3374                    $this->tpl->setVariable(
 
 3380                        if ($nodes[$node_key + 1][
"type"] == 
"pg") {
 
 3381                            $this->tpl->setVariable(
 
 3383                                $header_page_content
 
 3385                            $did_chap_page_header = 
true;
 
 3389                    $this->tpl->parseCurrentBlock();
 
 3390                    $this->tpl->setCurrentBlock(
"print_block");
 
 3391                    $this->tpl->parseCurrentBlock();
 
 3395                if ($node[
"type"] == 
"pg") {
 
 3396                    if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
 
 3397                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 3403                    $this->tpl->setCurrentBlock(
"print_item");
 
 3406                    $page_id = $node[
"obj_id"];
 
 3408                    $page_object = $page_object_gui->getPageObject();
 
 3409                    include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
 
 3411                        $this->lm->getStyleSheetId(),
 
 3418                    $lm_pg_obj->setLMId($this->lm->getId());
 
 3421                    $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
 
 3422                    $page_object_gui->setOutputMode(
"print");
 
 3423                    $page_object_gui->setPresentationTitle(
"");
 
 3425                    if ($this->lm->getPageHeader() == 
IL_PAGE_TITLE || $node[
"free"] === 
true) {
 
 3427                            $lm_pg_obj->getId(),
 
 3428                            $this->lm->getPageHeader(),
 
 3429                            $this->lm->isActiveNumbering(),
 
 3430                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3438                        if ($this->lm->isActiveNumbering()) {
 
 3439                            $chapter_title = trim(substr(
 
 3441                                strpos($chapter_title, 
" ")
 
 3445                        if ($page_title != $chapter_title) {
 
 3446                            $page_object_gui->setPresentationTitle($page_title);
 
 3451                    $hcont = $header_page_content;
 
 3452                    $fcont = $footer_page_content;
 
 3455                        if ($did_chap_page_header) {
 
 3458                        if ($nodes[$node_key + 1][
"type"] == 
"pg" &&
 
 3459                            !($nodes[$node_key + 1][
"depth"] <= $act_level
 
 3460                             && !in_array($nodes[$node_key + 1][
"obj_id"], 
$_POST[
"obj_id"]))) {
 
 3465                    $page_object_gui->setFileDownloadLink(
"#");
 
 3466                    $page_object_gui->setFullscreenLink(
"#");
 
 3467                    $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 3468                    $page_content = $page_object_gui->showPage();
 
 3470                        $this->tpl->setVariable(
 
 3472                            $hcont . $page_content . $fcont
 
 3475                        $this->tpl->setVariable(
 
 3477                            $hcont . $page_content . $fcont . 
"<br />" 
 3480                    $chapter_title = 
"";
 
 3481                    $this->tpl->parseCurrentBlock();
 
 3482                    $this->tpl->setCurrentBlock(
"print_block");
 
 3483                    $this->tpl->parseCurrentBlock();
 
 3490                    foreach ($int_links as 
$key => $link) {
 
 3491                        if ($link[
"type"] == 
"git" &&
 
 3492                            ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0)) {
 
 3493                            $glossary_links[
$key] = $link;
 
 3495                        if ($link[
"type"] == 
"mob" &&
 
 3496                            ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0)) {
 
 3498                            $mob_links[
$key] = $link;
 
 3508                        $page_object->buildDom();
 
 3509                        $links = $page_object->getInternalLinks();
 
 3510                        foreach (
$links as $link) {
 
 3511                            if ($link[
"Type"] == 
"MediaObject" 
 3512                                && $link[
"TargetFrame"] != 
"" 
 3513                                && $link[
"TargetFrame"] != 
"None") {
 
 3514                                $media_links[] = $link;
 
 3526        if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix()) {
 
 3527            include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
 
 3528            include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
 
 3533            foreach ($glossary_links as 
$key => $link) {
 
 3535                $terms[$term . 
":" . 
$key] = array(
"key" => 
$key, 
"link" => $link, 
"term" => $term);
 
 3540            foreach ($terms as 
$t) {
 
 3547                foreach ($defs as 
$def) {
 
 3549                    if (count($defs) > 1) {
 
 3550                        $this->tpl->setCurrentBlock(
"def_title");
 
 3551                        $this->tpl->setVariable(
 
 3553                            $this->lng->txt(
"cont_definition") . 
" " . ($def_cnt++)
 
 3555                        $this->tpl->parseCurrentBlock();
 
 3557                    include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
 
 3559                    $page_gui->setTemplateOutput(
false);
 
 3560                    $page_gui->setOutputMode(
"print");
 
 3562                    $this->tpl->setCurrentBlock(
"definition");
 
 3563                    $page_gui->setFileDownloadLink(
"#");
 
 3564                    $page_gui->setFullscreenLink(
"#");
 
 3565                    $page_gui->setSourceCodeDownloadScript(
"#");
 
 3566                    $output = $page_gui->showPage();
 
 3567                    $this->tpl->setVariable(
"VAL_DEFINITION", 
$output);
 
 3568                    $this->tpl->parseCurrentBlock();
 
 3572                $this->tpl->setCurrentBlock(
"term");
 
 3573                $this->tpl->setVariable(
 
 3577                $this->tpl->parseCurrentBlock();
 
 3582            $this->tpl->setCurrentBlock(
"glossary");
 
 3583            $annex_title = $this->lng->txt(
"cont_annex") . 
" " .
 
 3584                chr(64+$annex_cnt) . 
": " . $this->lng->txt(
"glo");
 
 3585            $this->tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
 
 3586            $this->tpl->parseCurrentBlock();
 
 3588            $annexes[] = $annex_title;
 
 3592        if (count($media_links) > 0) {
 
 3593            include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
 3594            include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
 
 3596            foreach ($media_links as $media) {
 
 3597                if (substr($media[
"Target"], 0, 4) == 
"il__") {
 
 3598                    $arr = explode(
"_", $media[
"Target"]);
 
 3599                    $id = $arr[count($arr) - 1];
 
 3602                    $med_item = $med_obj->getMediaItem(
"Standard");
 
 3603                    if (is_object($med_item)) {
 
 3604                        if (is_int(strpos($med_item->getFormat(), 
"image"))) {
 
 3605                            $this->tpl->setCurrentBlock(
"ref_image");
 
 3608                            if ($med_item->getLocationType() == 
"LocalFile") {
 
 3609                                $this->tpl->setVariable(
 
 3612                                    "/" . $med_item->getLocation()
 
 3615                                $this->tpl->setVariable(
 
 3617                                    $med_item->getLocation()
 
 3621                            if ($med_item->getCaption() != 
"") {
 
 3622                                $this->tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
 
 3624                                $this->tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
 
 3626                            $this->tpl->parseCurrentBlock();
 
 3634            $this->tpl->setCurrentBlock(
"ref_images");
 
 3635            $annex_title = $this->lng->txt(
"cont_annex") . 
" " .
 
 3636                chr(64+$annex_cnt) . 
": " . $this->lng->txt(
"cont_ref_images");
 
 3637            $this->tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
 
 3638            $this->tpl->parseCurrentBlock();
 
 3640            $annexes[] = $annex_title;
 
 3644        if ($output_header) {
 
 3645            $this->tpl->setCurrentBlock(
"print_header");
 
 3647            if ($this->lm->getDescription() != 
"none") {
 
 3648                include_once(
"Services/MetaData/classes/class.ilMD.php");
 
 3649                $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 3650                $md_gen = $md->getGeneral();
 
 3651                foreach ($md_gen->getDescriptionIds() as 
$id) {
 
 3652                    $md_des = $md_gen->getDescription(
$id);
 
 3656                $this->tpl->setVariable(
 
 3661            $this->tpl->parseCurrentBlock();
 
 3665            foreach ($nodes2 as $node2) {
 
 3666                if ($node2[
"type"] == 
"st" 
 3668                    for ($j=1; $j < $node2[
"depth"]; $j++) {
 
 3669                        $this->tpl->setCurrentBlock(
"indent");
 
 3671                        $this->tpl->parseCurrentBlock();
 
 3673                    $this->tpl->setCurrentBlock(
"toc_entry");
 
 3674                    $this->tpl->setVariable(
 
 3679                            $this->lm->isActiveNumbering(),
 
 3680                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 3686                    $this->tpl->parseCurrentBlock();
 
 3691            foreach ($annexes as $annex) {
 
 3692                $this->tpl->setCurrentBlock(
"indent");
 
 3694                $this->tpl->parseCurrentBlock();
 
 3695                $this->tpl->setCurrentBlock(
"toc_entry");
 
 3696                $this->tpl->setVariable(
"TXT_TOC_TITLE", $annex);
 
 3697                $this->tpl->parseCurrentBlock();
 
 3700            $this->tpl->setCurrentBlock(
"toc");
 
 3701            $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
 
 3702            $this->tpl->parseCurrentBlock();
 
 3704            $this->tpl->setCurrentBlock(
"print_start_block");
 
 3705            $this->tpl->parseCurrentBlock();
 
 3709        include_once 
'Services/MetaData/classes/class.ilMD.php';
 
 3710        $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 3711        if (is_object($lifecycle = $md->getLifecycle())) {
 
 3712            $sep = $author = 
"";
 
 3713            foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
 
 3714                $md_con = $lifecycle->getContribute($con_id);
 
 3715                if ($md_con->getRole() == 
"Author") {
 
 3716                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 3717                        $md_ent = $md_con->getEntity($ent_id);
 
 3718                        $author = $author . $sep . $md_ent->getEntity();
 
 3723            if ($author != 
"") {
 
 3724                $this->lng->loadLanguageModule(
"meta");
 
 3725                $this->tpl->setCurrentBlock(
"author");
 
 3726                $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
 
 3727                $this->tpl->setVariable(
"LM_AUTHOR", $author);
 
 3728                $this->tpl->parseCurrentBlock();
 
 3734        if (is_object($md_rights = $md->getRights())) {
 
 3735            $copyright = $md_rights->getDescription();
 
 3736            include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
 3739            if ($copyright != 
"") {
 
 3740                $this->lng->loadLanguageModule(
"meta");
 
 3741                $this->tpl->setCurrentBlock(
"copyright");
 
 3742                $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
 
 3743                $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
 
 3744                $this->tpl->parseCurrentBlock();
 
 3748        $this->tpl->show(
false);
 
 3757        $page_gui->downloadFile();
 
 3766        require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 3768        $pg_obj->send_paragraph(
$_GET[
"par_id"], 
$_GET[
"downloadtitle"]);
 
 3776        if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
 
 3781        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 3783            $this->tpl->setVariable(
 
 3784                "LOCATION_CONTENT_STYLESHEET",
 
 3788            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 3790        $this->tpl->parseCurrentBlock();
 
 3794        $this->tpl->getStandardTemplate();
 
 3796        $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu(
 
 3797            $this->offlineMode(),
 
 3798            $this->getExportFormat(),
 
 3804            $this->export_all_languages
 
 3809        $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.lm_download_list.html", 
"Modules/LearningModule");
 
 3822        include_once 
'Services/MetaData/classes/class.ilMD.php';
 
 3823        $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 3824        if (is_object($md_rights = $md->getRights())) {
 
 3825            $copyright = $md_rights->getDescription();
 
 3827            include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
 3830            if ($copyright != 
"") {
 
 3831                $this->lng->loadLanguageModule(
"meta");
 
 3832                $this->tpl->setCurrentBlock(
"copyright");
 
 3833                $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
 
 3834                $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
 
 3835                $this->tpl->parseCurrentBlock();
 
 3840        include_once(
"./Modules/LearningModule/classes/class.ilLMDownloadTableGUI.php");
 
 3842        $this->tpl->setVariable(
"DOWNLOAD_TABLE", $download_table->getHTML());
 
 3852        if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
 
 3856        $base_type = explode(
"_", 
$_GET[
"type"]);
 
 3857        $base_type = $base_type[0];
 
 3858        $file = $this->lm->getPublicExportFile($base_type);
 
 3859        if ($this->lm->getPublicExportFile($base_type) != 
"") {
 
 3860            $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
 
 3861            if (is_file($dir . 
"/" . 
$file)) {
 
 3879        return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $a_ref_id . 
"&obj_id=" . $a_obj_id . 
"&focus_id=" .
 
 3880            $a_obj_id . 
"&focus_return=" . $a_return_ref_id;
 
 3893        $a_back_link = 
"append",
 
 3905        $back_pg = 
$_GET[
"back_pg"];
 
 3906        if ($a_obj_id != 
"" && !$this->lm_tree->isInTree($a_obj_id) && $cur_page_id != 
"" &&
 
 3907            $a_back_link == 
"append") {
 
 3908            if ($back_pg != 
"") {
 
 3909                $back_pg = $cur_page_id . 
":" . $back_pg;
 
 3911                $back_pg = $cur_page_id;
 
 3914            if ($a_back_link == 
"reduce") {
 
 3915                $limpos = strpos(
$_GET[
"back_pg"], 
":");
 
 3918                    $back_pg = substr($back_pg, strpos($back_pg, 
":") + 1);
 
 3922            } elseif ($a_back_link != 
"keep") {
 
 3929            if (
$_GET[
"from_page"] == 
"") {
 
 3931                if (!in_array($a_frame, array(
"", 
"_blank"))) {
 
 3932                    $this->ctrl->setParameter($this, 
"from_page", $cur_page_id);
 
 3937                if (!in_array($a_frame, array(
"", 
"_blank"))) {
 
 3938                    $this->ctrl->setParameter($this, 
"from_page", 
$_GET[
"from_page"]);
 
 3942            if ($a_anchor !=  
"") {
 
 3943                $this->ctrl->setParameter($this, 
"anchor", rawurlencode($a_anchor));
 
 3945            if ($a_srcstring != 
"") {
 
 3946                $this->ctrl->setParameter($this, 
"srcstring", $a_srcstring);
 
 3950                    $link = $this->ctrl->getLinkTarget($this, 
"fullscreen", 
"", 
false, 
false);
 
 3955                    if ($back_pg != 
"") {
 
 3956                        $this->ctrl->setParameter($this, 
"back_pg", $back_pg);
 
 3958                    if ($a_frame != 
"") {
 
 3959                        $this->ctrl->setParameter($this, 
"frame", $a_frame);
 
 3961                    if ($a_obj_id != 
"") {
 
 3964                                $this->ctrl->setParameter($this, 
"mob_id", $a_obj_id);
 
 3968                                $this->ctrl->setParameter($this, 
"obj_id", $a_obj_id);
 
 3969                                $link.= 
"&obj_id=" . $a_obj_id;
 
 3974                        $this->ctrl->setParameter($this, 
"obj_type", 
$a_type);
 
 3976                    $link = $this->ctrl->getLinkTarget($this, $a_cmd, $a_anchor);
 
 3979                    $this->ctrl->setParameter($this, 
"frame", 
"");
 
 3980                    $this->ctrl->setParameter($this, 
"obj_id", 
"");
 
 3981                    $this->ctrl->setParameter($this, 
"mob_id", 
"");
 
 3986            if ($this->export_all_languages) {
 
 3987                if ($this->lang != 
"" && $this->lang != 
"-") {
 
 3993                case "downloadFile":
 
 3997                    $link = 
"fullscreen.html";          
 
 4002                    if ($a_obj_id == 
"") {
 
 4003                        $a_obj_id = $this->lm_tree->getRootId();
 
 4004                        $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id, 
"pg");
 
 4005                        $a_obj_id = $pg_node[
"obj_id"];
 
 4007                    if (
$a_type == 
"StructureObject") {
 
 4008                        $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id, 
"pg");
 
 4009                        $a_obj_id = $pg_node[
"obj_id"];
 
 4011                    if ($a_frame != 
"" && $a_frame != 
"_blank") {
 
 4012                        if ($a_frame != 
"toc") {
 
 4013                            $link = 
"frame_" . $a_obj_id . 
"_" . $a_frame . $lang_suffix . 
".html";
 
 4015                            $link = 
"frame_" . $a_frame . $lang_suffix . 
".html";
 
 4020                            $link = 
"lm_pg_" . $nid . $lang_suffix . 
".html";
 
 4022                            $link = 
"lm_pg_" . $a_obj_id . $lang_suffix . 
".html";
 
 4028                    $link = 
"term_" . $a_obj_id . 
".html";
 
 4032                    $link = 
"media_" . $a_obj_id . 
".html";
 
 4040        $this->ctrl->clearParameters($this);
 
 4054        $this->tpl->setCurrentBlock(
"ContentStyle");
 
 4056            $this->tpl->setVariable(
 
 4057                "LOCATION_CONTENT_STYLESHEET",
 
 4061            $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 
"content_style/content.css");
 
 4063        $this->tpl->parseCurrentBlock();
 
 4065        $tpl = 
new ilTemplate(
"tpl.page_message_screen.html", 
true, 
true, 
"Modules/LearningModule");
 
 4068        $this->tpl->setVariable(
"PAGE_CONTENT", 
$tpl->get());
 
 4102            $target = $this->ctrl->getLinkTarget($this, 
"");
 
 4104            return $this->ctrl->getLinkTarget($this, 
"");
 
 4119        $this->offline_directory = $offdir;
 
 4140        $directory = $this->
getOfflineDirectory() . 
"/codefiles/" . $page_id . 
"/" . $paragraph_id;
 
 4143        if (!($fp = @fopen(
$file, 
"w+"))) {
 
 4144            die(
"<b>Error</b>: Could not open \"" . 
$file . 
"\" for writing" .
 
 4145                " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
 4156        $this->tpl->fillWindowTitle();
 
 4157        $this->tpl->fillContentLanguage();
 
 4169        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 4170        include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
 
 4172            return new ilLMPageGUI($a_id, 0, 
false, $this->lang);
 
 4185        include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
 
 4187            return new ilLMPage($a_id, 0, $this->lang);
 
 4197        $exp = $this->
ilTOC(
true);
 
 4199        echo $exp->getHTML() .
 
 4200            "<script>" . $exp->getOnLoadCode() . 
"</script>";
 
sprintf('%.4f', $callTime)
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)
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(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(! $oauthconfig->getBoolean('getUserInfo.enable', FALSE)) $store
xpath_eval($xpath_context, $eval_str, $contextnode=null)
domxml_open_mem($str, $mode=0, &$error=null)
xpath_new_context($dom_document)
if(function_exists( 'posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
foreach($_POST as $key=> $value) $res