4 require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
5 require_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
6 require_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
42 $lng->loadLanguageModule(
"content");
46 $this->offline =
false;
47 $this->frames = array();
49 $this->ctrl->saveParameter($this, array(
"ref_id",
"transl",
"focus_id",
"focus_return"));
52 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
54 $this->lm = $this->lm_gui->object;
57 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
62 if ($this->ot->getContentActivated())
64 $langs = $this->ot->getLanguages();
65 if (isset($langs[
$_GET[
"transl"]]) || $_GET[
"transl"] == $this->ot->getMasterLanguage())
67 $this->lang = $_GET[
"transl"];
69 else if (isset($langs[$ilUser->getCurrentLanguage()]))
71 $this->lang = $ilUser->getCurrentLanguage();
73 if ($this->lang == $this->ot->getMasterLanguage())
79 if(IS_PAYMENT_ENABLED)
81 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
84 else $this->needs_to_be_purchased =
false;
87 if (!$rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
89 if (!$this->lm->getOnline())
91 $ilias->raiseError($lng->txt(
"permission_denied"),
$ilias->error_obj->WARNING);
95 include_once(
"./Modules/LearningModule/classes/class.ilLMTree.php");
102 if ((
int)
$_GET[
"focus_id"] > 0 && $this->lm_tree->isInTree((
int)
$_GET[
"focus_id"]))
104 $this->focus_id = (int) $_GET[
"focus_id"];
116 if(IS_PAYMENT_ENABLED)
118 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
119 if($ilAccess->checkAccess(
'visible',
'',
$_GET[
'ref_id']) &&
122 if(!((
int)
$_GET[
'obj_id'] &&
124 ($this->ctrl->getCmd() ==
'layout' || $this->ctrl->getCmd() ==
'')))
127 unset(
$_GET[
'obj_id']);
129 $this->tpl->getStandardTemplate();
132 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
134 $ret = $this->ctrl->forwardCommand($pp);
142 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]) &&
143 (!(($this->ctrl->getCmd() ==
"infoScreen" || $this->ctrl->getNextClass() ==
"ilinfoscreengui")
144 && $ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"]))))
146 $ilias->raiseError($lng->txt(
"permission_denied"), $ilias->error_obj->WARNING);
149 $next_class = $this->ctrl->getNextClass($this);
150 $cmd = $this->ctrl->getCmd(
"layout", array(
"showPrintView"));
156 $obj_id =
$_GET[
"obj_id"];
157 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
158 $ilNavigationHistory->addItem(
$_GET[
"ref_id"], $this->ctrl->getLinkTarget($this),
"lm");
159 $this->ctrl->setParameter($this,
"obj_id", $obj_id);
167 case "ilinfoscreengui":
171 case "ilcommonactiondispatchergui":
172 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
174 $gui->enableCommentsSettings(
false);
175 $this->ctrl->forwardCommand($gui);
179 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
182 $ret = $ilCtrl->forwardCommand($page_gui);
185 case "ilglossarydefpagegui":
186 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
189 $ret = $ilCtrl->forwardCommand($page_gui);
192 case "illearningprogressgui":
194 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
196 $this->ctrl->forwardCommand($new_gui);
200 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
202 $rating_gui->setObject($this->lm->getId(),
"lm",
$_GET[
"obj_id"],
"lm");
203 $this->ctrl->forwardCommand($rating_gui);
218 $this->offline = $a_offline;
237 $this->export_format = $a_format;
247 return $this->export_format;
267 switch($this->lm->getType())
270 $this->lm_gui->export();
282 include_once(
"./Modules/LearningModule/classes/class.ilLMTracker.php");
291 if(!is_array($a_attributes))
295 foreach ($a_attributes as $attribute)
297 $attr[$attribute->name()] = $attribute->value();
307 return $this->frames;
321 $layout = $this->lm->getLayout();
322 if ($this->lm->getLayoutPerPage())
325 if (!in_array(
$_GET[
"frame"], array(
"",
"_blank")) &&
$_GET[
"from_page"] > 0)
327 $pg_id = (int)
$_GET[
"from_page"];
331 if (in_array(
$_GET[
"cmd"], array(
"media",
"glossary")) &&
$_GET[
"back_pg"] > 0)
333 $pg_id = (int)
$_GET[
"back_pg"];
354 function layout($a_xml =
"main.xml", $doShow =
true)
363 $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/".$layout.
"/".$a_xml);
367 include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
369 $layout.
"/".$a_xml.
".");
371 $this->layout_doc = $doc;
377 ?
"/ilLayout/ilFrame[1]"
378 :
"//ilFrame[@name='".$_GET[
"frame"].
"']";
381 if (count($found) != 1)
383 include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
385 " path ".
$path.
" in ".$layout.
"/".$a_xml.
". LM Layout is ".$this->lm->getLayout());
391 $attributes = $this->
attrib2arr($node->attributes());
393 $this->frames = array();
394 if((!empty($attributes[
"rows"])) || (!empty($attributes[
"cols"])))
396 $content .= $this->
buildTag(
"start",
"frameset", $attributes);
399 $content .= $this->
buildTag(
"end",
"frameset");
400 $this->tpl =
new ilTemplate(
"tpl.frameset.html",
true,
true,
"Modules/LearningModule");
402 $this->tpl->setVariable(
"FS_CONTENT", $content);
405 $content = $this->tpl->get();
412 if ((empty($attributes[
"template"]) || !empty(
$_GET[
"obj_type"]))
413 && (
$_GET[
"frame"] !=
"_blank" ||
$_GET[
"obj_type"] !=
"MediaObject"))
420 if(empty(
$_GET[
"obj_type"]))
422 $obj_type =
"PageObject";
426 $obj_type =
$_GET[
"obj_type"];
430 $childs = $node->child_nodes();
432 foreach($childs as $child)
434 if ($child->node_name() == $obj_type)
437 $attributes = $this->
attrib2arr($child->attributes());
443 if (!$found) { echo
"ilLMPresentation: No template specified for frame '".
444 $_GET[
"frame"].
"' and object type '".$obj_type.
"'.";
exit; }
448 $in_module = ($attributes[
"template_location"] ==
"module")
453 $this->tpl =
new ilTemplate($attributes[
"template"],
true,
true, $in_module);
454 $this->tpl->setBodyClass(
"");
468 $style_name = $ilUser->getPref(
"style").
".css";
469 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
472 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
477 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
483 $childs = $node->child_nodes();
485 foreach($childs as $child)
488 $child_attr = $this->
attrib2arr($child->attributes());
490 switch ($child->node_name())
498 $this->
ilTOC($child_attr[
"target_frame"]);
502 switch($this->lm->getType())
508 $content = $this->
ilPage($child);
517 case "ilLMNavigation":
530 $this->
ilJavaScript($child_attr[
"inline"], $child_attr[
"file"],
531 $child_attr[
"location"]);
562 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
567 $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
568 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
569 $close_call =
"il.LearningModule.setCloseHTML('".ilGlyphGUI::get(
ilGlyphGUI::CLOSE).
"');";
570 $this->tpl->addOnLoadCode($close_call);
575 if (
$_GET[
"frame"] ==
"")
577 include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
579 $last_frame_url = $store->get(
"cf_".$this->lm->getId());
580 if ($last_frame_url !=
"")
582 $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('".$last_frame_url.
"', 'center_bottom');");
585 if (in_array($layout, array(
"toc2windyn")))
587 $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('".
588 $ilCtrl->getLinkTarget($this,
"saveFrameUrl",
"",
false,
false).
"');
589 il.LearningModule.openInitFrames();
592 $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('".
593 $ilCtrl->getLinkTarget($this,
"refreshToc",
"",
false,
false).
"');
599 $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
600 $this->tpl->fillJavaScriptFiles();
601 $this->tpl->fillScreenReaderFocus();
603 $this->tpl->fillCssFiles();
608 $this->tpl->resetJavascript();
609 $this->tpl->resetCss();
610 $this->tpl->setBodyClass(
"ilLMNoMenu");
612 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
615 if ($f[
"type"] ==
"js")
617 $this->tpl->addJavascript($f[
"target"]);
619 if ($f[
"type"] ==
"css")
621 $this->tpl->addCSS($f[
"target"]);
624 $this->tpl->fillJavaScriptFiles(
true);
625 $this->tpl->fillCssFiles(
true);
629 $this->tpl->fillBodyClass();
639 $this->tpl->fillTabs();
640 if ($this->fill_on_load_code)
642 $this->tpl->fillOnLoadCode();
644 $content = $this->tpl->get();
645 $content = str_replace(
"{",
"{", $content);
646 $content = str_replace(
"}",
"}", $content);
648 header(
'Content-type: text/html; charset=UTF-8');
653 $this->tpl->fillLeftNav();
654 $this->tpl->fillOnLoadCode();
655 $content = $this->tpl->get();
669 include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
671 if (
$_GET[
"url"] !=
"")
673 $store->set(
"cf_".$this->lm->getId(),
$_GET[
"url"]);
677 $store->set(
"cf_".$this->lm->getId(),
$_GET[
"url"]);
689 if (
$_GET[
"frame"] !=
"_blank")
703 if (
$_GET[
"frame"] !=
"_blank")
709 $this->tpl =
new ilTemplate(
"tpl.glossary_term_output.html",
true,
true,
true);
720 $style_name = $ilUser->getPref(
"style").
".css";;
721 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
731 return $this->tpl->get();
745 $this->tpl->touchBlock(
"pg_intro");
746 $this->tpl->touchBlock(
"pg_outro");
754 $ilMainMenu->setLoginTargetPar(
"pg_".$page_id.
"_".$this->lm->getRefId());
759 $this->tpl->touchBlock(
"pg_intro");
760 $this->tpl->touchBlock(
"pg_outro");
761 $this->tpl->setBodyClass(
"std");
762 $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
768 function ilTOC($a_get_explorer =
false)
770 include_once(
"./Modules/LearningModule/classes/class.ilLMTOCExplorerGUI.php");
773 if (!$exp->handleCommand())
777 if ($this->deactivated_page)
779 $page_id =
$_GET[
"obj_id"];
783 $exp->setPathOpen((
int) $page_id);
786 if ($this->chapter_has_no_active_page &&
789 $exp->setHighlightNode(
$_GET[
"obj_id"]);
793 if ($this->lm->getTOCMode() ==
"pages")
795 if ($this->deactivated_page)
797 $exp->setHighlightNode(
$_GET[
"obj_id"]);
801 $exp->setHighlightNode($page_id);
806 $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
811 $exp->setOfflineMode(
true);
820 $this->tpl->setCurrentBlock(
"il_toc");
821 $this->tpl->setVariable(
"EXPLORER", $exp->getHTML());
822 $this->tpl->parseCurrentBlock();
832 $this->tpl->setVariable(
"MENU", $this->lm_gui->setilLMMenu($this->offlineMode()
841 $this->tpl->setCurrentBlock(
"header_image");
844 $this->tpl->setVariable(
"IMG_HEADER",
"./images/icon_lm.svg");
850 $this->tpl->parseCurrentBlock();
851 $this->tpl->setCurrentBlock(
"lm_head");
852 $this->tpl->setVariable(
"HEADER", $this->lm->getTitle());
853 $this->tpl->parseCurrentBlock();
864 if ($this->lm->getType() ==
"dbk" && $this->abstract)
869 $showViewInFrameset =
true;
871 if ($showViewInFrameset)
877 $buttonTarget =
"_top";
881 include_once(
"./Services/UICore/classes/class.ilTemplate.php");
882 $tpl_menu =
new ilTemplate(
"tpl.lm_sub_menu.html",
true,
true,
true);
893 if ($rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
895 $tpl_menu->setCurrentBlock(
"edit_page");
897 $tpl_menu->setVariable(
"EDIT_LINK", ILIAS_HTTP_PATH.
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=".
$_GET[
"ref_id"].
898 "&obj_id=".$page_id.
"&to_page=1");
899 $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
900 $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
901 $tpl_menu->parseCurrentBlock();
906 include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
908 $page_id.
"_".$this->lm->getRefId(),
914 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
915 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang);
918 $title.=
": ".$pg_title;
923 $tpl_menu->setCurrentBlock(
"perma_link");
924 $tpl_menu->setVariable(
"PERMA_LINK", $plinkgui->getHTML());
925 $tpl_menu->parseCurrentBlock();
929 $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
947 global $ilAccess,
$tpl;
949 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
951 $ilAccess, $this->lm->getType(),
$_GET[
"ref_id"], $this->lm->getId());
954 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
955 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
956 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
957 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
959 $lg = $dispatcher->initHeaderAction();
960 $lg->enableNotes(
true);
961 $lg->enableComments($this->lm->publicNotes(),
false);
963 if($this->lm->hasRating())
965 $lg->enableRating(
true, $this->lng->txt(
"lm_rating"),
false,
966 array(
"ilcommonactiondispatchergui",
"ilratinggui"));
971 $this->tpl->setVariable(
"HEAD_ACTION", $lg->getHeaderAction());
976 return $lg->getHeaderAction().
977 $tpl->getOnLoadCodeForAsynch();
990 if ($this->lm->getType() ==
"dbk" && $this->abstract)
1003 if (!$ilSetting->get(
"disable_notes"))
1010 if ($ilSetting->get(
"disable_comments"))
1015 if (!$this->lm->publicNotes())
1020 $next_class = $this->ctrl->getNextClass($this);
1022 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1031 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) &&
1032 $ilSetting->get(
"comments_del_tutor", 1))
1037 $this->ctrl->setParameter($this,
"frame",
$_GET[
"frame"]);
1038 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1040 $notes_gui->enablePrivateNotes();
1041 if ($this->lm->publicNotes())
1043 $notes_gui->enablePublicNotes();
1046 if ($next_class ==
"ilnotegui")
1048 $html = $this->ctrl->forwardCommand($notes_gui);
1052 $html = $notes_gui->getNotesHTML();
1054 $this->tpl->setVariable(
"NOTES", $html);
1063 global $ilLocator, $tree,
$ilCtrl;
1065 require_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
1067 if (empty(
$_GET[
"obj_id"]))
1069 $a_id = $this->lm_tree->getRootId();
1073 $a_id =
$_GET[
"obj_id"];
1076 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1078 if (!$this->lm->cleanFrames())
1080 $frame_param =
$_GET[
"frame"];
1091 $frame_target =
"_top";
1096 $ilLocator->addItem(
"...",
"");
1098 $par_id = $tree->getParentId(
$_GET[
"ref_id"]);
1099 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $par_id);
1100 $ilLocator->addItem(
1102 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
1104 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1108 $ilLocator->setOffline(
true);
1111 if($this->lm_tree->isInTree($a_id))
1113 $path = $this->lm_tree->getPathFull($a_id);
1117 if (
$row[
"type"] !=
"pg")
1119 if(
$row[
"child"] != $this->lm_tree->getRootId())
1121 $ilLocator->addItem(
1124 $this->lm->isActiveNumbering(),
1125 $this->lm_set->get(
"time_scheduled_page_activation"), 0,
$this->lang),
1127 $this->
getLink(
$_GET[
"ref_id"],
"layout",
$row[
"child"], $frame_param,
"StructureObject"),
1132 $ilLocator->addItem(
1134 $this->
getLink(
$_GET[
"ref_id"],
"layout",
"", $frame_param),
1135 $frame_target,
$_GET[
"ref_id"]);
1143 $ilLocator->addItem(
1144 $this->lm->getTitle(),
1147 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
1150 $ilLocator->addItem(
1151 $lm_obj->getTitle(),
1152 $this->
getLink(
$_GET[
"ref_id"],
"layout", $a_id, $frame_param),
1158 $debug =
"DEBUG: <font color=\"red\">".$this->type.
"::".$this->
id.
"::".
$_GET[
"cmd"].
"</font><br/>";
1164 $this->tpl->setLocator();
1176 if (!$this->
offlineMode() && $this->current_page_id !==
false)
1181 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1183 $this->chapter_has_no_active_page =
false;
1184 $this->deactivated_page =
false;
1187 if(empty(
$_GET[
"obj_id"]))
1189 $obj_id = $this->lm_tree->getRootId();
1193 $obj_id =
$_GET[
"obj_id"];
1195 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1200 $this->deactivated_page =
true;
1205 if (!$this->lm_tree->isInTree($obj_id))
1210 $curr_node = $this->lm_tree->getNodeData($obj_id);
1213 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1215 if ($curr_node[
"type"] ==
"pg" &&
1218 $page_id = $curr_node[
"obj_id"];
1225 while($succ_node && !$active)
1227 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
"pg");
1228 $page_id = $succ_node[
"obj_id"];
1230 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1233 if ($succ_node[
"type"] !=
"pg")
1235 $this->chapter_has_no_active_page =
true;
1241 $this->lm_gui->object->getPublicAccessMode() ==
'selected')
1245 while ($public ===
false && $page_id > 0)
1247 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
'pg');
1248 $page_id = $succ_node[
'obj_id'];
1254 if ($this->lm_tree->isInTree($page_id))
1256 $path = $this->lm_tree->getPathId($page_id);
1259 $this->chapter_has_no_active_page =
true;
1264 $this->current_page_id = $page_id;
1271 $this->tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
true);
1273 $this->tpl->setVariable(
"MENU",$this->lm_gui->setilCitationMenu());
1275 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1277 $this->pg_obj = $this->
getLMPage($page_id);
1278 $xml = $this->pg_obj->getXMLContent();
1279 $this->lm_gui->showCitation($xml);
1287 if (!is_object($this->layout_doc))
1292 $path =
"/ilLayout/ilLinkTargets/LinkTarget";
1295 for ($i = 0; $i < count(
$res->nodeset); $i++)
1297 $type =
$res->nodeset[$i]->get_attribute(
"Type");
1298 $frame =
$res->nodeset[$i]->get_attribute(
"Frame");
1299 $onclick =
$res->nodeset[$i]->get_attribute(
"OnClick");
1300 $targets[$type] = array(
"Type" => $type,
"Frame" => $frame,
"OnClick" => $onclick);
1312 function ilPage(&$a_page_node, $a_page_id = 0)
1318 $ilHelp->setScreenIdComponent(
"lm");
1319 $ilHelp->setScreenId(
"content");
1320 $ilHelp->setSubScreenId(
"content");
1322 $this->fill_on_load_code =
true;
1326 $this->lm_gui->object->getPublicAccessMode() ==
'selected')
1343 if ($this->lm->getRestrictForwardNavigation())
1354 require_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
1355 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
1358 if ($a_page_id == 0)
1366 include_once
'./Services/Search/classes/class.ilUserSearchCache.php';
1369 $search_string = $cache->getQuery();
1372 if(is_array($search_string))
1374 $search_string = $search_string[
"lom_content"];
1377 include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
1378 include_once(
"./Services/Search/classes/class.ilQueryParser.php");
1382 $words = $p->getQuotedWords();
1383 if (is_array($words))
1385 foreach ($words as $w)
1391 $this->fill_on_load_code =
true;
1396 $page_id = $a_page_id;
1400 $this->tpl->setCurrentBlock(
"ContentStyle");
1403 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1408 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
1410 $this->tpl->parseCurrentBlock();
1413 if ($this->chapter_has_no_active_page &&
1416 $mtpl =
new ilTemplate(
"tpl.no_content_message.html",
true,
true,
1417 "Modules/LearningModule");
1418 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_no_page_in_chapter"));
1421 $mtpl->setVariable(
"ITEM_TITLE",
1423 $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
1424 return $mtpl->get();
1428 if ($this->deactivated_page)
1430 $mtpl =
new ilTemplate(
"tpl.no_content_message.html",
true,
true,
1431 "Modules/LearningModule");
1432 $m = $this->lng->txt(
"cont_page_currently_deactivated");
1434 if ($act_data[
"show_activation_info"] &&
1437 $m.=
"<p>".sprintf($this->lng->txt(
"cont_page_activation_on"),
1442 $mtpl->setVariable(
"MESSAGE", $m);
1445 $mtpl->setVariable(
"ITEM_TITLE",
1447 $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
1448 return $mtpl->get();
1453 if ($this->focus_id > 0)
1455 $path = $this->lm_tree->getPathId($page_id);
1458 if (!in_array($this->focus_id,
$path))
1460 $mtpl =
new ilTemplate(
"tpl.out_of_focus_message.html",
true,
true,
1461 "Modules/LearningModule");
1462 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message"));
1463 $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
1467 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
1468 $this->ctrl->setParameter($this,
"obj_id", $this->focus_id);
1469 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this,
"layout"));
1470 $this->ctrl->setParameter($this,
"obj_id", $_GET[
"obj_id"]);
1474 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
1475 include_once(
"./Services/Link/classes/class.ilLink.php");
1476 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING",
ilLink::_getLink((
int) $_GET[
"focus_return"]));
1479 $this->ctrl->setParameter($this,
"focus_id",
"");
1480 $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this,
"layout"));
1481 $this->ctrl->setParameter($this,
"focus_id", $_GET[
"focus_id"]);
1483 $focus_mess = $mtpl->get();
1493 if ($sp == 0 || !in_array($this->focus_id, $path2))
1495 $mtpl =
new ilTemplate(
"tpl.out_of_focus_message.html",
true,
true,
1496 "Modules/LearningModule");
1497 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message_last_page"));
1498 $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
1502 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
1503 $this->ctrl->setParameter($this,
"obj_id", $this->focus_id);
1504 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this,
"layout"));
1505 $this->ctrl->setParameter($this,
"obj_id", $_GET[
"obj_id"]);
1509 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
1510 include_once(
"./Services/Link/classes/class.ilLink.php");
1511 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING",
ilLink::_getLink((
int) $_GET[
"focus_return"]));
1514 $this->ctrl->setParameter($this,
"focus_id",
"");
1515 $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this,
"layout"));
1516 $this->ctrl->setParameter($this,
"focus_id", $_GET[
"focus_id"]);
1518 $focus_mess = $mtpl->get();
1526 $cont = $this->lng->txt(
"cont_no_page");
1527 $this->tpl->setVariable(
"PAGE_CONTENT", $cont);
1534 $page_object = $page_object_gui->getPageObject();
1535 $page_object->buildDom();
1536 $page_object->registerOfflineHandler($this);
1538 $int_links = $page_object->getInternalLinks();
1542 $page_object_gui->setTemplateOutput(
false);
1545 $ilUser->setDesktopItemParameters($this->lm->getRefId(), $this->lm->getType(), $page_id);
1548 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
1557 $lm_pg_obj->setLMId($this->lm->getId());
1559 $page_object_gui->setLinkXML($link_xml);
1563 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
1566 if ($page_id == 0 || ($page_id != $this->lm->getHeaderPage() &&
1567 $page_id != $this->lm->getFooterPage()))
1569 $page_object_gui->setPresentationTitle(
1571 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
1572 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang));
1575 if ($ilUser->getId() != ANONYMOUS_USER_ID && $page_id != 0 && !$this->
offlineMode())
1582 $page_object_gui->setEnabledPageFocus(
false);
1583 $page_object_gui->getPageConfig()->setEnableSelfAssessment(
false);
1587 $page_object_gui->setLinkParams(
"ref_id=".$this->lm->getRefId());
1588 $page_object_gui->setTemplateTargetVar(
"PAGE_CONTENT");
1592 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1595 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1600 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1601 "syntaxhighlight.css");
1603 $this->tpl->parseCurrentBlock();
1606 $ret = $page_object_gui->presentation($page_object_gui->getOutputMode());
1609 if ($this->lm->getHeaderPage() > 0 &&
1610 $page_id != $this->lm->getHeaderPage() &&
1611 ($page_id == 0 || $page_id != $this->lm->getFooterPage()))
1615 $head = $this->
ilPage($a_page_node, $this->lm->getHeaderPage());
1620 if ($this->lm->getFooterPage() > 0 &&
1621 $page_id != $this->lm->getFooterPage() &&
1622 ($page_id == 0 || $page_id != $this->lm->getHeaderPage()))
1626 $foot = $this->
ilPage($a_page_node, $this->lm->getFooterPage());
1632 if($this->lm->hasRatingPages())
1634 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
1636 $rating_gui->setObject($this->lm->getId(),
"lm", $page_id,
"lm");
1637 $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1644 $this->ctrl->setParameter($this,
"pgid", $page_id);
1645 $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('".
1646 $this->ctrl->getLinkTarget($this,
"updatePageRating",
"",
true,
false).
1648 $this->ctrl->setParameter($this,
"pgid",
"");
1650 $rating =
'<div id="ilrtrpg" style="text-align:right">'.
1651 $rating_gui->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);").
1655 $this->tpl->setVariable(
"PAGE_CONTENT", $rating.$head.$focus_mess.$ret.$foot);
1657 return $head.$focus_mess.$ret.$foot;
1664 $pg_id =
$_GET[
"pgid"];
1665 if(!$this->ctrl->isAsynch() || !$pg_id)
1670 include_once
'./Services/Rating/classes/class.ilRating.php';
1671 $rating = (int)
$_POST[
"rating"];
1675 $pg_id,
"lm", $ilUser->getId(),
$_POST[
"rating"]);
1680 $pg_id,
"lm", $ilUser->getId());
1683 include_once
'./Services/Rating/classes/class.ilRatingGUI.php';
1685 $rating->setObject($this->lm->getId(),
"lm", $pg_id,
"lm", $ilUser->getId());
1686 $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1688 echo $rating->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);");
1690 echo $this->tpl->getOnLoadCodeForAsynch();
1702 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1704 $this->lm->getStyleSheetId(),
"lm"));
1707 $a_page_gui->setOutputMode(
"presentation");
1708 $this->fill_on_load_code =
true;
1712 $a_page_gui->setOutputMode(
"offline");
1714 $this->fill_on_load_code =
false;
1716 $a_page_gui->setFileDownloadLink($this->
getLink(
$_GET[
"ref_id"],
"downloadFile"));
1717 $a_page_gui->setFullscreenLink($this->
getLink(
$_GET[
"ref_id"],
"fullscreen"));
1731 $this->tpl->setCurrentBlock(
"ContentStyle");
1734 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1739 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
1741 $this->tpl->parseCurrentBlock();
1743 $this->tpl->addBlockFile(
"PAGE_CONTENT",
"pg_content",
"tpl.page_preconditions.html",
true);
1746 include_once(
"./Services/Repository/classes/class.ilRepositoryExplorer.php");
1747 foreach($conds as $cond)
1751 $this->tpl->setCurrentBlock(
"condition");
1752 $this->tpl->setVariable(
"ROWCOL", $rc = ($rc !=
"tblrow2") ?
"tblrow2" :
"tblrow1");
1754 $this->tpl->setVariable(
"LINK_ITEM", $obj_link);
1755 $this->tpl->setVariable(
"FRAME_ITEM", $obj_frame);
1756 if ($cond[
"operator"] ==
"passed")
1758 $cond_str = $this->lng->txt(
"passed");
1762 $cond_str = $cond[
"operator"];
1764 $this->tpl->setVariable(
"VAL_CONDITION", $cond_str.
" ".$cond[
"value"]);
1765 $this->tpl->parseCurrentBlock();
1767 $this->tpl->setCurrentBlock(
"pg_content");
1769 $this->tpl->setVariable(
"TXT_MISSING_PRECONDITIONS",
1770 sprintf($this->lng->txt(
"cont_missing_preconditions"),
1772 $this->tpl->setVariable(
"TXT_ITEM", $this->lng->txt(
"item"));
1773 $this->tpl->setVariable(
"TXT_CONDITION", $this->lng->txt(
"condition"));
1776 $parent = $this->lm_tree->getParentId($topchap);
1777 $childs = $this->lm_tree->getChildsByType($parent,
"st");
1780 foreach($childs as $child)
1782 if ($child[
"child"] == $topchap)
1788 $succ_node = $this->lm_tree->fetchSuccessorNode($child[
"child"],
"pg");
1791 if($succ_node !=
"")
1793 $framestr = (!empty(
$_GET[
"frame"]))
1794 ?
"frame=".
$_GET[
"frame"].
"&"
1797 $showViewInFrameset =
true;
1798 $link =
"<br /><a href=\"".
1799 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"],
$_GET[
"frame"]).
1800 "\">".$this->lng->txt(
"cont_skip_chapter").
"</a>";
1801 $this->tpl->setVariable(
"LINK_SKIP_CHAPTER", $link);
1804 $this->tpl->parseCurrentBlock();
1816 $showViewInFrameset =
true;
1818 if ($a_layoutframes ==
"")
1820 $a_layoutframes = array();
1822 $link_info =
"<IntLinkInfos>";
1823 foreach ($a_int_links as $int_link)
1825 $target = $int_link[
"Target"];
1826 if (substr($target, 0, 4) ==
"il__")
1830 $type = $int_link[
"Type"];
1831 $targetframe = ($int_link[
"TargetFrame"] !=
"")
1832 ? $int_link[
"TargetFrame"]
1836 $anc = $anc_add =
"";
1837 if ($int_link[
"Anchor"] !=
"")
1839 $anc = $int_link[
"Anchor"];
1840 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1846 case "StructureObject":
1848 if ($lm_id == $this->lm->getId() ||
1849 ($targetframe !=
"None" && $targetframe !=
"New"))
1851 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1855 $nframe = ($ltarget ==
"")
1860 if ($showViewInFrameset) {
1881 if ($type ==
"PageObject")
1883 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1887 $href =
"./goto.php?target=st_".$target_id;
1892 if ($type ==
"PageObject")
1894 $href = ILIAS_HTTP_PATH.
"/goto.php?target=pg_".
$target_id.$anc_add.
"&client_id=".CLIENT_ID;
1898 $href = ILIAS_HTTP_PATH.
"/goto.php?target=st_".
$target_id.
"&client_id=".CLIENT_ID;
1901 if ($targetframe !=
"New")
1907 $ltarget =
"_blank";
1912 case "GlossaryItem":
1913 if ($targetframe ==
"None")
1915 $targetframe =
"Glossary";
1917 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1918 $nframe = ($ltarget ==
"")
1926 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1927 $nframe = ($ltarget ==
"")
1934 case "RepositoryItem":
1939 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1943 $href = ILIAS_HTTP_PATH.
"/goto.php?target=".$obj_type.
"_".
$target_id.
"&client_id=".CLIENT_ID;
1949 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1956 $ilCtrl->setParameter($this,
"file_id",
"il__file_".
$target_id);
1957 $href = $ilCtrl->getLinkTarget($this,
"downloadFile");
1958 $ilCtrl->setParameter($this,
"file_id",
"");
1963 $anc_par =
'Anchor="'.$anc.
'"';
1965 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
1966 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
1977 $link_info.=
"</IntLinkInfos>";
1986 $link_info =
"<LinkTargets>";
1989 $link_info.=
"<LinkTarget TargetFrame=\"".$t[
"Type"].
"\" LinkTarget=\"".
$t[
"Frame"].
"\" OnClick=\"".
$t[
"OnClick"].
"\" />";
1991 $link_info.=
"</LinkTargets>";
2002 require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
2006 $this->tpl->setCurrentBlock(
"ContentStyle");
2009 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2014 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2016 $this->tpl->parseCurrentBlock();
2019 $this->tpl->setCurrentBlock(
"SyntaxStyle");
2023 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
2028 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
2029 "syntaxhighlight.css");
2031 $this->tpl->parseCurrentBlock();
2033 $int_links = $term_gui->getInternalLinks();
2036 $term_gui->setLinkXML($link_xml);
2041 $ilCtrl->setParameter($this,
"pg_type",
"glo");
2043 $term_gui->output($this->
offlineMode(), $this->tpl);
2049 $ilCtrl->setParameter($this,
"pg_type",
"");
2060 $this->tpl->setCurrentBlock(
"ContentStyle");
2063 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2068 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2070 $this->tpl->parseCurrentBlock();
2081 $style_name = $ilUser->getPref(
"style").
".css";;
2082 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
2085 $this->tpl->setCurrentBlock(
"ilMedia");
2092 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2094 if (!empty (
$_GET[
"pg_id"]))
2096 require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2098 $pg_obj->buildDom();
2103 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2124 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2125 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2140 $mode = (
$_GET[
"cmd"] ==
"fullscreen")
2145 $this->
getLink($this->lm->getRefId(),
"fullscreen");
2146 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2147 'link_params' =>
"ref_id=".$this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
2148 'ref_id' => $this->lm->getRefId(),
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
2149 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
2154 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
2157 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
2166 if ($a_inline !=
"")
2168 $js_tpl =
new ilTemplate($a_inline,
true,
false, $a_location);
2169 $js = $js_tpl->get();
2170 $this->tpl->setVariable(
"INLINE_JS", $js);
2195 if ($this->chapter_has_no_active_page &&
2198 $c_id =
$_GET[
"obj_id"];
2202 if ($this->deactivated_page)
2204 $c_id =
$_GET[
"obj_id"];
2213 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
2214 $c_id = $succ_node[
"obj_id"];
2217 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2219 if ($succ_node[
"obj_id"] > 0 &&
2221 ( $this->lm->getPublicAccessMode() ==
"selected" &&
2226 else if ($succ_node[
"obj_id"] > 0 && !$active)
2230 if ($act_data[
"show_activation_info"] &&
2248 return $succ_node[
"obj_id"];
2262 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2264 include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
2274 if(!$this->lm_tree->isInTree($page_id))
2280 $limpos = strpos(
$_GET[
"back_pg"],
":");
2283 $back_pg = substr(
$_GET[
"back_pg"], 0, $limpos);
2287 $back_pg =
$_GET[
"back_pg"];
2289 if (!$this->lm->cleanFrames())
2292 $this->
getLink($this->lm->getRefId(),
"layout", $back_pg,
$_GET[
"frame"],
2299 $this->
getLink($this->lm->getRefId(),
"layout", $back_pg,
"",
2301 $back_target =
'target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2305 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
2306 $this->tpl->setVariable(
"IMG_PREV", $back_img);
2307 $this->tpl->setVariable(
"HREF_PREV", $back_href);
2308 $this->tpl->setVariable(
"FRAME_PREV", $back_target);
2309 $this->tpl->setVariable(
"TXT_PREV", $this->lng->txt(
"back"));
2310 $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"back"));
2311 $this->tpl->setVariable(
"PREV_ACC_KEY",
2313 $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
2314 ?
"images/spacer.png"
2316 $this->tpl->parseCurrentBlock();
2317 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
2318 $this->tpl->setVariable(
"IMG_PREV2", $back_img);
2319 $this->tpl->setVariable(
"HREF_PREV2", $back_href);
2320 $this->tpl->setVariable(
"FRAME_PREV2", $back_target);
2321 $this->tpl->setVariable(
"TXT_PREV2", $this->lng->txt(
"back"));
2322 $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"back"));
2323 $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
2324 ?
"images/spacer.png"
2326 $this->tpl->parseCurrentBlock();
2334 if ($this->chapter_has_no_active_page &&
2337 $c_id =
$_GET[
"obj_id"];
2341 if ($this->deactivated_page)
2343 $c_id =
$_GET[
"obj_id"];
2352 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
2353 $c_id = $succ_node[
"obj_id"];
2356 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2358 if ($succ_node[
"obj_id"] > 0 &&
2360 ( $this->lm->getPublicAccessMode() ==
"selected" &&
2365 else if ($succ_node[
"obj_id"] > 0 && !$active)
2369 if ($act_data[
"show_activation_info"] &&
2385 $succ_str = ($succ_node !==
false)
2386 ?
" -> ".$succ_node[
"obj_id"].
"_".$succ_node[
"type"]
2391 if ($this->deactivated_page)
2393 $c_id =
$_GET[
"obj_id"];
2401 $pre_node = $this->lm_tree->fetchPredecessorNode($c_id,
"pg");
2402 $c_id = $pre_node[
"obj_id"];
2404 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2405 if ($pre_node[
"obj_id"] > 0 &&
2407 ($this->lm->getPublicAccessMode() ==
"selected" &&
2412 else if ($pre_node[
"obj_id"] > 0 && !$active)
2416 if ($act_data[
"show_activation_info"] &&
2432 $pre_str = ($pre_node !==
false)
2433 ? $pre_node[
"obj_id"].
"_".$pre_node[
"type"].
" -> "
2437 $framestr = (!empty(
$_GET[
"frame"]))
2438 ?
"frame=".
$_GET[
"frame"].
"&"
2444 $showViewInFrameset =
true;
2450 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2451 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang);
2456 if (!$this->lm->cleanFrames())
2459 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"],
$_GET[
"frame"]);
2462 else if ($showViewInFrameset && !$this->
offlineMode())
2465 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"]);
2466 $prev_target =
'target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2471 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"]);
2472 $prev_target =
'target="_top" ';
2478 $output = $this->lng->txt(
"msg_page_not_public");
2481 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
2482 $this->tpl->setVariable(
"IMG_PREV", $prev_img);
2483 $this->tpl->setVariable(
"HREF_PREV", $prev_href);
2484 $this->tpl->setVariable(
"FRAME_PREV", $prev_target);
2485 $this->tpl->setVariable(
"TXT_PREV", $prev_title);
2486 $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"previous"));
2487 $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
2488 ?
"images/spacer.png"
2490 $this->tpl->setVariable(
"PREV_ACC_KEY",
2492 $this->tpl->parseCurrentBlock();
2493 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
2494 $this->tpl->setVariable(
"IMG_PREV2", $prev_img);
2495 $this->tpl->setVariable(
"HREF_PREV2", $prev_href);
2496 $this->tpl->setVariable(
"FRAME_PREV2", $prev_target);
2497 $this->tpl->setVariable(
"TXT_PREV2", $prev_title);
2498 $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"previous"));
2499 $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
2500 ?
"images/spacer.png"
2502 $this->tpl->parseCurrentBlock();
2504 if($succ_node !=
"")
2508 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2509 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang);
2513 if (!$this->lm->cleanFrames())
2516 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"],
$_GET[
"frame"]);
2519 else if ($showViewInFrameset && !$this->
offlineMode())
2522 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"]);
2523 $succ_target =
' target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2528 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"]);
2529 $succ_target =
' target="_top" ';
2535 $output = $this->lng->txt(
"msg_page_not_public");
2538 $this->tpl->setCurrentBlock(
"ilLMNavigation_Next");
2539 $this->tpl->setVariable(
"IMG_SUCC", $succ_img);
2540 $this->tpl->setVariable(
"HREF_SUCC", $succ_href);
2541 $this->tpl->setVariable(
"FRAME_SUCC", $succ_target);
2542 $this->tpl->setVariable(
"TXT_SUCC", $succ_title);
2543 $this->tpl->setVariable(
"ALT_SUCC", $this->lng->txt(
"next"));
2544 $this->tpl->setVariable(
"SPACER_SUCC", $this->
offlineMode()
2545 ?
"images/spacer.png"
2547 $this->tpl->setVariable(
"NEXT_ACC_KEY",
2549 $this->tpl->parseCurrentBlock();
2550 $this->tpl->setCurrentBlock(
"ilLMNavigation_Next2");
2551 $this->tpl->setVariable(
"IMG_SUCC2", $succ_img);
2552 $this->tpl->setVariable(
"HREF_SUCC2", $succ_href);
2553 $this->tpl->setVariable(
"FRAME_SUCC2", $succ_target);
2554 $this->tpl->setVariable(
"TXT_SUCC2", $succ_title);
2555 $this->tpl->setVariable(
"ALT_SUCC2", $this->lng->txt(
"next"));
2556 $this->tpl->setVariable(
"SPACER_SUCC2", $this->
offlineMode()
2557 ?
"images/spacer.png"
2559 $this->tpl->parseCurrentBlock();
2564 if ($this->lm->getRestrictForwardNavigation())
2566 if ($this->
getTracker()->hasPredIncorrectAnswers($succ_node[
"obj_id"]))
2568 $this->tpl->addOnLoadCode(
"$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
2578 $child_nodes = $a_node->child_nodes();
2579 foreach ($child_nodes as $child)
2581 if($child->node_name() ==
"ilFrame")
2583 $attributes = $this->
attrib2arr($child->attributes());
2585 if ((!empty($attributes[
"rows"])) || (!empty($attrubtes[
"cols"])))
2589 if(!empty($attributes[
"name"]))
2591 unset($attributes[
"template"]);
2592 unset($attributes[
"template_location"]);
2593 $attributes[
"src"] =
2594 $this->
getLink($this->lm->getRefId(),
"layout",
$_GET[
"obj_id"], $attributes[
"name"],
2595 "",
"keep",
"",
$_GET[
"srcstring"]);
2596 $attributes[
"title"] = $this->lng->txt(
"cont_frame_".$attributes[
"name"]);
2597 $a_content .= $this->
buildTag(
"",
"frame", $attributes);
2598 $this->frames[$attributes[
"name"]] = $attributes[
"name"];
2603 $a_content .= $this->
buildTag(
"start",
"frameset", $attributes);
2605 $a_content .= $this->
buildTag(
"end",
"frameset");
2610 unset($attributes[
"template"]);
2611 unset($attributes[
"template_location"]);
2612 $attributes[
"src"] =
2613 $this->
getLink($this->lm->getRefId(),
"layout",
$_GET[
"obj_id"], $attributes[
"name"],
2614 "",
"keep",
"",
$_GET[
"srcstring"]);
2615 $attributes[
"title"] = $this->lng->txt(
"cont_frame_".$attributes[
"name"]);
2616 if ($attributes[
"name"] ==
"toc")
2618 $attributes[
"src"].=
"#".$_GET[
"obj_id"];
2623 if (
$_GET[
"anchor"] !=
"")
2625 $attributes[
"src"].=
"#".rawurlencode(
$_GET[
"anchor"]);
2628 $a_content .= $this->
buildTag(
"",
"frame", $attributes);
2629 $this->frames[$attributes[
"name"]] = $attributes[
"name"];
2651 if (is_array($attr))
2653 while (list($k,$v) = each($attr))
2654 $tag.=
" ".$k.
"=\"$v\"";
2673 if (!$this->lm->isActiveTOC() || !$this->lm->isActiveLMMenu())
2679 $this->tpl->setCurrentBlock(
"ContentStyle");
2682 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2687 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2689 $this->tpl->parseCurrentBlock();
2700 $style_name = $ilUser->getPref(
"style").
".css";;
2701 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
2705 $this->tpl->getStandardTemplate();
2708 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2712 $this->tpl->setTitle($this->lm->getTitle());
2715 include_once(
"./Modules/LearningModule/classes/class.ilLMTableOfContentsExplorerGUI.php");
2718 if (!$exp->handleCommand())
2722 if ($this->deactivated_page)
2724 $page_id =
$_GET[
"obj_id"];
2727 if ($this->chapter_has_no_active_page &&
2730 $exp->setHighlightNode(
$_GET[
"obj_id"]);
2734 if ($this->lm->getTOCMode() ==
"pages")
2736 if ($this->deactivated_page)
2738 $exp->setHighlightNode(
$_GET[
"obj_id"]);
2742 $exp->setHighlightNode($page_id);
2747 $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
2752 $exp->setOfflineMode(
true);
2755 $this->tpl->setVariable(
"ADM_CONTENT", $exp->getHTML());
2759 return $this->tpl->get();
2775 $this->ctrl->setCmd(
"showSummary");
2776 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2790 global $ilAccess, $ilLocator,
$ilUser;
2801 $style_name = $ilUser->getPref(
"style").
".css";;
2802 $this->tpl->setStyleSheetLocation(
"./".$style_name);
2805 $this->tpl->getStandardTemplate();
2806 $this->tpl->setTitle($this->lm->getTitle());
2809 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2813 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
2819 $ilLocator->addRepositoryItems();
2820 $this->tpl->setLocator();
2833 $this->lng->loadLanguageModule(
"meta");
2835 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2838 $info->enablePrivateNotes();
2839 $info->enableLearningProgress();
2841 $info->enableNews();
2842 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
2845 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
2847 $info->enableNewsEditing();
2849 if ($enable_internal_rss)
2851 $info->setBlockProperty(
"news",
"settings",
true);
2873 $info->addMetaDataSections($this->lm->getId(),0, $this->lm->getType());
2877 $this->tpl->setContent($info->getHTML());
2878 return $this->tpl->get();
2883 $this->ctrl->forwardCommand($info);
2896 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2897 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu())
2902 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
2905 $this->tpl->setCurrentBlock(
"ContentStyle");
2908 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2913 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2915 $this->tpl->parseCurrentBlock();
2919 $this->tpl->getStandardTemplate();
2921 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2925 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
2926 "tpl.lm_print_selection.html",
"Modules/LearningModule");
2929 $this->tpl->setTitle($this->lm->getTitle());
2937 $this->ctrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
2938 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
2940 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
2942 if (!is_array(
$_POST[
"item"]))
2944 if (
$_GET[
"obj_id"] !=
"")
2956 foreach ($nodes as $node)
2961 $this->lm_set->get(
"time_scheduled_page_activation"));
2963 if ($node[
"type"] ==
"pg" &&
2969 $text = $img_scr = $img_alt =
"";
2973 switch ($node[
"type"])
2979 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2980 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang);
2983 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
2988 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
2992 $img_alt = $lng->txt(
"icon").
" ".$lng->txt(
"pg");
2997 $text = $this->lm->getTitle();
2999 $img_alt = $lng->txt(
"icon").
" ".$lng->txt(
"obj_lm");
3006 $this->lm->isActiveNumbering(),
3007 $this->lm_set->get(
"time_scheduled_page_activation"), 0,
$this->lang);
3009 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3014 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3018 $img_alt = $lng->txt(
"icon").
" ".$lng->txt(
"st");
3024 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3027 $this->nl->addListNode($node[
"obj_id"], $text, $node[
"parent"], $checked, $disabled,
3028 $img_src, $img_alt);
3033 if (
$_GET[
"obj_id"] > 0 && !$this->lm_tree->isInTree(
$_GET[
"obj_id"]))
3037 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3038 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang);
3041 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3046 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3050 $id =
$_GET[
"obj_id"];
3054 $this->nl->addListNode($id, $text, 0, $checked, $disabled,
3055 $img_src, $img_alt);
3058 $f = $this->form->getHTML();
3062 $tb->addFormButton($lng->txt(
"cont_show_print_view"),
"showPrintView");
3063 $this->tpl->setVariable(
"TOOLBAR", $tb->getHTML());
3065 $this->tpl->setVariable(
"ITEM_SELECTION", $f);
3077 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3083 $op1 =
new ilRadioOption($lng->txt(
"cont_current_page"),
"page");
3084 $radg->addOption($op1);
3085 $op2 =
new ilRadioOption($lng->txt(
"cont_current_chapter"),
"chapter");
3086 $radg->addOption($op2);
3087 $op3=
new ilRadioOption($lng->txt(
"cont_selected_pg_chap"),
"selection");
3088 $radg->addOption($op3);
3090 include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
3093 $op3->addSubItem($nl);
3096 $this->form->addItem($radg);
3098 $this->form->addCommandButton(
"showPrintView", $lng->txt(
"cont_show_print_view"));
3099 $this->form->setOpenTag(
false);
3100 $this->form->setCloseTag(
false);
3102 $this->form->setTitle($lng->txt(
"cont_print_selection"));
3103 $this->form->setFormAction($ilCtrl->getFormAction($this));
3113 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
3115 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu())
3124 if (
$_POST[
"sel_type"] ==
"page")
3126 if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id,
$_POST[
"obj_id"]))
3128 $_POST[
"obj_id"][] = $c_obj_id;
3131 if (
$_POST[
"sel_type"] ==
"chapter" && $c_obj_id > 0)
3134 $path = $this->lm_tree->getPathFull($c_obj_id);
3135 $chap_id =
$path[1][
"child"];
3138 $_POST[
"obj_id"][] = $chap_id;
3151 $style_name = $ilUser->getPref(
"style").
".css";;
3152 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
3156 $this->tpl->setCurrentBlock(
"ContentStyle");
3159 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
3164 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
3166 $this->tpl->parseCurrentBlock();
3169 $this->tpl->setCurrentBlock(
"SyntaxStyle");
3170 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
3172 $this->tpl->parseCurrentBlock();
3175 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.lm_print_view.html",
true);
3178 $this->tpl->setVariable(
"HEADER", $this->lm->getTitle());
3180 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
3182 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
3183 include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
3184 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
3189 $glossary_links = array();
3190 $output_header =
false;
3191 $media_links = array();
3194 if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint())
3198 $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
3199 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3201 $this->lm->getStyleSheetId(),
"lm"));
3205 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3206 $page_object_gui->setOutputMode(
"print");
3207 $page_object_gui->setPresentationTitle(
"");
3208 $page_object_gui->setFileDownloadLink(
"#");
3209 $page_object_gui->setFullscreenLink(
"#");
3210 $page_object_gui->setSourceCodeDownloadScript(
"#");
3211 $footer_page_content = $page_object_gui->showPage();
3214 if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint())
3218 $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
3219 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3221 $this->lm->getStyleSheetId(),
"lm"));
3225 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3226 $page_object_gui->setOutputMode(
"print");
3227 $page_object_gui->setPresentationTitle(
"");
3228 $page_object_gui->setFileDownloadLink(
"#");
3229 $page_object_gui->setFullscreenLink(
"#");
3230 $page_object_gui->setSourceCodeDownloadScript(
"#");
3231 $header_page_content = $page_object_gui->showPage();
3236 if (is_array(
$_POST[
"obj_id"]))
3238 foreach(
$_POST[
"obj_id"] as $k)
3240 if ($k > 0 && !$this->lm_tree->isInTree($k))
3244 $nodes[] = array(
"obj_id" => $k,
"type" =>
"pg",
"free" =>
true);
3252 $ilCtrl->redirect($this,
"showPrintViewSelection");
3255 foreach ($nodes as $node_key => $node)
3259 $this->lm_set->get(
"time_scheduled_page_activation"));
3260 if ($node[
"type"] ==
"pg" && !$active)
3267 if ($node[
"depth"] <= $act_level)
3269 if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"],
$_POST[
"obj_id"]))
3271 $act_level = $node[
"depth"];
3285 if ($node[
"type"] ==
"du")
3287 $output_header =
true;
3291 if ($node[
"type"] ==
"st")
3294 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3303 $this->tpl->setCurrentBlock(
"print_chapter");
3305 $chapter_title = $chap->_getPresentationTitle($node[
"obj_id"],
3306 $this->lm->isActiveNumbering(),
3307 $this->lm_set->get(
"time_scheduled_page_activation"), 0,
$this->lang);
3308 $this->tpl->setVariable(
"CHAP_TITLE",
3313 if ($nodes[$node_key + 1][
"type"] ==
"pg")
3315 $this->tpl->setVariable(
"CHAP_HEADER",
3316 $header_page_content);
3317 $did_chap_page_header =
true;
3321 $this->tpl->parseCurrentBlock();
3322 $this->tpl->setCurrentBlock(
"print_block");
3323 $this->tpl->parseCurrentBlock();
3327 if ($node[
"type"] ==
"pg")
3330 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3338 $this->tpl->setCurrentBlock(
"print_item");
3341 $page_id = $node[
"obj_id"];
3343 $page_object = $page_object_gui->getPageObject();
3344 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3346 $this->lm->getStyleSheetId(),
"lm"));
3351 $lm_pg_obj->setLMId($this->lm->getId());
3354 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3355 $page_object_gui->setOutputMode(
"print");
3356 $page_object_gui->setPresentationTitle(
"");
3358 if ($this->lm->getPageHeader() ==
IL_PAGE_TITLE || $node[
"free"] ===
true)
3361 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3362 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0,
$this->lang);
3366 if ($this->lm->isActiveNumbering())
3368 $chapter_title = trim(substr($chapter_title,
3369 strpos($chapter_title,
" ")));
3372 if ($page_title != $chapter_title)
3374 $page_object_gui->setPresentationTitle($page_title);
3379 $hcont = $header_page_content;
3380 $fcont = $footer_page_content;
3384 if ($did_chap_page_header)
3388 if ($nodes[$node_key + 1][
"type"] ==
"pg" &&
3389 !($nodes[$node_key + 1][
"depth"] <= $act_level
3390 && !in_array($nodes[$node_key + 1][
"obj_id"],
$_POST[
"obj_id"])))
3396 $page_object_gui->setFileDownloadLink(
"#");
3397 $page_object_gui->setFullscreenLink(
"#");
3398 $page_object_gui->setSourceCodeDownloadScript(
"#");
3399 $page_content = $page_object_gui->showPage();
3402 $this->tpl->setVariable(
"CONTENT",
3403 $hcont.$page_content.$fcont);
3407 $this->tpl->setVariable(
"CONTENT",
3408 $hcont.$page_content.$fcont.
"<br />");
3410 $chapter_title =
"";
3411 $this->tpl->parseCurrentBlock();
3412 $this->tpl->setCurrentBlock(
"print_block");
3413 $this->tpl->parseCurrentBlock();
3420 foreach ($int_links as $key => $link)
3422 if ($link[
"type"] ==
"git" &&
3423 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0))
3425 $glossary_links[$key] = $link;
3427 if ($link[
"type"] ==
"mob" &&
3428 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0))
3431 $mob_links[$key] = $link;
3442 $page_object->buildDom();
3443 $links = $page_object->getInternalLinks();
3444 foreach($links as $link)
3446 if ($link[
"Type"] ==
"MediaObject"
3447 && $link[
"TargetFrame"] !=
""
3448 && $link[
"TargetFrame"] !=
"None")
3450 $media_links[] = $link;
3462 if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix())
3464 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
3465 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
3470 foreach($glossary_links as $key => $link)
3473 $terms[$term.
":".$key] = array(
"key" => $key,
"link" => $link,
"term" => $term);
3478 foreach($terms as
$t)
3486 foreach($defs as $def)
3489 if (count($defs) > 1)
3491 $this->tpl->setCurrentBlock(
"def_title");
3492 $this->tpl->setVariable(
"TXT_DEFINITION",
3493 $this->lng->txt(
"cont_definition").
" ".($def_cnt++));
3494 $this->tpl->parseCurrentBlock();
3496 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
3498 $page_gui->setTemplateOutput(
false);
3499 $page_gui->setOutputMode(
"print");
3501 $this->tpl->setCurrentBlock(
"definition");
3502 $page_gui->setFileDownloadLink(
"#");
3503 $page_gui->setFullscreenLink(
"#");
3504 $page_gui->setSourceCodeDownloadScript(
"#");
3505 $output = $page_gui->showPage();
3506 $this->tpl->setVariable(
"VAL_DEFINITION", $output);
3507 $this->tpl->parseCurrentBlock();
3511 $this->tpl->setCurrentBlock(
"term");
3512 $this->tpl->setVariable(
"VAL_TERM",
3514 $this->tpl->parseCurrentBlock();
3519 $this->tpl->setCurrentBlock(
"glossary");
3520 $annex_title = $this->lng->txt(
"cont_annex").
" ".
3521 chr(64+$annex_cnt).
": ".$this->lng->txt(
"glo");
3522 $this->tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
3523 $this->tpl->parseCurrentBlock();
3525 $annexes[] = $annex_title;
3529 if (count($media_links) > 0)
3531 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3532 include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
3534 foreach($media_links as $media)
3536 if (substr($media[
"Target"],0,4) ==
"il__")
3538 $arr = explode(
"_",$media[
"Target"]);
3539 $id = $arr[count($arr) - 1];
3542 $med_item = $med_obj->getMediaItem(
"Standard");
3543 if (is_object($med_item))
3545 if (is_int(strpos($med_item->getFormat(),
"image")))
3547 $this->tpl->setCurrentBlock(
"ref_image");
3550 if ($med_item->getLocationType() ==
"LocalFile")
3552 $this->tpl->setVariable(
"IMG_SOURCE",
3554 "/".$med_item->getLocation());
3558 $this->tpl->setVariable(
"IMG_SOURCE",
3559 $med_item->getLocation());
3562 if ($med_item->getCaption() !=
"")
3564 $this->tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
3568 $this->tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
3570 $this->tpl->parseCurrentBlock();
3578 $this->tpl->setCurrentBlock(
"ref_images");
3579 $annex_title = $this->lng->txt(
"cont_annex").
" ".
3580 chr(64+$annex_cnt).
": ".$this->lng->txt(
"cont_ref_images");
3581 $this->tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
3582 $this->tpl->parseCurrentBlock();
3584 $annexes[] = $annex_title;
3590 $this->tpl->setCurrentBlock(
"print_header");
3591 $this->tpl->setVariable(
"LM_TITLE", $this->lm->getTitle());
3592 if ($this->lm->getDescription() !=
"none")
3594 include_once(
"Services/MetaData/classes/class.ilMD.php");
3595 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
3597 foreach($md_gen->getDescriptionIds() as $id)
3599 $md_des = $md_gen->getDescription($id);
3600 $description = $md_des->getDescription();
3603 $this->tpl->setVariable(
"LM_DESCRIPTION",
3606 $this->tpl->parseCurrentBlock();
3610 foreach ($nodes2 as $node2)
3612 if ($node2[
"type"] ==
"st"
3615 for ($j=1; $j < $node2[
"depth"]; $j++)
3617 $this->tpl->setCurrentBlock(
"indent");
3619 $this->tpl->parseCurrentBlock();
3621 $this->tpl->setCurrentBlock(
"toc_entry");
3622 $this->tpl->setVariable(
"TXT_TOC_TITLE",
3624 $this->lm->isActiveNumbering(),
3625 $this->lm_set->get(
"time_scheduled_page_activation"), 0,
$this->lang));
3626 $this->tpl->parseCurrentBlock();
3631 foreach ($annexes as $annex)
3633 $this->tpl->setCurrentBlock(
"indent");
3635 $this->tpl->parseCurrentBlock();
3636 $this->tpl->setCurrentBlock(
"toc_entry");
3637 $this->tpl->setVariable(
"TXT_TOC_TITLE", $annex);
3638 $this->tpl->parseCurrentBlock();
3641 $this->tpl->setCurrentBlock(
"toc");
3642 $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
3643 $this->tpl->parseCurrentBlock();
3645 $this->tpl->setCurrentBlock(
"print_start_block");
3646 $this->tpl->parseCurrentBlock();
3650 include_once
'Services/MetaData/classes/class.ilMD.php';
3651 $md =
new ilMD($this->lm->getId(),0, $this->lm->getType());
3652 if(is_object($lifecycle = $md->getLifecycle()))
3654 $sep = $author =
"";
3655 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
3657 $md_con = $lifecycle->getContribute($con_id);
3658 if ($md_con->getRole() ==
"Author")
3660 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
3662 $md_ent = $md_con->getEntity($ent_id);
3663 $author = $author.$sep.$md_ent->getEntity();
3670 $this->lng->loadLanguageModule(
"meta");
3671 $this->tpl->setCurrentBlock(
"author");
3672 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
3673 $this->tpl->setVariable(
"LM_AUTHOR", $author);
3674 $this->tpl->parseCurrentBlock();
3680 if (is_object($md_rights = $md->getRights()))
3682 $copyright = $md_rights->getDescription();
3683 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
3686 if ($copyright !=
"")
3688 $this->lng->loadLanguageModule(
"meta");
3689 $this->tpl->setCurrentBlock(
"copyright");
3690 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
3691 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
3692 $this->tpl->parseCurrentBlock();
3696 $this->tpl->show(
false);
3706 require_once(
"./Modules/File/classes/class.ilObjFile.php");
3707 $fileObj =
new ilObjFile($file_id,
false);
3708 $fileObj->sendFile();
3717 require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
3719 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
3727 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu())
3733 $this->tpl->setCurrentBlock(
"ContentStyle");
3736 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
3741 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
3743 $this->tpl->parseCurrentBlock();
3747 $this->tpl->getStandardTemplate();
3749 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
3754 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_download_list.html",
"Modules/LearningModule");
3757 $this->tpl->setTitle($this->lm->getTitle());
3767 include_once
'Services/MetaData/classes/class.ilMD.php';
3768 $md =
new ilMD($this->lm->getId(),0, $this->lm->getType());
3769 if (is_object($md_rights = $md->getRights()))
3771 $copyright = $md_rights->getDescription();
3773 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
3776 if ($copyright !=
"")
3778 $this->lng->loadLanguageModule(
"meta");
3779 $this->tpl->setCurrentBlock(
"copyright");
3780 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
3781 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
3782 $this->tpl->parseCurrentBlock();
3787 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
3791 $this->tpl->addBlockfile(
"DOWNLOAD_TABLE",
"download_table",
"tpl.table.html");
3794 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/LearningModule");
3796 $export_files = array();
3797 $types = array(
"xml",
"html",
"scorm");
3798 foreach($types as $type)
3800 if ($this->lm->getPublicExportFile($type) !=
"")
3802 if (is_file($this->lm->getExportDirectory($type).
"/".
3803 $this->lm->getPublicExportFile($type)))
3805 $dir = $this->lm->getExportDirectory($type);
3806 $size = filesize($this->lm->getExportDirectory($type).
"/".
3807 $this->lm->getPublicExportFile($type));
3808 $export_files[] = array(
"type" => $type,
3809 "file" => $this->lm->getPublicExportFile($type),
3817 $tbl->setTitle($this->lng->txt(
"download"));
3819 $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
3820 $this->lng->txt(
"cont_file"),
3821 $this->lng->txt(
"size"), $this->lng->txt(
"date"),
3824 $cols = array(
"format",
"file",
"size",
"date",
"download");
3825 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
3826 "cmd" =>
"showDownloadList",
"cmdClass" => strtolower(get_class($this)));
3827 $tbl->setHeaderVars($cols, $header_params);
3828 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
3829 $tbl->disable(
"sort");
3832 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
3833 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
3834 $tbl->setLimit(
$_GET[
"limit"]);
3835 $tbl->setOffset(
$_GET[
"offset"]);
3836 $tbl->setMaxCount($this->maxcount);
3842 $tbl->disable(
"footer");
3844 $tbl->setMaxCount(count($export_files));
3845 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
3847 if(count($export_files) > 0)
3851 foreach($export_files as $exp_file)
3853 if (!$exp_file[
"size"] > 0)
3858 $this->tpl->setCurrentBlock(
"tbl_content");
3859 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
3862 $this->tpl->setVariable(
"CSS_ROW", $css_row);
3864 include_once(
"./Services/Utilities/classes/class.ilFormat.php");
3866 $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
3867 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
3869 $file_arr = explode(
"__", $exp_file[
"file"]);
3870 include_once(
"./Services/Calendar/classes/class.ilDatePresentation.php");
3874 $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
3875 $this->ctrl->setParameter($this,
"type", $exp_file[
"type"]);
3876 $this->tpl->setVariable(
"LINK_DOWNLOAD",
3877 $this->ctrl->getLinkTarget($this,
"downloadExportFile"));
3879 $this->tpl->parseCurrentBlock();
3896 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu())
3901 $file = $this->lm->getPublicExportFile(
$_GET[
"type"]);
3902 if ($this->lm->getPublicExportFile(
$_GET[
"type"]) !=
"")
3904 $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
3905 if (is_file($dir.
"/".
$file))
3924 return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$a_ref_id.
"&obj_id=".$a_obj_id.
"&focus_id=".
3925 $a_obj_id.
"&focus_return=".$a_return_ref_id;
3932 function getLink($a_ref_id, $a_cmd =
"", $a_obj_id =
"", $a_frame =
"", $a_type =
"",
3933 $a_back_link =
"append", $a_anchor =
"", $a_srcstring =
"")
3944 $back_pg =
$_GET[
"back_pg"];
3945 if ($a_obj_id !=
"" && !$this->lm_tree->isInTree($a_obj_id) && $cur_page_id !=
"" &&
3946 $a_back_link ==
"append")
3950 $back_pg = $cur_page_id.
":".$back_pg;
3954 $back_pg = $cur_page_id;
3959 if ($a_back_link ==
"reduce")
3961 $limpos = strpos(
$_GET[
"back_pg"],
":");
3965 $back_pg = substr($back_pg, strpos($back_pg,
":") + 1);
3972 else if ($a_back_link !=
"keep")
3981 if (
$_GET[
"from_page"] ==
"")
3983 $this->ctrl->setParameter($this,
"from_page", $cur_page_id);
3989 if (!in_array($a_frame, array(
"",
"_blank")))
3991 $this->ctrl->setParameter($this,
"from_page",
$_GET[
"from_page"]);
3995 if ($a_anchor !=
"")
3997 $this->ctrl->setParameter($this,
"anchor", rawurlencode($a_anchor));
3999 if ($a_srcstring !=
"")
4001 $this->ctrl->setParameter($this,
"srcstring", $a_srcstring);
4006 $link = $this->ctrl->getLinkTarget($this,
"fullscreen",
"",
false,
false);
4013 $this->ctrl->setParameter($this,
"back_pg", $back_pg);
4017 $this->ctrl->setParameter($this,
"frame", $a_frame);
4019 if ($a_obj_id !=
"")
4024 $this->ctrl->setParameter($this,
"mob_id", $a_obj_id);
4028 $this->ctrl->setParameter($this,
"obj_id", $a_obj_id);
4029 $link.=
"&obj_id=".$a_obj_id;
4035 $this->ctrl->setParameter($this,
"obj_type", $a_type);
4037 $link = $this->ctrl->getLinkTarget($this, $a_cmd, $a_anchor);
4040 $this->ctrl->setParameter($this,
"frame",
"");
4041 $this->ctrl->setParameter($this,
"obj_id",
"");
4042 $this->ctrl->setParameter($this,
"mob_id",
"");
4050 case "downloadFile":
4054 $link =
"fullscreen.html";
4059 if ($a_obj_id ==
"")
4061 $a_obj_id = $this->lm_tree->getRootId();
4062 $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id,
"pg");
4063 $a_obj_id = $pg_node[
"obj_id"];
4065 if ($a_type ==
"StructureObject")
4067 $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id,
"pg");
4068 $a_obj_id = $pg_node[
"obj_id"];
4070 if ($a_frame !=
"" && $a_frame !=
"_blank")
4072 if ($a_frame !=
"toc")
4074 $link =
"frame_".$a_obj_id.
"_".$a_frame.
".html";
4078 $link =
"frame_".$a_frame.
".html";
4086 $link =
"lm_pg_".$nid.
".html";
4090 $link =
"lm_pg_".$a_obj_id.
".html";
4096 $link =
"term_".$a_obj_id.
".html";
4100 $link =
"media_".$a_obj_id.
".html";
4108 $this->ctrl->clearParameters($this);
4122 $this->tpl->setCurrentBlock(
"ContentStyle");
4125 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
4130 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
4132 $this->tpl->parseCurrentBlock();
4134 $tpl =
new ilTemplate(
"tpl.page_message_screen.html",
true,
true,
"Modules/LearningModule");
4135 $tpl->setVariable(
"TXT_PAGE_NO_PUBLIC_ACCESS", $a_content);
4137 $this->tpl->setVariable(
"PAGE_CONTENT",
$tpl->get());
4163 $target = $this->ctrl->getLinkTarget($this,
"");
4165 return $this->ctrl->getLinkTarget($this,
"");
4181 $this->offline_directory = $offdir;
4202 $file = $directory.
"/".$title;
4203 if (!($fp = @fopen(
$file,
"w+")))
4205 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
4206 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
4216 $this->tpl->setHeaderPageTitle($this->lm->getTitle());
4217 $this->tpl->fillWindowTitle();
4229 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
4230 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
4233 return new ilLMPageGUI($a_id, 0,
false, $this->lang);
4246 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
4249 return new ilLMPage($a_id, 0, $this->lang);
4259 $exp = $this->
ilTOC(
true);
4261 echo $exp->getHTML().
4262 "<script>".$exp->getOnLoadCode().
"</script>";