191        $a_export_format = 
"",
 
  192        $a_all_languages = 
false,
 
  194        bool $claim_repo_context = 
true,
 
  195        $query_params = 
null,
 
  201        $this->offline = ($a_export_format != 
"");
 
  202        $this->export_all_languages = $a_all_languages;
 
  203        $this->export_format = $a_export_format;        
 
  204        $this->offline_directory = $a_export_dir;
 
  206        $this->tabs = 
$DIC->tabs();
 
  207        $this->toolbar = 
$DIC->toolbar();
 
  208        $this->
user = $DIC->user();
 
  209        $this->rbacsystem = 
$DIC->rbac()->system();
 
  210        $this->
error = $DIC[
"ilErr"];
 
  211        $this->nav_history = 
$DIC[
"ilNavigationHistory"];
 
  212        $this->access = 
$DIC->access();
 
  214        $this->locator = 
$DIC[
"ilLocator"];
 
  215        $this->tree = 
$DIC->repositoryTree();
 
  216        $this->
help = $DIC[
"ilHelp"];
 
  220        $ilCtrl = 
$DIC->ctrl();
 
  224        $lng->loadLanguageModule(
"content");
 
  227        $this->
ui = $DIC->ui();
 
  228        $this->tpl = 
$DIC->ui()->mainTemplate();
 
  229        $this->frames = array();
 
  230        $this->ctrl = $ilCtrl;
 
  231        $this->ctrl->saveParameter($this, array(
"ref_id", 
"transl", 
"focus_id", 
"focus_return"));
 
  235        if (!is_array($query_params)) {
 
  236            $query_params = 
$_GET;
 
  241        if (!
$rbacsystem->checkAccess(
"write", $this->requested_ref_id)) {
 
  242            if ($this->lm->getOfflineStatus()) {
 
  247        if ($claim_repo_context) {
 
  248            $DIC->globalScreen()->tool()->context()->claim()->repository();
 
  251        if (!$ilCtrl->isAsynch()) {
 
  254                if ($this->service->getPresentationStatus()->isTocNecessary()) {
 
  262            $ilCtrl->setParameter($this, 
"embed_mode", 1);
 
  265                "ref_id" => $this->lm->getRefId(),
 
  286            $this->export_all_languages,
 
  287            $this->export_format,
 
  292        $request = $this->service->getRequest();
 
  294        $this->requested_obj_type = $request->getRequestedObjType();
 
  295        $this->requested_ref_id = $request->getRequestedRefId();
 
  296        $this->requested_transl = $request->getRequestedTranslation();      
 
  297        $this->requested_obj_id = $request->getRequestedObjId();            
 
  298        $this->requested_back_pg = $request->getRequestedBackPage();
 
  299        $this->requested_frame = $request->getRequestedFrame();
 
  300        $this->requested_search_string = $request->getRequestedSearchString();
 
  301        $this->requested_focus_return = $request->getRequestedFocusReturn();
 
  302        $this->requested_mob_id = $request->getRequestedMobId();
 
  304        $this->lm_set = $this->service->getSettings();
 
  305        $this->lm_gui = $this->service->getLearningModuleGUI();
 
  306        $this->lm = $this->service->getLearningModule();
 
  307        $this->tracker = $this->service->getTracker();
 
  308        $this->linker = $this->service->getLinker();
 
  310        if ($request->getRequestedEmbedMode()) {
 
  311            $this->embed_mode = 
true;
 
  315        $this->lang = $this->service->getPresentationStatus()->getLang();
 
  316        $this->lm_tree = $this->service->getLMTree();
 
  317        $this->focus_id = $this->service->getPresentationStatus()->getFocusId();
 
  347        return $this->service->getTracker();
 
  365        if (!$ilAccess->checkAccess(
"read", 
"", $this->requested_ref_id) &&
 
  366            (!(($this->ctrl->getCmd() == 
"infoScreen" || $this->ctrl->getNextClass() == 
"ilinfoscreengui")
 
  367            && $ilAccess->checkAccess(
"visible", 
"", $this->requested_ref_id)))) {
 
  371        $next_class = $this->ctrl->getNextClass($this);
 
  372        $cmd = $this->ctrl->getCmd(
"layout", array(
"showPrintView"));
 
  376        $this->ctrl->setParameter($this, 
"obj_id", $this->requested_obj_id);
 
  377        $ilNavigationHistory->addItem($this->requested_ref_id, $this->ctrl->getLinkTarget($this), 
"lm");
 
  378        $this->ctrl->setParameter($this, 
"obj_id", $obj_id);
 
  380        switch ($next_class) {
 
  385            case "ilinfoscreengui":
 
  389            case "ilcommonactiondispatchergui":
 
  391                $gui->enableCommentsSettings(
false);
 
  392                $this->ctrl->forwardCommand($gui);
 
  396                $page_gui = $this->
getLMPageGUI($this->requested_obj_id);
 
  398                $ret = $ilCtrl->forwardCommand($page_gui);
 
  401            case "ilassgenfeedbackpagegui":
 
  404                $ret = $ilCtrl->forwardCommand($page_gui);
 
  407            case "ilglossarydefpagegui":
 
  410                $ret = $ilCtrl->forwardCommand($page_gui);
 
  413            case "illearningprogressgui":
 
  417                    $this->requested_ref_id,
 
  420                $this->ctrl->forwardCommand($new_gui);
 
  425                $rating_gui->setObject($this->lm->getId(), 
"lm", $this->requested_obj_id, 
"lm");
 
  426                $this->ctrl->forwardCommand($rating_gui);
 
  431                    switch (
$_GET[
"ntf"]) {
 
  448                    $ilCtrl->redirect($this, 
"layout");
 
  450                $ret = $this->$cmd();
 
  473        return $this->export_format;
 
  486        if (!is_array($a_attributes)) {
 
  489        foreach ($a_attributes as $attribute) {
 
  490            $attr[$attribute->name()] = $attribute->value();
 
  500        return $this->frames;
 
  520    public function layout($a_xml = 
"main.xml", $doShow = 
true)
 
  531        $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/" . $layout . 
"/" . $a_xml);
 
  535                $layout . 
"/" . $a_xml . 
".");
 
  537        $this->layout_doc = $doc;
 
  542        $path = (empty($this->requested_frame) || ($this->requested_frame == 
"_blank"))
 
  543            ? 
"/ilLayout/ilFrame[1]" 
  544            : 
"//ilFrame[@name='" . $this->requested_frame . 
"']";
 
  547        if (count($found) != 1) {
 
  549                " path " . $path . 
" in " . $layout . 
"/" . $a_xml . 
". LM Layout is " . $this->lm->getLayout());
 
  557        $this->frames = array();
 
  560        if ((empty(
$attributes[
"template"]) || !empty($this->requested_obj_type))
 
  561                && ($this->requested_frame != 
"_blank" || $this->requested_obj_type != 
"MediaObject")) {
 
  567            if (empty($this->requested_obj_type)) {
 
  568                $obj_type = 
"PageObject";
 
  574            $childs = $node->child_nodes();
 
  576            foreach ($childs as $child) {
 
  577                if ($child->node_name() == $obj_type) {
 
  587                        $this->requested_frame . 
"' and object type '" . $obj_type . 
"'.");
 
  592        $in_module = (
$attributes[
"template_location"] == 
"module")
 
  609            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
  610            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
  617        $childs = $node->child_nodes();
 
  619        foreach ($childs as $child) {
 
  620            $child_attr = $this->
attrib2arr($child->attributes());
 
  622            switch ($child->node_name()) {
 
  640                        $additional = $this->
ui->renderer() ->render($this->additional_content);
 
  648                    case "ilLMNavigation":
 
  663                            $child_attr[
"inline"],
 
  665                            $child_attr[
"location"]
 
  715            $tpl->printToStdout();
 
  721            $content = 
$tpl->printToString();
 
  740            $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
 
  742            $this->tpl->addOnLoadCode($close_call);
 
  747            if ($this->requested_frame == 
"") {
 
  749                $last_frame_url = 
$store->get(
"cf_" . $this->lm->getId());
 
  750                if ($last_frame_url != 
"") {
 
  751                    $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('" . $last_frame_url . 
"', 'center_bottom');");
 
  755                    $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('" .
 
  756                        $this->ctrl->getLinkTarget($this, 
"saveFrameUrl", 
"", 
false, 
false) . 
"'); 
  757                            il.LearningModule.openInitFrames(); 
  760                $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('" .
 
  761                    $this->ctrl->getLinkTarget($this, 
"refreshToc", 
"", 
false, 
false) . 
"'); 
  767            $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
 
  781        if (
$_GET[
"url"] != 
"") {
 
  782            $store->set(
"cf_" . $this->lm->getId(), 
$_GET[
"url"]);
 
  784            $store->set(
"cf_" . $this->lm->getId(), 
$_GET[
"url"]);
 
  791        return $this->
media();
 
  800        $this->tpl = 
new ilGlobalTemplate(
"tpl.fullscreen.html", 
true, 
true, 
"Modules/LearningModule");
 
  809            $this->tpl->printToStdout();
 
  811            return $this->tpl->printToString();
 
  822        $this->tpl = 
new ilGlobalTemplate(
"tpl.glossary_term_output.html", 
true, 
true, 
"Modules/LearningModule");
 
  838            $this->tpl->printToStdout();
 
  840            return $this->tpl->printToString();
 
  858        $this->tpl = 
new ilGlobalTemplate(
"tpl.page_fullscreen.html", 
true, 
true, 
"Modules/LearningModule");
 
  868            $style_name = 
$ilUser->getPref(
"style") . 
".css";
 
  870            $this->tpl->setVariable(
"LOCATION_STYLESHEET", 
"./style/" . $style_name);
 
  875            $this->tpl->printToStdout();
 
  877            return $this->tpl->get();
 
  889        $ltiview = 
$DIC[
"lti"];
 
  890        if ($ltiview->isActive()) {
 
  891            $ilMainMenu = 
new LTI\ilMainMenuGUI(
"_top", 
false, $this->tpl);
 
  897            $this->tpl->touchBlock(
"pg_intro");
 
  898            $this->tpl->touchBlock(
"pg_outro");
 
  904            $ilMainMenu->setLoginTargetPar(
"pg_" . $page_id . 
"_" . $this->lm->getRefId());
 
  909        $this->tpl->touchBlock(
"pg_intro");
 
  910        $this->tpl->touchBlock(
"pg_outro");
 
  911        $this->tpl->setBodyClass(
"std");
 
  912        $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
 
  914        $this->tpl->setVariable(
"MAINMENU_SPACER", $ilMainMenu->getSpacerClass());
 
  920    public function ilTOC($a_get_explorer = 
false)
 
  923        $exp = $fac->getExplorer($this->service, 
"ilTOC");
 
  924        $exp->handleCommand();
 
  936        return $this->service->getPresentationStatus()->getLMPresentationTitle();
 
  966        if ($this->
abstract) {
 
  970        $showViewInFrameset = 
true;
 
  972        if ($showViewInFrameset) {
 
  975            $buttonTarget = 
"_top";
 
  979        $tpl_menu = 
new ilTemplate(
"tpl.lm_sub_menu.html", 
true, 
true, 
"Modules/LearningModule");
 
  988            if (
$rbacsystem->checkAccess(
"write", $this->requested_ref_id)) {
 
  989                $tpl_menu->setCurrentBlock(
"edit_page");
 
  991                $tpl_menu->setVariable(
"EDIT_LINK", ILIAS_HTTP_PATH . 
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
 
  992                    "&obj_id=" . $page_id . 
"&to_page=1");
 
  993                $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
 
  994                $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
 
  995                $tpl_menu->parseCurrentBlock();
 
 1001            $this->tpl->setPermanentLink(
"pg", 
"", $page_id . 
"_" . $this->lm->getRefId());
 
 1004        $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
 
 1030        if ($this->offline) {
 
 1037        $lm_id = $this->lm->getId();
 
 1040        $this->lng->loadLanguageModule(
"content");
 
 1045            $this->lm->getType(),
 
 1046            $this->lm->getRefId(),
 
 1051        $this->ctrl->setParameter($this, 
"embed_mode", $this->embed_mode);
 
 1052        $this->ctrl->setParameterByClass(
"ilnotegui", 
"embed_mode", $this->embed_mode);
 
 1053        $this->ctrl->setParameterByClass(
"iltagginggui", 
"embed_mode", $this->embed_mode);
 
 1054        ilObjectListGUI::prepareJSLinks(
 
 1055            $this->ctrl->getLinkTarget($this, 
"redrawHeaderAction", 
"", 
true),
 
 1056            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"ilnotegui"), 
"", 
"", 
true, 
false),
 
 1057            $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui", 
"iltagginggui"), 
"", 
"", 
true, 
false),
 
 1061        $lg = $dispatcher->initHeaderAction();
 
 1063            $lg->enableNotes(
true);
 
 1064            if (!$this->embed_mode) {
 
 1065                $lg->enableComments($this->lm->publicNotes(), 
false);
 
 1069        if ($this->lm->hasRating() && !$this->offlineMode()) {
 
 1072                $this->lng->txt(
"lm_rating"),
 
 1074                array(
"ilcommonactiondispatchergui", 
"ilratinggui")
 
 1081                $this->ctrl->setParameter($this, 
"ntf", 1);
 
 1083                    $lg->addCustomCommand($this->ctrl->getLinkTarget($this), 
"cont_notification_deactivate_lm");
 
 1089                    $this->lng->txt(
"cont_notification_activated")
 
 1092                $this->ctrl->setParameter($this, 
"ntf", 2);
 
 1093                $lg->addCustomCommand($this->ctrl->getLinkTarget($this), 
"cont_notification_activate_lm");
 
 1096                    $this->ctrl->setParameter($this, 
"ntf", 3);
 
 1097                    $lg->addCustomCommand($this->ctrl->getLinkTarget($this), 
"cont_notification_deactivate_page");
 
 1102                        $this->lng->txt(
"cont_page_notification_activated")
 
 1105                    $this->ctrl->setParameter($this, 
"ntf", 4);
 
 1106                    $lg->addCustomCommand($this->ctrl->getLinkTarget($this), 
"cont_notification_activate_page");
 
 1111                        $this->lng->txt(
"cont_notification_deactivated")
 
 1115            $this->ctrl->setParameter($this, 
"ntf", 
"");
 
 1118        if (!$this->offline) {
 
 1119            if ($ilAccess->checkAccess(
"write", 
"", $this->requested_ref_id)) {
 
 1121                    $link = $this->ctrl->getLinkTargetByClass([
"ilLMEditorGUI", 
"ilobjlearningmodulegui"], 
"chapters");
 
 1123                    $link = ILIAS_HTTP_PATH . 
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
 
 1126                $lg->addCustomCommand($link, 
"edit_page");
 
 1132            return $lg->getHeaderAction($this->tpl);
 
 1135            return $lg->getHeaderAction() .
 
 1136                $tpl->getOnLoadCodeForAsynch();
 
 1158        if (!$this->lm->publicNotes()) {
 
 1162        $next_class = $this->ctrl->getNextClass($this);
 
 1169        $notes_gui = 
new ilNoteGUI($this->lm->getId(), $this->getCurrentPageId(), 
"pg");
 
 1171        if ($ilAccess->checkAccess(
"write", 
"", $this->requested_ref_id) &&
 
 1173            $notes_gui->enablePublicNotesDeletion(
true);
 
 1176        $this->ctrl->setParameter($this, 
"frame", $this->requested_frame);
 
 1177        $this->ctrl->setParameter($this, 
"obj_id", $this->requested_obj_id);
 
 1179        $notes_gui->enablePrivateNotes();
 
 1180        if ($this->lm->publicNotes()) {
 
 1181            $notes_gui->enablePublicNotes();
 
 1184        $callback = array($this, 
"observeNoteAction");
 
 1185        $notes_gui->addObserver($callback);
 
 1187        if ($next_class == 
"ilnotegui") {
 
 1188            $html = $this->ctrl->forwardCommand($notes_gui);
 
 1190            $html = $notes_gui->getNotesHTML();
 
 1202        $ltiview = 
$DIC[
"lti"];
 
 1207        if (empty($this->requested_obj_id)) {
 
 1208            $a_id = $this->lm_tree->getRootId();
 
 1214        if (!$this->lm->cleanFrames()) {
 
 1222            $frame_target = 
"_top";
 
 1227            if ($ltiview->isActive()) {
 
 1228                $ilLocator->addRepositoryItems();
 
 1230                $ilLocator->addRepositoryItems();
 
 1243            $ilLocator->setOffline(
true);
 
 1246        if ($this->lm_tree->isInTree($a_id)) {
 
 1247            $path = $this->lm_tree->getPathFull($a_id);
 
 1249            foreach ($path as $key => $row) {
 
 1250                if ($row[
"type"] != 
"pg") {
 
 1251                    if ($row[
"child"] != $this->lm_tree->getRootId()) {
 
 1252                        $ilLocator->addItem(
 
 1256                                    ilLMOBject::CHAPTER_TITLE,
 
 1257                                    $this->lm->isActiveNumbering(),
 
 1258                                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 1266                            $this->linker->getLink(
"layout", $row[
"child"], $frame_param, 
"StructureObject"),
 
 1270                        $ilLocator->addItem(
 
 1272                            $this->linker->getLink(
"layout", 
"", $frame_param),
 
 1274                            $this->requested_ref_id
 
 1280            $ilLocator->addItem(
 
 1282                $this->linker->getLink(
"layout", 
"", $this->requested_frame)
 
 1287            $ilLocator->addItem(
 
 1288                $lm_obj->getTitle(),
 
 1289                $this->linker->getLink(
"layout", $a_id, $frame_param),
 
 1295            $debug = 
"DEBUG: <font color=\"red\">" . $this->type . 
"::" . $this->
id . 
"::" . 
$_GET[
"cmd"] . 
"</font><br/>";
 
 1301        $this->tpl->setLocator();
 
 1311        return $this->service->getNavigationStatus()->getCurrentPage();
 
 1315        if (!$this->
offlineMode() && $this->current_page_id !== 
false) {
 
 1319        $this->chapter_has_no_active_page = 
false;
 
 1320        $this->deactivated_page = 
false;
 
 1323        if (empty($this->requested_obj_id)) {
 
 1324            $obj_id = $this->lm_tree->getRootId();
 
 1329                $this->lm->getType(),
 
 1330                $this->lm_set->get(
"time_scheduled_page_activation")
 
 1335                $this->deactivated_page = 
true;
 
 1340        if (!$this->lm_tree->isInTree($obj_id)) {
 
 1344        $curr_node = $this->lm_tree->getNodeData($obj_id);
 
 1348            $this->lm->getType(),
 
 1349            $this->lm_set->get(
"time_scheduled_page_activation")
 
 1352        if ($curr_node[
"type"] == 
"pg" &&
 
 1354            $page_id = $curr_node[
"obj_id"];
 
 1359            while ($succ_node && !$active) {
 
 1360                $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
"pg");
 
 1361                $page_id = $succ_node[
"obj_id"];
 
 1364                    $this->lm->getType(),
 
 1365                    $this->lm_set->get(
"time_scheduled_page_activation")
 
 1369            if ($succ_node[
"type"] != 
"pg") {
 
 1370                $this->chapter_has_no_active_page = 
true;
 
 1376               $this->lm_gui->object->getPublicAccessMode() == 
'selected') {
 
 1379                while ($public === 
false && $page_id > 0) {
 
 1380                    $succ_node = $this->lm_tree->fetchSuccessorNode($page_id, 
'pg');
 
 1381                    $page_id = $succ_node[
'obj_id'];
 
 1387            if ($this->lm_tree->isInTree($page_id)) {
 
 1388                $path = $this->lm_tree->getPathId($page_id);
 
 1389                if (!in_array($this->requested_obj_id, $path)) {
 
 1390                    $this->chapter_has_no_active_page = 
true;
 
 1395        $this->current_page_id = $page_id;
 
 1402        if (!is_object($this->layout_doc)) {
 
 1408        $path = 
"/ilLayout/ilLinkTargets/LinkTarget";
 
 1411        for (
$i = 0; 
$i < count(
$res->nodeset); 
$i++) {
 
 1413            $frame = 
$res->nodeset[
$i]->get_attribute(
"Frame");
 
 1414            $onclick = 
$res->nodeset[
$i]->get_attribute(
"OnClick");
 
 1415            $targets[
$type] = array(
"Type" => 
$type, 
"Frame" => $frame, 
"OnClick" => $onclick);
 
 1480        $this->fill_on_load_code = 
true;
 
 1483        $tpl = 
new ilTemplate(
"tpl.lm_content.html", 
true, 
true, 
"Modules/LearningModule/Presentation");
 
 1493            $this->requested_obj_id,
 
 1494            $this->requested_back_pg,
 
 1495            $this->requested_frame
 
 1500            $tpl->setVariable(
"TOP_NAVIGATION", $navigation_renderer->renderTop());
 
 1501            $tpl->setVariable(
"BOTTOM_NAVIGATION", $navigation_renderer->renderBottom());
 
 1523            $this->requested_obj_id
 
 1526        return $content_renderer->render();
 
 1538        if ($this->lm->hasRatingPages() && !$this->offlineMode()) {
 
 1540            $rating_gui->setObject($this->lm->getId(), 
"lm", $this->getCurrentPageId(), 
"lm");
 
 1541            $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
 
 1549            $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('" .
 
 1550                $this->ctrl->getLinkTarget($this, 
"updatePageRating", 
"", 
true, 
false) .
 
 1552            $this->ctrl->setParameter($this, 
"pgid", 
"");
 
 1554            $rating = 
'<div id="ilrtrpg" style="text-align:right">' .
 
 1555                $rating_gui->getHtml(
true, 
true, 
"il.LearningModule.saveRating(%rating%);") .
 
 1567        $pg_id = 
$_GET[
"pgid"];
 
 1568        if (!$this->ctrl->isAsynch() || !$pg_id) {
 
 1572        $rating = (int) 
$_POST[
"rating"];
 
 1593        $rating->setObject($this->lm->getId(), 
"lm", $pg_id, 
"lm", 
$ilUser->getId());
 
 1594        $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
 
 1596        echo $rating->getHtml(
true, 
true, 
"il.LearningModule.saveRating(%rating%);");
 
 1598        echo $this->tpl->getOnLoadCodeForAsynch();
 
 1611            $this->lm->getStyleSheetId(),
 
 1616            $this->fill_on_load_code = 
true;
 
 1620            $this->fill_on_load_code = 
false;
 
 1627            "sourcecodeDownload",
 
 1628            $this->getCurrentPageId()
 
 1631            $this->ctrl->setParameter($this, 
"obj_id", $this->requested_obj_id);
 
 1650        $term_gui->setPageLinker($this->linker);
 
 1654            $ilCtrl->setParameter($this, 
"pg_type", 
"glo");
 
 1656        $term_gui->output($this->
offlineMode(), $this->tpl);
 
 1660            $ilCtrl->setParameter($this, 
"pg_type", 
"");
 
 1673        $this->tpl->setCurrentBlock(
"ilMedia");
 
 1675        $link_xml = $this->linker->getLinkXML($med_links);
 
 1678        if (!empty(
$_GET[
"pg_id"])) {
 
 1680            $pg_obj->buildDom();
 
 1685            $xml .= $pg_obj->getMediaAliasElement($this->requested_mob_id);
 
 1700        $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
 
 1701        $args = array( 
'/_xml' => 
$xml, 
'/_xsl' => $xsl );
 
 1710        $mode = (
$_GET[
"cmd"] == 
"fullscreen")
 
 1715            $this->linker->getLink(
"fullscreen");
 
 1716        $params = array(
'mode' => $mode, 
'enlarge_path' => $enlarge_path,
 
 1717            'link_params' => 
"ref_id=" . $this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
 
 1719            'ref_id' => $this->lm->getRefId(), 
'pg_frame' => $pg_frame, 
'webspace_path' => $wb_path);
 
 1720        $output = xslt_process($xh, 
"arg:/_xml", 
"arg:/_xsl", 
null, $args, $params);
 
 1726        $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
 
 1735    public function ilJavaScript($a_inline = 
"", $a_file = 
"", $a_location = 
"")
 
 1737        if ($a_inline != 
"") {
 
 1738            $js_tpl = 
new ilTemplate($a_inline, 
true, 
false, $a_location);
 
 1739            $js = $js_tpl->get();
 
 1740            $this->tpl->setVariable(
"INLINE_JS", $js);
 
 1756        if (empty($page_id)) {
 
 1764        if ($this->chapter_has_no_active_page &&
 
 1768            if ($this->deactivated_page) {
 
 1775            $succ_node = $this->lm_tree->fetchSuccessorNode($c_id, 
"pg");
 
 1776            $c_id = $succ_node[
"obj_id"];
 
 1780                $this->lm->getType(),
 
 1781                $this->lm_set->get(
"time_scheduled_page_activation")
 
 1784            if ($succ_node[
"obj_id"] > 0 &&
 
 1786                ($this->lm->getPublicAccessMode() == 
"selected" &&
 
 1789            } elseif ($succ_node[
"obj_id"] > 0 && !$active) {
 
 1792                if ($act_data[
"show_activation_info"] &&
 
 1793                    (
ilUtil::now() < $act_data[
"activation_start"])) {
 
 1804            return $succ_node[
"obj_id"];
 
 1812        $child_nodes = $a_node->child_nodes();
 
 1813        foreach ($child_nodes as $child) {
 
 1814            if ($child->node_name() == 
"ilFrame") {
 
 1817                if ((!empty(
$attributes[
"rows"])) || (!empty($attrubtes[
"cols"]))) {
 
 1824                            $this->linker->getLink(
 
 1826                                $this->requested_obj_id,
 
 1840                        $a_content .= $this->
buildTag(
"end", 
"frameset");
 
 1846                        $this->linker->getLink(
 
 1848                            $this->requested_obj_id,
 
 1860                        if (
$_GET[
"anchor"] != 
"") {
 
 1882        if (
$type == 
"end") {
 
 1888        if (is_array($attr)) {
 
 1889            foreach ($attr as $k => $v) {
 
 1890                $tag .= 
" " . $k . 
"=\"$v\"";
 
 1912        $this->ctrl->setCmd(
"showSummary");
 
 1913        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 1945        $this->tpl->loadStandardTemplate();
 
 1955        if ($ilAccess->checkAccess(
"read", 
"", $this->requested_ref_id)) {
 
 1958            $ilLocator->addRepositoryItems();
 
 1959            $this->tpl->setLocator();
 
 1972        $this->lng->loadLanguageModule(
"meta");
 
 1975        $info->enablePrivateNotes();
 
 1976        $info->enableLearningProgress();
 
 1978        $info->enableNews();
 
 1979        if ($ilAccess->checkAccess(
"write", 
"", $this->requested_ref_id)) {
 
 1981            $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
 1983            $info->enableNewsEditing();
 
 1985            if ($enable_internal_rss) {
 
 1986                $info->setBlockProperty(
"news", 
"settings", 
true);
 
 2008        $info->addMetaDataSections($this->lm->getId(), 0, $this->lm->getType());
 
 2011            $this->tpl->setContent($info->getHTML());
 
 2012            return $this->tpl->get();
 
 2015            $this->ctrl->forwardCommand($info);
 
 2017            $this->tpl->printToStdout();
 
 2029        if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
 
 2046        $tpl = 
new ilTemplate(
"tpl.lm_print_selection.html", 
true, 
true, 
"Modules/LearningModule");
 
 2065        $this->ctrl->setParameterByClass(
"illmpresentationgui", 
"obj_id", $this->requested_obj_id);
 
 2066        $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
 
 2068        $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
 
 2071        if (!is_array(
$_POST[
"item"])) {
 
 2072            if ($this->requested_obj_id != 
"") {
 
 2081        foreach ($nodes as $node) {
 
 2086                $this->lm->getType(),
 
 2087                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2090            if ($node[
"type"] == 
"pg" &&
 
 2095            $text = $img_scr = $img_alt = 
"";
 
 2099            switch ($node[
"type"]) {
 
 2105                            $this->lm->getPageHeader(),
 
 2106                            $this->lm->isActiveNumbering(),
 
 2107                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2114                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 2117                            $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 2121                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"pg");
 
 2128                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"obj_lm");
 
 2136                            ilLMOBject::CHAPTER_TITLE,
 
 2137                            $this->lm->isActiveNumbering(),
 
 2138                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2144                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 2147                            $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 2151                    $img_alt = 
$lng->txt(
"icon") . 
" " . 
$lng->txt(
"st");
 
 2156                $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 2159            $this->nl->addListNode(
 
 2172        if ($this->requested_obj_id > 0 && !$this->lm_tree->isInTree($this->requested_obj_id)) {
 
 2175                    $this->requested_obj_id,
 
 2176                    $this->lm->getPageHeader(),
 
 2177                    $this->lm->isActiveNumbering(),
 
 2178                    $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2185               $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 2188                    $text .= 
" (" . $this->lng->txt(
"cont_no_access") . 
")";
 
 2196            $this->nl->addListNode(
 
 2207        $f = $this->form->getHTML();
 
 2214        $tpl->setVariable(
"ITEM_SELECTION", 
$f);
 
 2217        $modal = $this->
ui->factory()->modal()->roundtrip(
 
 2218            $this->lng->txt(
"cont_print_view"),
 
 2219            $this->ui->factory()->legacy(
$tpl->get())
 
 2221        echo $this->
ui->renderer()->render($modal);
 
 2235            if ($this->lm->getRestrictForwardNavigation()) {
 
 2236                $nodes = array_filter($nodes, 
function ($node) use ($tracker) {
 
 2237                    return !$tracker->hasPredIncorrectAnswers($node[
"child"]);
 
 2254        $this->form->setForceTopButtons(
true);
 
 2258        $radg->setValue(
"page");
 
 2260        $radg->addOption($op1);
 
 2262        $radg->addOption($op2);
 
 2264        $radg->addOption($op3);
 
 2268        $op3->addSubItem($nl);
 
 2271        $this->form->addItem($radg);
 
 2273        $this->form->addCommandButton(
"showPrintView", 
$lng->txt(
"cont_show_print_view"));
 
 2274        $this->form->setOpenTag(
false);
 
 2275        $this->form->setCloseTag(
false);
 
 2277        $this->form->setTitle(
" ");
 
 2278        $this->form->setFormAction($ilCtrl->getFormAction($this));
 
 2289        $tabs = $this->tabs;
 
 2291        if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
 
 2297        $tabs->setBackTarget(
 
 2299            $ilCtrl->getLinkTarget($this, 
"layout")
 
 2304        if (
$_POST[
"sel_type"] == 
"page") {
 
 2305            if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id, 
$_POST[
"obj_id"])) {
 
 2306                $_POST[
"obj_id"][] = $c_obj_id;
 
 2309        if (
$_POST[
"sel_type"] == 
"chapter" && $c_obj_id > 0) {
 
 2310            $path = $this->lm_tree->getPathFull($c_obj_id);
 
 2311            $chap_id = $path[1][
"child"];
 
 2313                $_POST[
"obj_id"][] = $chap_id;
 
 2319        $tpl = 
new ilTemplate(
"tpl.lm_print_view.html", 
true, 
true, 
"Modules/LearningModule");
 
 2324        $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
 
 2329        $glossary_links = array();
 
 2330        $output_header = 
false;
 
 2331        $media_links = array();
 
 2334        if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
 
 2336                $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
 
 2338                    $this->lm->getStyleSheetId(),
 
 2344                $page_object_gui->setLinkFrame($this->requested_frame);
 
 2345                $page_object_gui->setOutputMode(
"print");
 
 2346                $page_object_gui->setPresentationTitle(
"");
 
 2347                $page_object_gui->setFileDownloadLink(
"#");
 
 2348                $page_object_gui->setFullscreenLink(
"#");
 
 2349                $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 2350                $footer_page_content = $page_object_gui->showPage();
 
 2353        if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
 
 2355                $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
 
 2357                    $this->lm->getStyleSheetId(),
 
 2363                $page_object_gui->setLinkFrame($this->requested_frame);
 
 2364                $page_object_gui->setOutputMode(
"print");
 
 2365                $page_object_gui->setPresentationTitle(
"");
 
 2366                $page_object_gui->setFileDownloadLink(
"#");
 
 2367                $page_object_gui->setFullscreenLink(
"#");
 
 2368                $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 2369                $header_page_content = $page_object_gui->showPage();
 
 2374        if (is_array(
$_POST[
"obj_id"])) {
 
 2375            foreach (
$_POST[
"obj_id"] as $k) {
 
 2376                if ($k > 0 && !$this->lm_tree->isInTree($k)) {
 
 2378                        $nodes[] = array(
"obj_id" => $k, 
"type" => 
"pg", 
"free" => 
true);
 
 2384            $ilCtrl->redirect($this, 
"showPrintViewSelection");
 
 2387        foreach ($nodes as $node_key => $node) {
 
 2391                $this->lm->getType(),
 
 2392                $this->lm_set->get(
"time_scheduled_page_activation")
 
 2394            if ($node[
"type"] == 
"pg" && !$active) {
 
 2400            if ($node[
"depth"] <= $act_level) {
 
 2401                if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"], 
$_POST[
"obj_id"])) {
 
 2402                    $act_level = $node[
"depth"];
 
 2409            if ($this->lm->getRestrictForwardNavigation()) {
 
 2410                if ($this->
getTracker()->hasPredIncorrectAnswers($node[
"obj_id"])) {
 
 2417                if ($node[
"type"] == 
"du") {
 
 2418                    $output_header = 
true;
 
 2422                if ($node[
"type"] == 
"st") {
 
 2424                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 2431                    $tpl->setCurrentBlock(
"print_chapter");
 
 2433                    $chapter_title = $chap->_getPresentationTitle(
 
 2435                        $this->lm->isActiveNumbering(),
 
 2436                        $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2445                    if ($this->lm->getPageHeader() == ilLMOBject::CHAPTER_TITLE) {
 
 2446                        if ($nodes[$node_key + 1][
"type"] == 
"pg") {
 
 2449                                $header_page_content
 
 2451                            $did_chap_page_header = 
true;
 
 2455                    $tpl->parseCurrentBlock();
 
 2456                    $tpl->setCurrentBlock(
"print_block");
 
 2457                    $tpl->parseCurrentBlock();
 
 2461                if ($node[
"type"] == 
"pg") {
 
 2463                       $this->lm_gui->object->getPublicAccessMode() == 
"selected") {
 
 2469                    $tpl->setCurrentBlock(
"print_item");
 
 2472                    $page_id = $node[
"obj_id"];
 
 2474                    $page_object = $page_object_gui->getPageObject();
 
 2476                        $this->lm->getStyleSheetId(),
 
 2483                    $lm_pg_obj->setLMId($this->lm->getId());
 
 2486                    $page_object_gui->setLinkFrame($this->requested_frame);
 
 2487                    $page_object_gui->setOutputMode(
"print");
 
 2488                    $page_object_gui->setPresentationTitle(
"");
 
 2492                            $lm_pg_obj->getId(),
 
 2493                            $this->lm->getPageHeader(),
 
 2494                            $this->lm->isActiveNumbering(),
 
 2495                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2503                        if ($this->lm->isActiveNumbering()) {
 
 2504                            $chapter_title = trim(substr(
 
 2506                                strpos($chapter_title, 
" ")
 
 2510                        if ($page_title != $chapter_title) {
 
 2511                            $page_object_gui->setPresentationTitle($page_title);
 
 2516                    $hcont = $header_page_content;
 
 2517                    $fcont = $footer_page_content;
 
 2519                    if ($this->lm->getPageHeader() == ilLMOBject::CHAPTER_TITLE) {
 
 2520                        if ($did_chap_page_header) {
 
 2523                        if ($nodes[$node_key + 1][
"type"] == 
"pg" &&
 
 2524                            !($nodes[$node_key + 1][
"depth"] <= $act_level
 
 2525                             && !in_array($nodes[$node_key + 1][
"obj_id"], 
$_POST[
"obj_id"]))) {
 
 2530                    $page_object_gui->setFileDownloadLink(
"#");
 
 2531                    $page_object_gui->setFullscreenLink(
"#");
 
 2532                    $page_object_gui->setSourceCodeDownloadScript(
"#");
 
 2533                    $page_content = $page_object_gui->showPage();
 
 2537                            $hcont . $page_content . $fcont
 
 2542                            $hcont . $page_content . $fcont . 
"<br />" 
 2545                    $chapter_title = 
"";
 
 2546                    $tpl->parseCurrentBlock();
 
 2547                    $tpl->setCurrentBlock(
"print_block");
 
 2548                    $tpl->parseCurrentBlock();
 
 2555                    foreach ($int_links as $key => $link) {
 
 2556                        if ($link[
"type"] == 
"git" &&
 
 2557                            ($link[
"inst"] == 
IL_INST_ID || $link[
"inst"] == 0)) {
 
 2558                            $glossary_links[$key] = $link;
 
 2560                        if ($link[
"type"] == 
"mob" &&
 
 2561                            ($link[
"inst"] == 
IL_INST_ID || $link[
"inst"] == 0)) {
 
 2563                            $mob_links[$key] = $link;
 
 2573                        $page_object->buildDom();
 
 2574                        $links = $page_object->getInternalLinks();
 
 2575                        foreach ($links as $link) {
 
 2576                            if ($link[
"Type"] == 
"MediaObject" 
 2577                                && $link[
"TargetFrame"] != 
"" 
 2578                                && $link[
"TargetFrame"] != 
"None") {
 
 2579                                $media_links[] = $link;
 
 2591        if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix()) {
 
 2595            foreach ($glossary_links as $key => $link) {
 
 2597                $terms[$term . 
":" . $key] = array(
"key" => $key, 
"link" => $link, 
"term" => $term);
 
 2602            foreach ($terms as $t) {
 
 2609                foreach ($defs as $def) {
 
 2611                    if (count($defs) > 1) {
 
 2612                        $tpl->setCurrentBlock(
"def_title");
 
 2615                            $this->lng->txt(
"cont_definition") . 
" " . ($def_cnt++)
 
 2617                        $tpl->parseCurrentBlock();
 
 2620                    $page_gui->setTemplateOutput(
false);
 
 2621                    $page_gui->setOutputMode(
"print");
 
 2623                    $tpl->setCurrentBlock(
"definition");
 
 2624                    $page_gui->setFileDownloadLink(
"#");
 
 2625                    $page_gui->setFullscreenLink(
"#");
 
 2626                    $page_gui->setSourceCodeDownloadScript(
"#");
 
 2627                    $output = $page_gui->showPage();
 
 2628                    $tpl->setVariable(
"VAL_DEFINITION", $output);
 
 2629                    $tpl->parseCurrentBlock();
 
 2633                $tpl->setCurrentBlock(
"term");
 
 2638                $tpl->parseCurrentBlock();
 
 2643            $tpl->setCurrentBlock(
"glossary");
 
 2644            $annex_title = $this->lng->txt(
"cont_annex") . 
" " .
 
 2645                chr(64 + $annex_cnt) . 
": " . $this->lng->txt(
"glo");
 
 2646            $tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
 
 2647            $tpl->parseCurrentBlock();
 
 2649            $annexes[] = $annex_title;
 
 2653        if (count($media_links) > 0) {
 
 2654            foreach ($media_links as $media) {
 
 2655                if (substr($media[
"Target"], 0, 4) == 
"il__") {
 
 2656                    $arr = explode(
"_", $media[
"Target"]);
 
 2657                    $id = $arr[count($arr) - 1];
 
 2660                    $med_item = $med_obj->getMediaItem(
"Standard");
 
 2661                    if (is_object($med_item)) {
 
 2662                        if (is_int(strpos($med_item->getFormat(), 
"image"))) {
 
 2663                            $tpl->setCurrentBlock(
"ref_image");
 
 2666                            if ($med_item->getLocationType() == 
"LocalFile") {
 
 2670                                    "/" . $med_item->getLocation()
 
 2675                                    $med_item->getLocation()
 
 2679                            if ($med_item->getCaption() != 
"") {
 
 2680                                $tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
 
 2682                                $tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
 
 2684                            $tpl->parseCurrentBlock();
 
 2692            $tpl->setCurrentBlock(
"ref_images");
 
 2693            $annex_title = $this->lng->txt(
"cont_annex") . 
" " .
 
 2694                chr(64 + $annex_cnt) . 
": " . $this->lng->txt(
"cont_ref_images");
 
 2695            $tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
 
 2696            $tpl->parseCurrentBlock();
 
 2698            $annexes[] = $annex_title;
 
 2702        if ($output_header) {
 
 2703            $tpl->setCurrentBlock(
"print_header");
 
 2705            if ($this->lm->getDescription() != 
"none") {
 
 2706                $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 2707                $md_gen = $md->getGeneral();
 
 2708                foreach ($md_gen->getDescriptionIds() as $id) {
 
 2709                    $md_des = $md_gen->getDescription($id);
 
 2710                    $description = $md_des->getDescription();
 
 2718            $tpl->parseCurrentBlock();
 
 2722            foreach ($nodes2 as $node2) {
 
 2723                if ($node2[
"type"] == 
"st" 
 2725                    for ($j = 1; $j < $node2[
"depth"]; $j++) {
 
 2726                        $tpl->setCurrentBlock(
"indent");
 
 2728                        $tpl->parseCurrentBlock();
 
 2730                    $tpl->setCurrentBlock(
"toc_entry");
 
 2735                            ilLMOBject::CHAPTER_TITLE,
 
 2736                            $this->lm->isActiveNumbering(),
 
 2737                            $this->lm_set->get(
"time_scheduled_page_activation"),
 
 2743                    $tpl->parseCurrentBlock();
 
 2748            foreach ($annexes as $annex) {
 
 2749                $tpl->setCurrentBlock(
"indent");
 
 2751                $tpl->parseCurrentBlock();
 
 2752                $tpl->setCurrentBlock(
"toc_entry");
 
 2753                $tpl->setVariable(
"TXT_TOC_TITLE", $annex);
 
 2754                $tpl->parseCurrentBlock();
 
 2757            $tpl->setCurrentBlock(
"toc");
 
 2758            $tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
 
 2759            $tpl->parseCurrentBlock();
 
 2761            $tpl->setCurrentBlock(
"print_start_block");
 
 2762            $tpl->parseCurrentBlock();
 
 2766        $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 2767        if (is_object($lifecycle = $md->getLifecycle())) {
 
 2768            $sep = $author = 
"";
 
 2769            foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
 
 2770                $md_con = $lifecycle->getContribute($con_id);
 
 2771                if ($md_con->getRole() == 
"Author") {
 
 2772                    foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
 
 2773                        $md_ent = $md_con->getEntity($ent_id);
 
 2774                        $author = $author . $sep . $md_ent->getEntity();
 
 2779            if ($author != 
"") {
 
 2780                $this->lng->loadLanguageModule(
"meta");
 
 2781                $tpl->setCurrentBlock(
"author");
 
 2782                $tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
 
 2783                $tpl->setVariable(
"LM_AUTHOR", $author);
 
 2784                $tpl->parseCurrentBlock();
 
 2790        if (is_object($md_rights = $md->getRights())) {
 
 2791            $copyright = $md_rights->getDescription();
 
 2794            if ($copyright != 
"") {
 
 2795                $this->lng->loadLanguageModule(
"meta");
 
 2796                $tpl->setCurrentBlock(
"copyright");
 
 2797                $tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
 
 2798                $tpl->setVariable(
"LM_COPYRIGHT", $copyright);
 
 2799                $tpl->parseCurrentBlock();
 
 2803        $this->tpl->setContent(
$tpl->get());
 
 2804        $this->tpl->printToStdout();
 
 2813        $page_gui->downloadFile();
 
 2821        if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
 
 2834        $tpl = 
new ilTemplate(
"tpl.lm_download_list.html", 
true, 
true, 
"Modules/LearningModule");
 
 2841        $md = 
new ilMD($this->lm->getId(), 0, $this->lm->getType());
 
 2842        if (is_object($md_rights = $md->getRights())) {
 
 2843            $copyright = $md_rights->getDescription();
 
 2847            if ($copyright != 
"") {
 
 2848                $this->lng->loadLanguageModule(
"meta");
 
 2849                $tpl->setCurrentBlock(
"copyright");
 
 2850                $tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
 
 2851                $tpl->setVariable(
"LM_COPYRIGHT", $copyright);
 
 2852                $tpl->parseCurrentBlock();
 
 2857        $tpl->setVariable(
"DOWNLOAD_TABLE", $download_table->getHTML());
 
 2860        $modal = $this->
ui->factory()->modal()->roundtrip(
 
 2861            $this->lng->txt(
"download"),
 
 2862            $this->ui->factory()->legacy(
$tpl->get())
 
 2864        echo $this->
ui->renderer()->render($modal);
 
 2874        if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
 
 2878        $base_type = explode(
"_", 
$_GET[
"type"]);
 
 2879        $base_type = $base_type[0];
 
 2880        $file = $this->lm->getPublicExportFile($base_type);
 
 2881        if ($this->lm->getPublicExportFile($base_type) != 
"") {
 
 2882            $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
 
 2883            if (is_file($dir . 
"/" . $file)) {
 
 2901        return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $a_ref_id . 
"&obj_id=" . $a_obj_id . 
"&focus_id=" .
 
 2902            $a_obj_id . 
"&focus_return=" . $a_return_ref_id;
 
 2916        $tpl = 
new ilTemplate(
"tpl.page_message_screen.html", 
true, 
true, 
"Modules/LearningModule");
 
 2917        $tpl->setVariable(
"TXT_PAGE_NO_PUBLIC_ACCESS", $a_content);
 
 2919        $this->tpl->setVariable(
"PAGE_CONTENT", 
$tpl->get());
 
 2953            $target = $this->ctrl->getLinkTarget($this, 
"");
 
 2955            return $this->ctrl->getLinkTarget($this, 
"");
 
 2980        $directory = $this->
getOfflineDirectory() . 
"/codefiles/" . $page_id . 
"/" . $paragraph_id;
 
 2982        $file = $directory . 
"/" . $title;
 
 2983        if (!($fp = @fopen($file, 
"w+"))) {
 
 2984            die(
"<b>Error</b>: Could not open \"" . $file . 
"\" for writing" .
 
 2985                " in <b>" . __FILE__ . 
"</b> on line <b>" . __LINE__ . 
"</b><br />");
 
 3010        $concrete_lang = $this->service->getPresentationStatus()->getConcreteLang();
 
 3012            return new ilLMPageGUI($a_id, 0, 
false, $this->lang, $concrete_lang);
 
 3015            return new ilLMPageGUI($a_id, 0, 
false, $this->ot->getFallbackLanguage(), $concrete_lang);
 
 3017        return new ilLMPageGUI($a_id, 0, 
false, 
"", $concrete_lang);
 
 3028        $type = ($a_type == 
"mep")
 
 3036                $lang = $this->ot->getFallbackLanguage();
 
 3053        $exp = $this->
ilTOC(
true);
 
 3055        echo $exp->getHTML() .
 
 3056            "<script>" . $exp->getOnLoadCode() . 
"</script>";
 
 3070        $note = 
new ilNote($a_note_id);
 
 3071        $note = $note->getText();
 
 3081        $notification->send();
 
 3093        $menu_editor->setObjId($this->lm->getId());
 
 3102            $this->export_all_languages,
 
 3116        $navigation_renderer->
render();
 
 3128        switch ($pars[
"cmd"]) {
 
 3130                $tpl = 
new ilTemplate(
"tpl.embedded_view.html", 
true, 
true, 
"Modules/LearningModule");
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
static addJavaScript(ilGlobalTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
static addCss()
Add required css.
Generic feedback page GUI class.
Class ilCommonActionDispatcherGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
special template class to simplify handling of ITX/PEAR
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 _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static _isPagePublic($a_node_id, $a_check_public_mode=false)
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=self::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
basicPageGuiInit(\ilLMPageGUI $a_page_gui)
Basic page gui initialisation.
ilLMNotes()
output notes of page
outputInfoScreen($a_standard_locator=false)
info screen
ilMainMenu()
output main menu
setHeader()
output lm header
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
injectTemplate($tpl)
Inject template.
processNodes(&$a_content, &$a_node)
getExportFormat()
get export format
initScreenHead($a_active_tab="info")
showPrintView()
show print view
observeNoteAction($a_lm_id, $a_page_id, $a_type, $a_action, $a_note_id)
Generate new ilNote and send Notifications to the users informing that there are new comments in the ...
nop()
this dummy function is needed for offline package creation
downloadFile()
download file of file lists
showMessageScreen($a_content)
Show message screen.
getSourcecodeDownloadLink()
getContent($skip_nav=false)
process <ilPage> content tag
getPageContent()
Get page content.
getFocusLink($a_ref_id, $a_obj_id, $a_return_ref_id)
Get focused link (used in learning objectives courses)
attrib2arr($a_attributes)
addHeaderAction()
Add header action.
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)
addResourceFiles()
Add resource files.
showInfoScreen()
info screen call from inside learning module
initByRequest($query_params, bool $embed_mode=false)
Init services and this class by request params.
renderRating()
Render rating.
getOfflineDirectory()
get offline directory
getCurrentFrameSet()
get frames of current frame set
getHeaderAction($a_redraw=false)
Add header action.
ilTOC($a_get_explorer=false)
table of contents
getSuccessorPage()
Get successor page.
showPrintViewSelection()
show selection screen for print view
ilLMSubMenu()
output learning module submenu
setContentStyles()
Set content style.
setSystemStyle()
Set system style.
saveFrameUrl()
Save frame url.
redrawHeaderAction()
Redraw header action.
downloadExportFile()
send download file (xml/html)
determineLayout()
Determine layout.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
getHTML($pars)
Get HTML (called by kios mode through ilCtrl)
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
renderTabs($active_tab, $current_page_id)
Render tabs.
ilLocator($a_std_templ_loaded=false)
locator
$chapter_has_no_active_page
ilJavaScript($a_inline="", $a_file="", $a_location="")
Puts JS into template.
ilGlossary()
show glossary term
getLMPage($a_id, $a_type="")
Get lm page object.
showNoPublicAccess()
Show info message, if page is not accessible in public area.
getLMPresentationTitle()
Get lm presentationtitle.
Main service init and factory.
Class ilLearningModuleNotification class.
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _parseCopyright($a_copyright)
Parse copyright.
Handles display of the main menu.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
static hasOptOut($obj_id)
Is opt out (disable notification) allowed?
static _checkPreconditionsOfPage($cont_ref_id, $cont_obj_id, $page_id)
checks wether the preconditions of a page are fulfilled or not
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, $add_token=true)
get content style path
static getInstance($a_obj_id)
Get instance.
setOutputMode($a_mode=self::PRESENTATION)
Set Output Mode.
setFileDownloadLink($a_download_link)
Set file download link.
setFullscreenLink($a_fullscreen_link)
Set fullscreen link.
setStyleId($a_styleid)
Set Style Id.
setSourcecodeDownloadScript($script_name)
Set sourcecode download script.
setOfflineDirectory($offdir)
set offline directory to offdir
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
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.
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=self::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 init(ilGlobalTemplateInterface $a_tpl=null)
Init.
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 initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
xpath_eval($xpath_context, $eval_str, $contextnode=null)
domxml_open_mem($str, $mode=0, &$error=null)
xpath_new_context($dom_document)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
foreach($_POST as $key=> $value) $res