4require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
5require_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
6require_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']) &&
120 $this->needs_to_be_purchased)
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");
185 case "ilglossarydefpagegui":
186 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
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"]);
503 switch($this->lm->getType())
509 $content = $this->
ilPage($child);
518 case "ilLMNavigation":
531 $this->
ilJavaScript($child_attr[
"inline"], $child_attr[
"file"],
532 $child_attr[
"location"]);
563 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
568 $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
569 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
570 $close_call =
"il.LearningModule.setCloseHTML('".ilGlyphGUI::get(
ilGlyphGUI::CLOSE).
"');";
571 $this->tpl->addOnLoadCode($close_call);
576 if (
$_GET[
"frame"] ==
"")
578 include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
580 $last_frame_url = $store->get(
"cf_".$this->lm->getId());
581 if ($last_frame_url !=
"")
583 $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('".$last_frame_url.
"', 'center_bottom');");
586 if (in_array($layout, array(
"toc2windyn")))
588 $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('".
589 $ilCtrl->getLinkTarget($this,
"saveFrameUrl",
"",
false,
false).
"');
590 il.LearningModule.openInitFrames();
593 $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('".
594 $ilCtrl->getLinkTarget($this,
"refreshToc",
"",
false,
false).
"');
600 $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
601 $this->tpl->fillJavaScriptFiles();
602 $this->tpl->fillScreenReaderFocus();
604 $this->tpl->fillCssFiles();
609 $this->tpl->resetJavascript();
610 $this->tpl->resetCss();
611 $this->tpl->setBodyClass(
"ilLMNoMenu");
613 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
616 if ($f[
"type"] ==
"js")
618 $this->tpl->addJavascript($f[
"target"]);
620 if ($f[
"type"] ==
"css")
622 $this->tpl->addCSS($f[
"target"]);
625 $this->tpl->fillJavaScriptFiles(
true);
626 $this->tpl->fillCssFiles(
true);
630 $this->tpl->fillBodyClass();
640 $this->tpl->fillTabs();
641 if ($this->fill_on_load_code)
643 $this->tpl->fillOnLoadCode();
645 $content = $this->tpl->get();
646 $content = str_replace(
"{",
"{", $content);
647 $content = str_replace(
"}",
"}", $content);
649 header(
'Content-type: text/html; charset=UTF-8');
654 $this->tpl->fillLeftNav();
655 $this->tpl->fillOnLoadCode();
656 $content = $this->tpl->get();
670 include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
672 if (
$_GET[
"url"] !=
"")
674 $store->set(
"cf_".$this->lm->getId(),
$_GET[
"url"]);
678 $store->set(
"cf_".$this->lm->getId(),
$_GET[
"url"]);
690 if (
$_GET[
"frame"] !=
"_blank")
704 if (
$_GET[
"frame"] !=
"_blank")
710 $this->tpl =
new ilTemplate(
"tpl.glossary_term_output.html",
true,
true,
true);
721 $style_name =
$ilUser->getPref(
"style").
".css";;
722 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
732 return $this->tpl->get();
746 $this->tpl->touchBlock(
"pg_intro");
747 $this->tpl->touchBlock(
"pg_outro");
755 $ilMainMenu->setLoginTargetPar(
"pg_".$page_id.
"_".$this->lm->getRefId());
760 $this->tpl->touchBlock(
"pg_intro");
761 $this->tpl->touchBlock(
"pg_outro");
762 $this->tpl->setBodyClass(
"std");
763 $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
769 function ilTOC($a_get_explorer =
false)
771 include_once(
"./Modules/LearningModule/classes/class.ilLMTOCExplorerGUI.php");
774 if (!$exp->handleCommand())
778 if ($this->deactivated_page)
780 $page_id =
$_GET[
"obj_id"];
784 $exp->setPathOpen((
int) $page_id);
787 if ($this->chapter_has_no_active_page &&
790 $exp->setHighlightNode(
$_GET[
"obj_id"]);
794 if ($this->lm->getTOCMode() ==
"pages")
796 if ($this->deactivated_page)
798 $exp->setHighlightNode(
$_GET[
"obj_id"]);
802 $exp->setHighlightNode($page_id);
807 $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
812 $exp->setOfflineMode(
true);
821 $this->tpl->setCurrentBlock(
"il_toc");
822 $this->tpl->setVariable(
"EXPLORER", $exp->getHTML());
823 $this->tpl->parseCurrentBlock();
833 $this->tpl->setVariable(
"MENU", $this->lm_gui->setilLMMenu($this->offlineMode()
834 ,$this->getExportFormat(),
"content",
false,
true, $this->getCurrentPageId()));
842 $this->tpl->setCurrentBlock(
"header_image");
845 $this->tpl->setVariable(
"IMG_HEADER",
"./images/icon_lm.svg");
851 $this->tpl->parseCurrentBlock();
852 $this->tpl->setCurrentBlock(
"lm_head");
853 $this->tpl->setVariable(
"HEADER", $this->lm->getTitle());
854 $this->tpl->parseCurrentBlock();
865 if ($this->lm->getType() ==
"dbk" && $this->abstract)
870 $showViewInFrameset =
true;
872 if ($showViewInFrameset)
878 $buttonTarget =
"_top";
882 include_once(
"./Services/UICore/classes/class.ilTemplate.php");
883 $tpl_menu =
new ilTemplate(
"tpl.lm_sub_menu.html",
true,
true,
true);
894 if ($rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
896 $tpl_menu->setCurrentBlock(
"edit_page");
898 $tpl_menu->setVariable(
"EDIT_LINK", ILIAS_HTTP_PATH.
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=".
$_GET[
"ref_id"].
899 "&obj_id=".$page_id.
"&to_page=1");
900 $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
901 $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
902 $tpl_menu->parseCurrentBlock();
907 include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
909 $page_id.
"_".$this->lm->getRefId(),
913 $title = $this->lm->getTitle();
915 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
916 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
919 $title.=
": ".$pg_title;
922 $plinkgui->setTitle($title);
924 $tpl_menu->setCurrentBlock(
"perma_link");
925 $tpl_menu->setVariable(
"PERMA_LINK", $plinkgui->getHTML());
926 $tpl_menu->parseCurrentBlock();
930 $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
948 global $ilAccess,
$tpl;
950 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
952 $ilAccess, $this->lm->getType(),
$_GET[
"ref_id"], $this->lm->getId());
955 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
956 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
957 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
958 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
960 $lg = $dispatcher->initHeaderAction();
961 $lg->enableNotes(
true);
962 $lg->enableComments($this->lm->publicNotes(),
false);
964 if($this->lm->hasRating())
966 $lg->enableRating(
true, $this->lng->txt(
"lm_rating"),
false,
967 array(
"ilcommonactiondispatchergui",
"ilratinggui"));
972 $this->tpl->setVariable(
"HEAD_ACTION", $lg->getHeaderAction());
977 return $lg->getHeaderAction().
978 $tpl->getOnLoadCodeForAsynch();
991 if ($this->lm->getType() ==
"dbk" && $this->abstract)
1004 if (!$ilSetting->get(
"disable_notes"))
1011 if ($ilSetting->get(
"disable_comments"))
1016 if (!$this->lm->publicNotes())
1021 $next_class = $this->ctrl->getNextClass($this);
1023 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1030 $notes_gui =
new ilNoteGUI($this->lm->getId(), $this->getCurrentPageId(),
"pg");
1032 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) &&
1035 $notes_gui->enablePublicNotesDeletion(
true);
1038 $this->ctrl->setParameter($this,
"frame",
$_GET[
"frame"]);
1039 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1041 $notes_gui->enablePrivateNotes();
1042 if ($this->lm->publicNotes())
1044 $notes_gui->enablePublicNotes();
1047 if ($next_class ==
"ilnotegui")
1049 $html = $this->ctrl->forwardCommand($notes_gui);
1053 $html = $notes_gui->getNotesHTML();
1055 $this->tpl->setVariable(
"NOTES", $html);
1064 global $ilLocator, $tree,
$ilCtrl;
1066 require_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
1068 if (empty(
$_GET[
"obj_id"]))
1070 $a_id = $this->lm_tree->getRootId();
1074 $a_id =
$_GET[
"obj_id"];
1077 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1079 if (!$this->lm->cleanFrames())
1081 $frame_param =
$_GET[
"frame"];
1092 $frame_target =
"_top";
1097 $ilLocator->addItem(
"...",
"");
1099 $par_id = $tree->getParentId(
$_GET[
"ref_id"]);
1100 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $par_id);
1101 $ilLocator->addItem(
1103 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
1105 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1109 $ilLocator->setOffline(
true);
1112 if($this->lm_tree->isInTree($a_id))
1114 $path = $this->lm_tree->getPathFull($a_id);
1118 if (
$row[
"type"] !=
"pg")
1120 if(
$row[
"child"] != $this->lm_tree->getRootId())
1122 $ilLocator->addItem(
1125 $this->lm->isActiveNumbering(),
1126 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang),
1128 $this->getLink(
$_GET[
"ref_id"],
"layout",
$row[
"child"], $frame_param,
"StructureObject"),
1133 $ilLocator->addItem(
1135 $this->getLink(
$_GET[
"ref_id"],
"layout",
"", $frame_param),
1136 $frame_target,
$_GET[
"ref_id"]);
1144 $ilLocator->addItem(
1145 $this->lm->getTitle(),
1146 $this->getLink(
$_GET[
"ref_id"],
"layout",
"",
$_GET[
"frame"]));
1148 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
1151 $ilLocator->addItem(
1152 $lm_obj->getTitle(),
1153 $this->getLink(
$_GET[
"ref_id"],
"layout", $a_id, $frame_param),
1159 $debug =
"DEBUG: <font color=\"red\">".$this->type.
"::".$this->
id.
"::".
$_GET[
"cmd"].
"</font><br/>";
1165 $this->tpl->setLocator();
1177 if (!$this->
offlineMode() && $this->current_page_id !==
false)
1182 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1184 $this->chapter_has_no_active_page =
false;
1185 $this->deactivated_page =
false;
1188 if(empty(
$_GET[
"obj_id"]))
1190 $obj_id = $this->lm_tree->getRootId();
1194 $obj_id =
$_GET[
"obj_id"];
1196 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1201 $this->deactivated_page =
true;
1206 if (!$this->lm_tree->isInTree($obj_id))
1211 $curr_node = $this->lm_tree->getNodeData($obj_id);
1214 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1216 if ($curr_node[
"type"] ==
"pg" &&
1219 $page_id = $curr_node[
"obj_id"];
1226 while($succ_node && !$active)
1228 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
"pg");
1229 $page_id = $succ_node[
"obj_id"];
1231 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1234 if ($succ_node[
"type"] !=
"pg")
1236 $this->chapter_has_no_active_page =
true;
1241 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
1242 $this->lm_gui->object->getPublicAccessMode() ==
'selected')
1246 while ($public ===
false && $page_id > 0)
1248 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
'pg');
1249 $page_id = $succ_node[
'obj_id'];
1255 if ($this->lm_tree->isInTree($page_id))
1257 $path = $this->lm_tree->getPathId($page_id);
1260 $this->chapter_has_no_active_page =
true;
1265 $this->current_page_id = $page_id;
1272 $this->tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
true);
1274 $this->tpl->setVariable(
"MENU",$this->lm_gui->setilCitationMenu());
1276 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1278 $this->pg_obj = $this->
getLMPage($page_id);
1279 $xml = $this->pg_obj->getXMLContent();
1280 $this->lm_gui->showCitation($xml);
1288 if (!is_object($this->layout_doc))
1293 $path =
"/ilLayout/ilLinkTargets/LinkTarget";
1296 for ($i = 0; $i < count(
$res->nodeset); $i++)
1298 $type =
$res->nodeset[$i]->get_attribute(
"Type");
1299 $frame =
$res->nodeset[$i]->get_attribute(
"Frame");
1300 $onclick =
$res->nodeset[$i]->get_attribute(
"OnClick");
1301 $targets[$type] = array(
"Type" => $type,
"Frame" => $frame,
"OnClick" => $onclick);
1313 function ilPage(&$a_page_node, $a_page_id = 0)
1319 $ilHelp->setScreenIdComponent(
"lm");
1320 $ilHelp->setScreenId(
"content");
1321 $ilHelp->setSubScreenId(
"content");
1323 $this->fill_on_load_code =
true;
1326 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
1327 $this->lm_gui->object->getPublicAccessMode() ==
'selected')
1344 if ($this->lm->getRestrictForwardNavigation())
1355 require_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
1356 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
1359 if ($a_page_id == 0)
1367 include_once
'./Services/Search/classes/class.ilUserSearchCache.php';
1370 $search_string = $cache->getQuery();
1373 if(is_array($search_string))
1375 $search_string = $search_string[
"lom_content"];
1378 include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
1379 include_once(
"./Services/Search/classes/class.ilQueryParser.php");
1383 $words = $p->getQuotedWords();
1384 if (is_array($words))
1386 foreach ($words as $w)
1392 $this->fill_on_load_code =
true;
1397 $page_id = $a_page_id;
1401 $this->tpl->setCurrentBlock(
"ContentStyle");
1404 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1409 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
1411 $this->tpl->parseCurrentBlock();
1414 if ($this->chapter_has_no_active_page &&
1417 $mtpl =
new ilTemplate(
"tpl.no_content_message.html",
true,
true,
1418 "Modules/LearningModule");
1419 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_no_page_in_chapter"));
1422 $mtpl->setVariable(
"ITEM_TITLE",
1424 $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
1425 return $mtpl->get();
1429 if ($this->deactivated_page)
1431 $mtpl =
new ilTemplate(
"tpl.no_content_message.html",
true,
true,
1432 "Modules/LearningModule");
1433 $m = $this->lng->txt(
"cont_page_currently_deactivated");
1435 if ($act_data[
"show_activation_info"] &&
1438 $m.=
"<p>".sprintf($this->lng->txt(
"cont_page_activation_on"),
1443 $mtpl->setVariable(
"MESSAGE", $m);
1446 $mtpl->setVariable(
"ITEM_TITLE",
1448 $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
1449 return $mtpl->get();
1454 if ($this->focus_id > 0)
1456 $path = $this->lm_tree->getPathId($page_id);
1459 if (!in_array($this->focus_id,
$path))
1461 $mtpl =
new ilTemplate(
"tpl.out_of_focus_message.html",
true,
true,
1462 "Modules/LearningModule");
1463 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message"));
1464 $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
1468 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
1469 $this->ctrl->setParameter($this,
"obj_id", $this->focus_id);
1470 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this,
"layout"));
1471 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1475 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
1476 include_once(
"./Services/Link/classes/class.ilLink.php");
1480 $this->ctrl->setParameter($this,
"focus_id",
"");
1481 $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this,
"layout"));
1482 $this->ctrl->setParameter($this,
"focus_id",
$_GET[
"focus_id"]);
1484 $focus_mess = $mtpl->get();
1494 if ($sp == 0 || !in_array($this->focus_id, $path2))
1496 $mtpl =
new ilTemplate(
"tpl.out_of_focus_message.html",
true,
true,
1497 "Modules/LearningModule");
1498 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message_last_page"));
1499 $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
1503 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
1504 $this->ctrl->setParameter($this,
"obj_id", $this->focus_id);
1505 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this,
"layout"));
1506 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1510 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
1511 include_once(
"./Services/Link/classes/class.ilLink.php");
1515 $this->ctrl->setParameter($this,
"focus_id",
"");
1516 $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this,
"layout"));
1517 $this->ctrl->setParameter($this,
"focus_id",
$_GET[
"focus_id"]);
1519 $focus_mess = $mtpl->get();
1527 $cont = $this->lng->txt(
"cont_no_page");
1528 $this->tpl->setVariable(
"PAGE_CONTENT", $cont);
1535 $page_object = $page_object_gui->getPageObject();
1536 $page_object->buildDom();
1537 $page_object->registerOfflineHandler($this);
1539 $int_links = $page_object->getInternalLinks();
1543 $page_object_gui->setTemplateOutput(
false);
1546 $ilUser->setDesktopItemParameters($this->lm->getRefId(), $this->lm->getType(), $page_id);
1549 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
1558 $lm_pg_obj->setLMId($this->lm->getId());
1560 $page_object_gui->setLinkXML($link_xml);
1564 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
1567 if ($page_id == 0 || ($page_id != $this->lm->getHeaderPage() &&
1568 $page_id != $this->lm->getFooterPage()))
1570 $page_object_gui->setPresentationTitle(
1572 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
1573 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang));
1576 if (
$ilUser->getId() != ANONYMOUS_USER_ID && $page_id != 0 && !$this->offlineMode())
1583 $page_object_gui->setEnabledPageFocus(
false);
1584 $page_object_gui->getPageConfig()->setEnableSelfAssessment(
false);
1588 $page_object_gui->setLinkParams(
"ref_id=".$this->lm->getRefId());
1589 $page_object_gui->setTemplateTargetVar(
"PAGE_CONTENT");
1593 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1596 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1601 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1602 "syntaxhighlight.css");
1604 $this->tpl->parseCurrentBlock();
1607 $ret = $page_object_gui->presentation($page_object_gui->getOutputMode());
1610 if ($this->lm->getHeaderPage() > 0 &&
1611 $page_id != $this->lm->getHeaderPage() &&
1612 ($page_id == 0 || $page_id != $this->lm->getFooterPage()))
1616 $head = $this->
ilPage($a_page_node, $this->lm->getHeaderPage());
1621 if ($this->lm->getFooterPage() > 0 &&
1622 $page_id != $this->lm->getFooterPage() &&
1623 ($page_id == 0 || $page_id != $this->lm->getHeaderPage()))
1627 $foot = $this->
ilPage($a_page_node, $this->lm->getFooterPage());
1633 if($this->lm->hasRatingPages())
1635 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
1637 $rating_gui->setObject($this->lm->getId(),
"lm", $page_id,
"lm");
1638 $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1645 $this->ctrl->setParameter($this,
"pgid", $page_id);
1646 $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('".
1647 $this->ctrl->getLinkTarget($this,
"updatePageRating",
"",
true,
false).
1649 $this->ctrl->setParameter($this,
"pgid",
"");
1651 $rating =
'<div id="ilrtrpg" style="text-align:right">'.
1652 $rating_gui->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);").
1656 $this->tpl->setVariable(
"PAGE_CONTENT", $rating.$head.$focus_mess.$ret.$foot);
1658 return $head.$focus_mess.$ret.$foot;
1665 $pg_id =
$_GET[
"pgid"];
1666 if(!$this->ctrl->isAsynch() || !$pg_id)
1671 include_once
'./Services/Rating/classes/class.ilRating.php';
1672 $rating = (int)
$_POST[
"rating"];
1681 $pg_id,
"lm",
$ilUser->getId());
1684 include_once
'./Services/Rating/classes/class.ilRatingGUI.php';
1686 $rating->setObject($this->lm->getId(),
"lm", $pg_id,
"lm",
$ilUser->getId());
1687 $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1689 echo $rating->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);");
1691 echo $this->tpl->getOnLoadCodeForAsynch();
1703 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1705 $this->lm->getStyleSheetId(),
"lm"));
1708 $a_page_gui->setOutputMode(
"presentation");
1709 $this->fill_on_load_code =
true;
1713 $a_page_gui->setOutputMode(
"offline");
1715 $this->fill_on_load_code =
false;
1717 $a_page_gui->setFileDownloadLink($this->
getLink(
$_GET[
"ref_id"],
"downloadFile"));
1718 $a_page_gui->setFullscreenLink($this->
getLink(
$_GET[
"ref_id"],
"fullscreen"));
1732 $this->tpl->setCurrentBlock(
"ContentStyle");
1735 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1740 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
1742 $this->tpl->parseCurrentBlock();
1744 $this->tpl->addBlockFile(
"PAGE_CONTENT",
"pg_content",
"tpl.page_preconditions.html",
true);
1747 include_once(
"./Services/Repository/classes/class.ilRepositoryExplorer.php");
1748 foreach($conds as $cond)
1752 $this->tpl->setCurrentBlock(
"condition");
1753 $this->tpl->setVariable(
"ROWCOL", $rc = ($rc !=
"tblrow2") ?
"tblrow2" :
"tblrow1");
1755 $this->tpl->setVariable(
"LINK_ITEM", $obj_link);
1756 $this->tpl->setVariable(
"FRAME_ITEM", $obj_frame);
1757 if ($cond[
"operator"] ==
"passed")
1759 $cond_str = $this->lng->txt(
"passed");
1763 $cond_str = $cond[
"operator"];
1765 $this->tpl->setVariable(
"VAL_CONDITION", $cond_str.
" ".$cond[
"value"]);
1766 $this->tpl->parseCurrentBlock();
1768 $this->tpl->setCurrentBlock(
"pg_content");
1770 $this->tpl->setVariable(
"TXT_MISSING_PRECONDITIONS",
1771 sprintf($this->lng->txt(
"cont_missing_preconditions"),
1773 $this->tpl->setVariable(
"TXT_ITEM", $this->lng->txt(
"item"));
1774 $this->tpl->setVariable(
"TXT_CONDITION", $this->lng->txt(
"condition"));
1777 $parent = $this->lm_tree->getParentId($topchap);
1778 $childs = $this->lm_tree->getChildsByType($parent,
"st");
1781 foreach($childs as $child)
1783 if ($child[
"child"] == $topchap)
1789 $succ_node = $this->lm_tree->fetchSuccessorNode($child[
"child"],
"pg");
1792 if($succ_node !=
"")
1794 $framestr = (!empty(
$_GET[
"frame"]))
1795 ?
"frame=".
$_GET[
"frame"].
"&"
1798 $showViewInFrameset =
true;
1799 $link =
"<br /><a href=\"".
1800 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"],
$_GET[
"frame"]).
1801 "\">".$this->lng->txt(
"cont_skip_chapter").
"</a>";
1802 $this->tpl->setVariable(
"LINK_SKIP_CHAPTER", $link);
1805 $this->tpl->parseCurrentBlock();
1817 $showViewInFrameset =
true;
1819 if ($a_layoutframes ==
"")
1821 $a_layoutframes = array();
1823 $link_info =
"<IntLinkInfos>";
1824 foreach ($a_int_links as $int_link)
1826 $target = $int_link[
"Target"];
1827 if (substr($target, 0, 4) ==
"il__")
1831 $type = $int_link[
"Type"];
1832 $targetframe = ($int_link[
"TargetFrame"] !=
"")
1833 ? $int_link[
"TargetFrame"]
1837 $anc = $anc_add =
"";
1838 if ($int_link[
"Anchor"] !=
"")
1840 $anc = $int_link[
"Anchor"];
1841 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1847 case "StructureObject":
1849 if ($lm_id == $this->lm->getId() ||
1850 ($targetframe !=
"None" && $targetframe !=
"New"))
1852 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1856 $nframe = ($ltarget ==
"")
1861 if ($showViewInFrameset) {
1882 if ($type ==
"PageObject")
1884 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1888 $href =
"./goto.php?target=st_".$target_id;
1893 if ($type ==
"PageObject")
1895 $href = ILIAS_HTTP_PATH.
"/goto.php?target=pg_".
$target_id.$anc_add.
"&client_id=".CLIENT_ID;
1899 $href = ILIAS_HTTP_PATH.
"/goto.php?target=st_".
$target_id.
"&client_id=".CLIENT_ID;
1902 if ($targetframe !=
"New")
1908 $ltarget =
"_blank";
1913 case "GlossaryItem":
1914 if ($targetframe ==
"None")
1916 $targetframe =
"Glossary";
1918 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1919 $nframe = ($ltarget ==
"")
1927 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1928 $nframe = ($ltarget ==
"")
1935 case "RepositoryItem":
1940 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1944 $href = ILIAS_HTTP_PATH.
"/goto.php?target=".$obj_type.
"_".
$target_id.
"&client_id=".CLIENT_ID;
1950 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1958 $ilCtrl->setParameter($this,
"file_id",
"il__file_".
$target_id);
1959 $href =
$ilCtrl->getLinkTarget($this,
"downloadFile");
1960 $ilCtrl->setParameter($this,
"file_id",
"");
1961 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1966 $anc_par =
'Anchor="'.$anc.
'"';
1968 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
1969 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
1980 $link_info.=
"</IntLinkInfos>";
1989 $link_info =
"<LinkTargets>";
1992 $link_info.=
"<LinkTarget TargetFrame=\"".$t[
"Type"].
"\" LinkTarget=\"".
$t[
"Frame"].
"\" OnClick=\"".
$t[
"OnClick"].
"\" />";
1994 $link_info.=
"</LinkTargets>";
2005 require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
2009 $this->tpl->setCurrentBlock(
"ContentStyle");
2012 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2017 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2019 $this->tpl->parseCurrentBlock();
2022 $this->tpl->setCurrentBlock(
"SyntaxStyle");
2026 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
2031 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
2032 "syntaxhighlight.css");
2034 $this->tpl->parseCurrentBlock();
2036 $int_links = $term_gui->getInternalLinks();
2039 $term_gui->setLinkXML($link_xml);
2044 $ilCtrl->setParameter($this,
"pg_type",
"glo");
2046 $term_gui->output($this->
offlineMode(), $this->tpl);
2052 $ilCtrl->setParameter($this,
"pg_type",
"");
2063 $this->tpl->setCurrentBlock(
"ContentStyle");
2066 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2071 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2073 $this->tpl->parseCurrentBlock();
2084 $style_name =
$ilUser->getPref(
"style").
".css";;
2085 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
2088 $this->tpl->setCurrentBlock(
"ilMedia");
2095 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2097 if (!empty (
$_GET[
"pg_id"]))
2099 require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2101 $pg_obj->buildDom();
2106 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2127 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2128 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2143 $mode = (
$_GET[
"cmd"] ==
"fullscreen")
2148 $this->
getLink($this->lm->getRefId(),
"fullscreen");
2149 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2150 'link_params' =>
"ref_id=".$this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
2151 'ref_id' => $this->lm->getRefId(),
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
2152 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
2157 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
2160 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
2169 if ($a_inline !=
"")
2171 $js_tpl =
new ilTemplate($a_inline,
true,
false, $a_location);
2172 $js = $js_tpl->get();
2173 $this->tpl->setVariable(
"INLINE_JS", $js);
2198 if ($this->chapter_has_no_active_page &&
2201 $c_id =
$_GET[
"obj_id"];
2205 if ($this->deactivated_page)
2207 $c_id =
$_GET[
"obj_id"];
2216 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
2217 $c_id = $succ_node[
"obj_id"];
2220 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2222 if ($succ_node[
"obj_id"] > 0 &&
2223 (
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2224 ( $this->lm->getPublicAccessMode() ==
"selected" &&
2229 else if ($succ_node[
"obj_id"] > 0 && !$active)
2233 if ($act_data[
"show_activation_info"] &&
2251 return $succ_node[
"obj_id"];
2265 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2267 include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
2277 if(!$this->lm_tree->isInTree($page_id))
2283 $limpos = strpos(
$_GET[
"back_pg"],
":");
2286 $back_pg = substr(
$_GET[
"back_pg"], 0, $limpos);
2290 $back_pg =
$_GET[
"back_pg"];
2292 if (!$this->lm->cleanFrames())
2295 $this->
getLink($this->lm->getRefId(),
"layout", $back_pg,
$_GET[
"frame"],
2302 $this->
getLink($this->lm->getRefId(),
"layout", $back_pg,
"",
2304 $back_target =
'target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2308 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
2309 $this->tpl->setVariable(
"IMG_PREV", $back_img);
2310 $this->tpl->setVariable(
"HREF_PREV", $back_href);
2311 $this->tpl->setVariable(
"FRAME_PREV", $back_target);
2312 $this->tpl->setVariable(
"TXT_PREV", $this->lng->txt(
"back"));
2313 $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"back"));
2314 $this->tpl->setVariable(
"PREV_ACC_KEY",
2316 $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
2317 ?
"images/spacer.png"
2319 $this->tpl->parseCurrentBlock();
2320 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
2321 $this->tpl->setVariable(
"IMG_PREV2", $back_img);
2322 $this->tpl->setVariable(
"HREF_PREV2", $back_href);
2323 $this->tpl->setVariable(
"FRAME_PREV2", $back_target);
2324 $this->tpl->setVariable(
"TXT_PREV2", $this->lng->txt(
"back"));
2325 $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"back"));
2326 $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
2327 ?
"images/spacer.png"
2329 $this->tpl->parseCurrentBlock();
2337 if ($this->chapter_has_no_active_page &&
2340 $c_id =
$_GET[
"obj_id"];
2344 if ($this->deactivated_page)
2346 $c_id =
$_GET[
"obj_id"];
2355 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
2356 $c_id = $succ_node[
"obj_id"];
2359 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2361 if ($succ_node[
"obj_id"] > 0 &&
2362 (
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2363 ( $this->lm->getPublicAccessMode() ==
"selected" &&
2368 else if ($succ_node[
"obj_id"] > 0 && !$active)
2372 if ($act_data[
"show_activation_info"] &&
2388 $succ_str = ($succ_node !==
false)
2389 ?
" -> ".$succ_node[
"obj_id"].
"_".$succ_node[
"type"]
2394 if ($this->deactivated_page)
2396 $c_id =
$_GET[
"obj_id"];
2404 $pre_node = $this->lm_tree->fetchPredecessorNode($c_id,
"pg");
2405 $c_id = $pre_node[
"obj_id"];
2407 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2408 if ($pre_node[
"obj_id"] > 0 &&
2409 (
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2410 ($this->lm->getPublicAccessMode() ==
"selected" &&
2415 else if ($pre_node[
"obj_id"] > 0 && !$active)
2419 if ($act_data[
"show_activation_info"] &&
2435 $pre_str = ($pre_node !==
false)
2436 ? $pre_node[
"obj_id"].
"_".$pre_node[
"type"].
" -> "
2440 $framestr = (!empty(
$_GET[
"frame"]))
2441 ?
"frame=".
$_GET[
"frame"].
"&"
2447 $showViewInFrameset =
true;
2453 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2454 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
2459 if (!$this->lm->cleanFrames())
2462 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"],
$_GET[
"frame"]);
2465 else if ($showViewInFrameset && !$this->
offlineMode())
2468 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"]);
2469 $prev_target =
'target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2474 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"]);
2475 $prev_target =
'target="_top" ';
2478 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2481 $output = $this->lng->txt(
"msg_page_not_public");
2484 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
2485 $this->tpl->setVariable(
"IMG_PREV", $prev_img);
2486 $this->tpl->setVariable(
"HREF_PREV", $prev_href);
2487 $this->tpl->setVariable(
"FRAME_PREV", $prev_target);
2488 $this->tpl->setVariable(
"TXT_PREV", $prev_title);
2489 $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"previous"));
2490 $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
2491 ?
"images/spacer.png"
2493 $this->tpl->setVariable(
"PREV_ACC_KEY",
2495 $this->tpl->parseCurrentBlock();
2496 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
2497 $this->tpl->setVariable(
"IMG_PREV2", $prev_img);
2498 $this->tpl->setVariable(
"HREF_PREV2", $prev_href);
2499 $this->tpl->setVariable(
"FRAME_PREV2", $prev_target);
2500 $this->tpl->setVariable(
"TXT_PREV2", $prev_title);
2501 $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"previous"));
2502 $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
2503 ?
"images/spacer.png"
2505 $this->tpl->parseCurrentBlock();
2507 if($succ_node !=
"")
2511 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2512 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
2516 if (!$this->lm->cleanFrames())
2519 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"],
$_GET[
"frame"]);
2522 else if ($showViewInFrameset && !$this->
offlineMode())
2525 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"]);
2526 $succ_target =
' target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2531 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"]);
2532 $succ_target =
' target="_top" ';
2535 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2538 $output = $this->lng->txt(
"msg_page_not_public");
2541 $this->tpl->setCurrentBlock(
"ilLMNavigation_Next");
2542 $this->tpl->setVariable(
"IMG_SUCC", $succ_img);
2543 $this->tpl->setVariable(
"HREF_SUCC", $succ_href);
2544 $this->tpl->setVariable(
"FRAME_SUCC", $succ_target);
2545 $this->tpl->setVariable(
"TXT_SUCC", $succ_title);
2546 $this->tpl->setVariable(
"ALT_SUCC", $this->lng->txt(
"next"));
2547 $this->tpl->setVariable(
"SPACER_SUCC", $this->
offlineMode()
2548 ?
"images/spacer.png"
2550 $this->tpl->setVariable(
"NEXT_ACC_KEY",
2552 $this->tpl->parseCurrentBlock();
2553 $this->tpl->setCurrentBlock(
"ilLMNavigation_Next2");
2554 $this->tpl->setVariable(
"IMG_SUCC2", $succ_img);
2555 $this->tpl->setVariable(
"HREF_SUCC2", $succ_href);
2556 $this->tpl->setVariable(
"FRAME_SUCC2", $succ_target);
2557 $this->tpl->setVariable(
"TXT_SUCC2", $succ_title);
2558 $this->tpl->setVariable(
"ALT_SUCC2", $this->lng->txt(
"next"));
2559 $this->tpl->setVariable(
"SPACER_SUCC2", $this->
offlineMode()
2560 ?
"images/spacer.png"
2562 $this->tpl->parseCurrentBlock();
2567 if ($this->lm->getRestrictForwardNavigation())
2569 if ($this->
getTracker()->hasPredIncorrectAnswers($succ_node[
"obj_id"]))
2571 $this->tpl->addOnLoadCode(
"$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
2581 $child_nodes = $a_node->child_nodes();
2582 foreach ($child_nodes as $child)
2584 if($child->node_name() ==
"ilFrame")
2586 $attributes = $this->
attrib2arr($child->attributes());
2588 if ((!empty($attributes[
"rows"])) || (!empty($attrubtes[
"cols"])))
2592 if(!empty($attributes[
"name"]))
2594 unset($attributes[
"template"]);
2595 unset($attributes[
"template_location"]);
2596 $attributes[
"src"] =
2597 $this->
getLink($this->lm->getRefId(),
"layout",
$_GET[
"obj_id"], $attributes[
"name"],
2598 "",
"keep",
"",
$_GET[
"srcstring"]);
2599 $attributes[
"title"] = $this->lng->txt(
"cont_frame_".$attributes[
"name"]);
2600 $a_content .= $this->
buildTag(
"",
"frame", $attributes);
2601 $this->frames[$attributes[
"name"]] = $attributes[
"name"];
2606 $a_content .= $this->
buildTag(
"start",
"frameset", $attributes);
2608 $a_content .= $this->
buildTag(
"end",
"frameset");
2613 unset($attributes[
"template"]);
2614 unset($attributes[
"template_location"]);
2615 $attributes[
"src"] =
2616 $this->
getLink($this->lm->getRefId(),
"layout",
$_GET[
"obj_id"], $attributes[
"name"],
2617 "",
"keep",
"",
$_GET[
"srcstring"]);
2618 $attributes[
"title"] = $this->lng->txt(
"cont_frame_".$attributes[
"name"]);
2619 if ($attributes[
"name"] ==
"toc")
2621 $attributes[
"src"].=
"#".$_GET[
"obj_id"];
2626 if (
$_GET[
"anchor"] !=
"")
2628 $attributes[
"src"].=
"#".rawurlencode(
$_GET[
"anchor"]);
2631 $a_content .= $this->
buildTag(
"",
"frame", $attributes);
2632 $this->frames[$attributes[
"name"]] = $attributes[
"name"];
2654 if (is_array($attr))
2656 while (list($k,$v) = each($attr))
2657 $tag.=
" ".$k.
"=\"$v\"";
2676 if (!$this->lm->isActiveTOC() || !$this->lm->isActiveLMMenu())
2682 $this->tpl->setCurrentBlock(
"ContentStyle");
2685 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2690 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2692 $this->tpl->parseCurrentBlock();
2703 $style_name =
$ilUser->getPref(
"style").
".css";;
2704 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
2708 $this->tpl->getStandardTemplate();
2711 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2712 ,$this->getExportFormat(),
"toc",
true));
2715 $this->tpl->setTitle($this->lm->getTitle());
2718 include_once(
"./Modules/LearningModule/classes/class.ilLMTableOfContentsExplorerGUI.php");
2721 if (!$exp->handleCommand())
2725 if ($this->deactivated_page)
2727 $page_id =
$_GET[
"obj_id"];
2730 if ($this->chapter_has_no_active_page &&
2733 $exp->setHighlightNode(
$_GET[
"obj_id"]);
2737 if ($this->lm->getTOCMode() ==
"pages")
2739 if ($this->deactivated_page)
2741 $exp->setHighlightNode(
$_GET[
"obj_id"]);
2745 $exp->setHighlightNode($page_id);
2750 $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
2755 $exp->setOfflineMode(
true);
2758 $this->tpl->setVariable(
"ADM_CONTENT", $exp->getHTML());
2762 return $this->tpl->get();
2778 $this->ctrl->setCmd(
"showSummary");
2779 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2793 global $ilAccess, $ilLocator,
$ilUser;
2804 $style_name =
$ilUser->getPref(
"style").
".css";;
2805 $this->tpl->setStyleSheetLocation(
"./".$style_name);
2808 $this->tpl->getStandardTemplate();
2809 $this->tpl->setTitle($this->lm->getTitle());
2812 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2813 ,$this->getExportFormat(), $a_active_tab,
true));
2816 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
2822 $ilLocator->addRepositoryItems();
2823 $this->tpl->setLocator();
2836 $this->lng->loadLanguageModule(
"meta");
2838 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2841 $info->enablePrivateNotes();
2842 $info->enableLearningProgress();
2844 $info->enableNews();
2845 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
2848 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
2850 $info->enableNewsEditing();
2852 if ($enable_internal_rss)
2854 $info->setBlockProperty(
"news",
"settings",
true);
2876 $info->addMetaDataSections($this->lm->getId(),0, $this->lm->getType());
2880 $this->tpl->setContent($info->getHTML());
2881 return $this->tpl->get();
2886 $this->ctrl->forwardCommand($info);
2899 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2900 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu())
2905 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
2908 $this->tpl->setCurrentBlock(
"ContentStyle");
2911 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2916 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2918 $this->tpl->parseCurrentBlock();
2922 $this->tpl->getStandardTemplate();
2924 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2925 ,$this->getExportFormat(),
"print",
true));
2928 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
2929 "tpl.lm_print_selection.html",
"Modules/LearningModule");
2932 $this->tpl->setTitle($this->lm->getTitle());
2940 $this->ctrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
2941 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
2943 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
2945 if (!is_array(
$_POST[
"item"]))
2947 if (
$_GET[
"obj_id"] !=
"")
2959 foreach ($nodes as $node)
2964 $this->lm_set->get(
"time_scheduled_page_activation"));
2966 if ($node[
"type"] ==
"pg" &&
2972 $text = $img_scr = $img_alt =
"";
2976 switch ($node[
"type"])
2982 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2983 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
2985 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased)&&
2986 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
2991 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
2995 $img_alt =
$lng->txt(
"icon").
" ".
$lng->txt(
"pg");
3000 $text = $this->lm->getTitle();
3002 $img_alt =
$lng->txt(
"icon").
" ".
$lng->txt(
"obj_lm");
3009 $this->lm->isActiveNumbering(),
3010 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang);
3011 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3012 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3017 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3021 $img_alt =
$lng->txt(
"icon").
" ".
$lng->txt(
"st");
3027 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3030 $this->nl->addListNode($node[
"obj_id"], $text, $node[
"parent"], $checked, $disabled,
3031 $img_src, $img_alt);
3036 if (
$_GET[
"obj_id"] > 0 && !$this->lm_tree->isInTree(
$_GET[
"obj_id"]))
3040 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3041 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
3043 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3044 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3049 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3053 $id =
$_GET[
"obj_id"];
3057 $this->nl->addListNode($id, $text, 0, $checked, $disabled,
3058 $img_src, $img_alt);
3061 $f = $this->form->getHTML();
3065 $tb->addFormButton(
$lng->txt(
"cont_show_print_view"),
"showPrintView");
3066 $this->tpl->setVariable(
"TOOLBAR", $tb->getHTML());
3068 $this->tpl->setVariable(
"ITEM_SELECTION", $f);
3080 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3085 $radg->setValue(
"page");
3087 $radg->addOption($op1);
3089 $radg->addOption($op2);
3091 $radg->addOption($op3);
3093 include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
3096 $op3->addSubItem($nl);
3099 $this->form->addItem($radg);
3101 $this->form->addCommandButton(
"showPrintView",
$lng->txt(
"cont_show_print_view"));
3102 $this->form->setOpenTag(
false);
3103 $this->form->setCloseTag(
false);
3105 $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
3106 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
3116 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
3118 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu())
3127 if (
$_POST[
"sel_type"] ==
"page")
3129 if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id,
$_POST[
"obj_id"]))
3131 $_POST[
"obj_id"][] = $c_obj_id;
3134 if (
$_POST[
"sel_type"] ==
"chapter" && $c_obj_id > 0)
3137 $path = $this->lm_tree->getPathFull($c_obj_id);
3138 $chap_id =
$path[1][
"child"];
3141 $_POST[
"obj_id"][] = $chap_id;
3154 $style_name =
$ilUser->getPref(
"style").
".css";;
3155 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
3159 $this->tpl->setCurrentBlock(
"ContentStyle");
3162 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
3167 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
3169 $this->tpl->parseCurrentBlock();
3172 $this->tpl->setCurrentBlock(
"SyntaxStyle");
3173 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
3175 $this->tpl->parseCurrentBlock();
3178 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.lm_print_view.html",
true);
3181 $this->tpl->setVariable(
"HEADER", $this->lm->getTitle());
3183 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
3185 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
3186 include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
3187 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
3192 $glossary_links = array();
3193 $output_header =
false;
3194 $media_links = array();
3197 if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint())
3201 $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
3202 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3204 $this->lm->getStyleSheetId(),
"lm"));
3208 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3209 $page_object_gui->setOutputMode(
"print");
3210 $page_object_gui->setPresentationTitle(
"");
3211 $page_object_gui->setFileDownloadLink(
"#");
3212 $page_object_gui->setFullscreenLink(
"#");
3213 $page_object_gui->setSourceCodeDownloadScript(
"#");
3214 $footer_page_content = $page_object_gui->showPage();
3217 if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint())
3221 $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
3222 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3224 $this->lm->getStyleSheetId(),
"lm"));
3228 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3229 $page_object_gui->setOutputMode(
"print");
3230 $page_object_gui->setPresentationTitle(
"");
3231 $page_object_gui->setFileDownloadLink(
"#");
3232 $page_object_gui->setFullscreenLink(
"#");
3233 $page_object_gui->setSourceCodeDownloadScript(
"#");
3234 $header_page_content = $page_object_gui->showPage();
3239 if (is_array(
$_POST[
"obj_id"]))
3241 foreach(
$_POST[
"obj_id"] as $k)
3243 if ($k > 0 && !$this->lm_tree->isInTree($k))
3247 $nodes[] = array(
"obj_id" => $k,
"type" =>
"pg",
"free" =>
true);
3255 $ilCtrl->redirect($this,
"showPrintViewSelection");
3258 foreach ($nodes as $node_key => $node)
3262 $this->lm_set->get(
"time_scheduled_page_activation"));
3263 if ($node[
"type"] ==
"pg" && !$active)
3270 if ($node[
"depth"] <= $act_level)
3272 if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"],
$_POST[
"obj_id"]))
3274 $act_level = $node[
"depth"];
3288 if ($node[
"type"] ==
"du")
3290 $output_header =
true;
3294 if ($node[
"type"] ==
"st")
3296 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3297 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3306 $this->tpl->setCurrentBlock(
"print_chapter");
3308 $chapter_title = $chap->_getPresentationTitle($node[
"obj_id"],
3309 $this->lm->isActiveNumbering(),
3310 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang);
3311 $this->tpl->setVariable(
"CHAP_TITLE",
3316 if ($nodes[$node_key + 1][
"type"] ==
"pg")
3318 $this->tpl->setVariable(
"CHAP_HEADER",
3319 $header_page_content);
3320 $did_chap_page_header =
true;
3324 $this->tpl->parseCurrentBlock();
3325 $this->tpl->setCurrentBlock(
"print_block");
3326 $this->tpl->parseCurrentBlock();
3330 if ($node[
"type"] ==
"pg")
3332 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3333 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3341 $this->tpl->setCurrentBlock(
"print_item");
3344 $page_id = $node[
"obj_id"];
3346 $page_object = $page_object_gui->getPageObject();
3347 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3349 $this->lm->getStyleSheetId(),
"lm"));
3354 $lm_pg_obj->setLMId($this->lm->getId());
3357 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3358 $page_object_gui->setOutputMode(
"print");
3359 $page_object_gui->setPresentationTitle(
"");
3361 if ($this->lm->getPageHeader() ==
IL_PAGE_TITLE || $node[
"free"] ===
true)
3364 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3365 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
3369 if ($this->lm->isActiveNumbering())
3371 $chapter_title = trim(substr($chapter_title,
3372 strpos($chapter_title,
" ")));
3375 if ($page_title != $chapter_title)
3377 $page_object_gui->setPresentationTitle($page_title);
3382 $hcont = $header_page_content;
3383 $fcont = $footer_page_content;
3387 if ($did_chap_page_header)
3391 if ($nodes[$node_key + 1][
"type"] ==
"pg" &&
3392 !($nodes[$node_key + 1][
"depth"] <= $act_level
3393 && !in_array($nodes[$node_key + 1][
"obj_id"],
$_POST[
"obj_id"])))
3399 $page_object_gui->setFileDownloadLink(
"#");
3400 $page_object_gui->setFullscreenLink(
"#");
3401 $page_object_gui->setSourceCodeDownloadScript(
"#");
3402 $page_content = $page_object_gui->showPage();
3405 $this->tpl->setVariable(
"CONTENT",
3406 $hcont.$page_content.$fcont);
3410 $this->tpl->setVariable(
"CONTENT",
3411 $hcont.$page_content.$fcont.
"<br />");
3413 $chapter_title =
"";
3414 $this->tpl->parseCurrentBlock();
3415 $this->tpl->setCurrentBlock(
"print_block");
3416 $this->tpl->parseCurrentBlock();
3423 foreach ($int_links as $key => $link)
3425 if ($link[
"type"] ==
"git" &&
3426 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0))
3428 $glossary_links[$key] = $link;
3430 if ($link[
"type"] ==
"mob" &&
3431 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0))
3434 $mob_links[$key] = $link;
3445 $page_object->buildDom();
3446 $links = $page_object->getInternalLinks();
3447 foreach($links as $link)
3449 if ($link[
"Type"] ==
"MediaObject"
3450 && $link[
"TargetFrame"] !=
""
3451 && $link[
"TargetFrame"] !=
"None")
3453 $media_links[] = $link;
3465 if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix())
3467 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
3468 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
3473 foreach($glossary_links as $key => $link)
3476 $terms[$term.
":".$key] = array(
"key" => $key,
"link" => $link,
"term" => $term);
3481 foreach($terms as
$t)
3489 foreach($defs as $def)
3492 if (count($defs) > 1)
3494 $this->tpl->setCurrentBlock(
"def_title");
3495 $this->tpl->setVariable(
"TXT_DEFINITION",
3496 $this->lng->txt(
"cont_definition").
" ".($def_cnt++));
3497 $this->tpl->parseCurrentBlock();
3499 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
3501 $page_gui->setTemplateOutput(
false);
3502 $page_gui->setOutputMode(
"print");
3504 $this->tpl->setCurrentBlock(
"definition");
3505 $page_gui->setFileDownloadLink(
"#");
3506 $page_gui->setFullscreenLink(
"#");
3507 $page_gui->setSourceCodeDownloadScript(
"#");
3508 $output = $page_gui->showPage();
3509 $this->tpl->setVariable(
"VAL_DEFINITION", $output);
3510 $this->tpl->parseCurrentBlock();
3514 $this->tpl->setCurrentBlock(
"term");
3515 $this->tpl->setVariable(
"VAL_TERM",
3517 $this->tpl->parseCurrentBlock();
3522 $this->tpl->setCurrentBlock(
"glossary");
3523 $annex_title = $this->lng->txt(
"cont_annex").
" ".
3524 chr(64+$annex_cnt).
": ".$this->lng->txt(
"glo");
3525 $this->tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
3526 $this->tpl->parseCurrentBlock();
3528 $annexes[] = $annex_title;
3532 if (count($media_links) > 0)
3534 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3535 include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
3537 foreach($media_links as $media)
3539 if (substr($media[
"Target"],0,4) ==
"il__")
3541 $arr = explode(
"_",$media[
"Target"]);
3542 $id = $arr[count($arr) - 1];
3545 $med_item = $med_obj->getMediaItem(
"Standard");
3546 if (is_object($med_item))
3548 if (is_int(strpos($med_item->getFormat(),
"image")))
3550 $this->tpl->setCurrentBlock(
"ref_image");
3553 if ($med_item->getLocationType() ==
"LocalFile")
3555 $this->tpl->setVariable(
"IMG_SOURCE",
3557 "/".$med_item->getLocation());
3561 $this->tpl->setVariable(
"IMG_SOURCE",
3562 $med_item->getLocation());
3565 if ($med_item->getCaption() !=
"")
3567 $this->tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
3571 $this->tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
3573 $this->tpl->parseCurrentBlock();
3581 $this->tpl->setCurrentBlock(
"ref_images");
3582 $annex_title = $this->lng->txt(
"cont_annex").
" ".
3583 chr(64+$annex_cnt).
": ".$this->lng->txt(
"cont_ref_images");
3584 $this->tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
3585 $this->tpl->parseCurrentBlock();
3587 $annexes[] = $annex_title;
3593 $this->tpl->setCurrentBlock(
"print_header");
3594 $this->tpl->setVariable(
"LM_TITLE", $this->lm->getTitle());
3595 if ($this->lm->getDescription() !=
"none")
3597 include_once(
"Services/MetaData/classes/class.ilMD.php");
3598 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
3599 $md_gen = $md->getGeneral();
3600 foreach($md_gen->getDescriptionIds() as $id)
3602 $md_des = $md_gen->getDescription($id);
3603 $description = $md_des->getDescription();
3606 $this->tpl->setVariable(
"LM_DESCRIPTION",
3609 $this->tpl->parseCurrentBlock();
3613 foreach ($nodes2 as $node2)
3615 if ($node2[
"type"] ==
"st"
3618 for ($j=1; $j < $node2[
"depth"]; $j++)
3620 $this->tpl->setCurrentBlock(
"indent");
3622 $this->tpl->parseCurrentBlock();
3624 $this->tpl->setCurrentBlock(
"toc_entry");
3625 $this->tpl->setVariable(
"TXT_TOC_TITLE",
3627 $this->lm->isActiveNumbering(),
3628 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang));
3629 $this->tpl->parseCurrentBlock();
3634 foreach ($annexes as $annex)
3636 $this->tpl->setCurrentBlock(
"indent");
3638 $this->tpl->parseCurrentBlock();
3639 $this->tpl->setCurrentBlock(
"toc_entry");
3640 $this->tpl->setVariable(
"TXT_TOC_TITLE", $annex);
3641 $this->tpl->parseCurrentBlock();
3644 $this->tpl->setCurrentBlock(
"toc");
3645 $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
3646 $this->tpl->parseCurrentBlock();
3648 $this->tpl->setCurrentBlock(
"print_start_block");
3649 $this->tpl->parseCurrentBlock();
3653 include_once
'Services/MetaData/classes/class.ilMD.php';
3654 $md =
new ilMD($this->lm->getId(),0, $this->lm->getType());
3655 if(is_object($lifecycle = $md->getLifecycle()))
3657 $sep = $author =
"";
3658 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
3660 $md_con = $lifecycle->getContribute($con_id);
3661 if ($md_con->getRole() ==
"Author")
3663 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
3665 $md_ent = $md_con->getEntity($ent_id);
3666 $author = $author.$sep.$md_ent->getEntity();
3673 $this->lng->loadLanguageModule(
"meta");
3674 $this->tpl->setCurrentBlock(
"author");
3675 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
3676 $this->tpl->setVariable(
"LM_AUTHOR", $author);
3677 $this->tpl->parseCurrentBlock();
3683 if (is_object($md_rights = $md->getRights()))
3685 $copyright = $md_rights->getDescription();
3686 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
3689 if ($copyright !=
"")
3691 $this->lng->loadLanguageModule(
"meta");
3692 $this->tpl->setCurrentBlock(
"copyright");
3693 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
3694 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
3695 $this->tpl->parseCurrentBlock();
3699 $this->tpl->show(
false);
3708 $pg_obj->buildDom();
3709 $int_links = $pg_obj->getInternalLinks();
3710 foreach ($int_links as $il)
3712 if ($il[
"Target"] == str_replace(
"_file_",
"_dfile_",
$_GET[
"file_id"]))
3716 require_once(
"./Modules/File/classes/class.ilObjFile.php");
3717 $fileObj =
new ilObjFile($file_id,
false);
3718 $fileObj->sendFile();
3722 if (in_array(
$_GET[
"file_id"], $pg_obj->getAllFileObjIds()))
3724 require_once(
"./Modules/File/classes/class.ilObjFile.php");
3727 $fileObj =
new ilObjFile($file_id,
false);
3728 $fileObj->sendFile();
3739 require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
3741 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
3749 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu())
3755 $this->tpl->setCurrentBlock(
"ContentStyle");
3758 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
3763 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
3765 $this->tpl->parseCurrentBlock();
3769 $this->tpl->getStandardTemplate();
3771 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
3772 ,$this->getExportFormat(),
"download",
true));
3776 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_download_list.html",
"Modules/LearningModule");
3779 $this->tpl->setTitle($this->lm->getTitle());
3789 include_once
'Services/MetaData/classes/class.ilMD.php';
3790 $md =
new ilMD($this->lm->getId(),0, $this->lm->getType());
3791 if (is_object($md_rights = $md->getRights()))
3793 $copyright = $md_rights->getDescription();
3795 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
3798 if ($copyright !=
"")
3800 $this->lng->loadLanguageModule(
"meta");
3801 $this->tpl->setCurrentBlock(
"copyright");
3802 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
3803 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
3804 $this->tpl->parseCurrentBlock();
3809 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
3813 $this->tpl->addBlockfile(
"DOWNLOAD_TABLE",
"download_table",
"tpl.table.html");
3816 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/LearningModule");
3818 $export_files = array();
3819 $types = array(
"xml",
"html",
"scorm");
3820 foreach($types as $type)
3822 if ($this->lm->getPublicExportFile($type) !=
"")
3824 if (is_file($this->lm->getExportDirectory($type).
"/".
3825 $this->lm->getPublicExportFile($type)))
3827 $dir = $this->lm->getExportDirectory($type);
3828 $size = filesize($this->lm->getExportDirectory($type).
"/".
3829 $this->lm->getPublicExportFile($type));
3830 $export_files[] = array(
"type" => $type,
3831 "file" => $this->lm->getPublicExportFile($type),
3839 $tbl->setTitle($this->lng->txt(
"download"));
3841 $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
3842 $this->lng->txt(
"cont_file"),
3843 $this->lng->txt(
"size"), $this->lng->txt(
"date"),
3846 $cols = array(
"format",
"file",
"size",
"date",
"download");
3847 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
3848 "cmd" =>
"showDownloadList",
"cmdClass" => strtolower(get_class($this)));
3849 $tbl->setHeaderVars($cols, $header_params);
3850 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
3851 $tbl->disable(
"sort");
3854 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
3855 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
3856 $tbl->setLimit(
$_GET[
"limit"]);
3857 $tbl->setOffset(
$_GET[
"offset"]);
3858 $tbl->setMaxCount($this->maxcount);
3864 $tbl->disable(
"footer");
3866 $tbl->setMaxCount(count($export_files));
3867 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
3869 if(count($export_files) > 0)
3873 foreach($export_files as $exp_file)
3875 if (!$exp_file[
"size"] > 0)
3880 $this->tpl->setCurrentBlock(
"tbl_content");
3881 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
3884 $this->tpl->setVariable(
"CSS_ROW", $css_row);
3886 include_once(
"./Services/Utilities/classes/class.ilFormat.php");
3888 $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
3889 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
3891 $file_arr = explode(
"__", $exp_file[
"file"]);
3892 include_once(
"./Services/Calendar/classes/class.ilDatePresentation.php");
3896 $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
3897 $this->ctrl->setParameter($this,
"type", $exp_file[
"type"]);
3898 $this->tpl->setVariable(
"LINK_DOWNLOAD",
3899 $this->ctrl->getLinkTarget($this,
"downloadExportFile"));
3901 $this->tpl->parseCurrentBlock();
3918 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu())
3923 $file = $this->lm->getPublicExportFile(
$_GET[
"type"]);
3924 if ($this->lm->getPublicExportFile(
$_GET[
"type"]) !=
"")
3926 $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
3927 if (is_file($dir.
"/".
$file))
3946 return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$a_ref_id.
"&obj_id=".$a_obj_id.
"&focus_id=".
3947 $a_obj_id.
"&focus_return=".$a_return_ref_id;
3954 function getLink($a_ref_id, $a_cmd =
"", $a_obj_id =
"", $a_frame =
"", $a_type =
"",
3955 $a_back_link =
"append", $a_anchor =
"", $a_srcstring =
"")
3966 $back_pg =
$_GET[
"back_pg"];
3967 if ($a_obj_id !=
"" && !$this->lm_tree->isInTree($a_obj_id) && $cur_page_id !=
"" &&
3968 $a_back_link ==
"append")
3972 $back_pg = $cur_page_id.
":".$back_pg;
3976 $back_pg = $cur_page_id;
3981 if ($a_back_link ==
"reduce")
3983 $limpos = strpos(
$_GET[
"back_pg"],
":");
3987 $back_pg = substr($back_pg, strpos($back_pg,
":") + 1);
3994 else if ($a_back_link !=
"keep")
4003 if (
$_GET[
"from_page"] ==
"")
4005 $this->ctrl->setParameter($this,
"from_page", $cur_page_id);
4011 if (!in_array($a_frame, array(
"",
"_blank")))
4013 $this->ctrl->setParameter($this,
"from_page",
$_GET[
"from_page"]);
4017 if ($a_anchor !=
"")
4019 $this->ctrl->setParameter($this,
"anchor", rawurlencode($a_anchor));
4021 if ($a_srcstring !=
"")
4023 $this->ctrl->setParameter($this,
"srcstring", $a_srcstring);
4028 $link = $this->ctrl->getLinkTarget($this,
"fullscreen",
"",
false,
false);
4035 $this->ctrl->setParameter($this,
"back_pg", $back_pg);
4039 $this->ctrl->setParameter($this,
"frame", $a_frame);
4041 if ($a_obj_id !=
"")
4046 $this->ctrl->setParameter($this,
"mob_id", $a_obj_id);
4050 $this->ctrl->setParameter($this,
"obj_id", $a_obj_id);
4051 $link.=
"&obj_id=".$a_obj_id;
4057 $this->ctrl->setParameter($this,
"obj_type", $a_type);
4059 $link = $this->ctrl->getLinkTarget($this, $a_cmd, $a_anchor);
4062 $this->ctrl->setParameter($this,
"frame",
"");
4063 $this->ctrl->setParameter($this,
"obj_id",
"");
4064 $this->ctrl->setParameter($this,
"mob_id",
"");
4072 case "downloadFile":
4076 $link =
"fullscreen.html";
4081 if ($a_obj_id ==
"")
4083 $a_obj_id = $this->lm_tree->getRootId();
4084 $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id,
"pg");
4085 $a_obj_id = $pg_node[
"obj_id"];
4087 if ($a_type ==
"StructureObject")
4089 $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id,
"pg");
4090 $a_obj_id = $pg_node[
"obj_id"];
4092 if ($a_frame !=
"" && $a_frame !=
"_blank")
4094 if ($a_frame !=
"toc")
4096 $link =
"frame_".$a_obj_id.
"_".$a_frame.
".html";
4100 $link =
"frame_".$a_frame.
".html";
4108 $link =
"lm_pg_".$nid.
".html";
4112 $link =
"lm_pg_".$a_obj_id.
".html";
4118 $link =
"term_".$a_obj_id.
".html";
4122 $link =
"media_".$a_obj_id.
".html";
4130 $this->ctrl->clearParameters($this);
4144 $this->tpl->setCurrentBlock(
"ContentStyle");
4147 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
4152 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
4154 $this->tpl->parseCurrentBlock();
4156 $tpl =
new ilTemplate(
"tpl.page_message_screen.html",
true,
true,
"Modules/LearningModule");
4157 $tpl->setVariable(
"TXT_PAGE_NO_PUBLIC_ACCESS", $a_content);
4159 $this->tpl->setVariable(
"PAGE_CONTENT",
$tpl->get());
4185 $target = $this->ctrl->getLinkTarget($this,
"");
4187 return $this->ctrl->getLinkTarget($this,
"");
4203 $this->offline_directory = $offdir;
4224 $file = $directory.
"/".$title;
4225 if (!($fp = @fopen(
$file,
"w+")))
4227 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
4228 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
4238 $this->tpl->setHeaderPageTitle($this->lm->getTitle());
4239 $this->tpl->fillWindowTitle();
4251 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
4252 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
4255 return new ilLMPageGUI($a_id, 0,
false, $this->lang);
4268 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
4271 return new ilLMPage($a_id, 0, $this->lang);
4281 $exp = $this->
ilTOC(
true);
4283 echo $exp->getHTML().
4284 "<script>".$exp->getOnLoadCode().
"</script>";
static getAttribute($a_func_id)
Get accesskey HTML attribute.
static addJavaScript()
Add javascript files that are necessary to run accordion.
static addCss()
Add required css.
Class ilCommonActionDispatcherGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
_updateLastAccess($a_user_id, $a_lm_ref_id, $a_page_id)
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Glossary definition page GUI class.
getDefinitionList($a_term_id)
static
GUI class for glossary terms.
static _lookGlossaryTerm($term_id)
get glossary term
_getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
static getExportId($a_lm_id, $a_lmobj_id, $a_type="pg")
Get export ID.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
_exists($a_id)
checks wether a lm content object with specified id exists or not
static _isPagePublic($a_node_id, $a_check_public_mode=false)
static _lookupTitle($a_obj_id)
Lookup title.
static lookupLayout($a_obj_id)
Lookup type.
_lookupContObjID($a_id)
get learning module / digibook id for lm object
Extension of ilPageObjectGUI for learning modules.
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
Extension of ilPageObject for learning modules.
Base exception class for learning module presentation.
Class ilLMPresentationGUI.
offlineMode()
checks wether offline content generation is activated
ilLMNotes()
output notes of page
outputInfoScreen($a_standard_locator=false)
info screen
ilLMNavigation()
inserts sequential learning module navigation at template variable LMNAVIGATION_CONTENT
ilMainMenu()
output main menu
handleCodeParagraph($page_id, $paragraph_id, $title, $text)
store paragraph into file directory files/codefile_$pg_id_$paragraph_id/downloadtitle
getCurrentPageId()
Get the current page id.
ilLMMenu()
output learning module menu
initPrintViewSelectionForm()
Init print view selection form.
layout($a_xml="main.xml", $doShow=true)
generates frame layout
processNodes(&$a_content, &$a_node)
download_paragraph()
download source code paragraph
getExportFormat()
get export format
export()
calls export of digilib-object at this point other lm-objects can be exported
addHeaderAction($a_redraw=false)
Add header action.
initScreenHead($a_active_tab="info")
showPrintView()
show print view
nop()
this dummy function is needed for offline package creation
downloadFile()
download file of file lists
showMessageScreen($a_content)
Show message screen.
getSourcecodeDownloadLink()
showPreconditionsOfPage()
show preconditions of the page
executeCommand()
execute command
getFocusLink($a_ref_id, $a_obj_id, $a_return_ref_id)
Get focused link (used in learning objectives courses)
attrib2arr($a_attributes)
showNavRestrictionDueToQuestions()
Show message if navigation to page is not allowed due to unanswered questions.
showDownloadList()
show download list
getLMPageGUI($a_id)
Get lm page gui object.
showInfoScreen()
info screen call from inside learning module
getLMPage($a_id)
Get lm page object.
setOfflineDirectory($offdir)
set offline directory to offdir
getOfflineDirectory()
get offline directory
getCurrentFrameSet()
get frames of current frame set
ilTOC($a_get_explorer=false)
table of contents
ilLMHead()
output lm header
getSuccessorPage()
Get successor page.
showPrintViewSelection()
show selection screen for print view
setExportFormat($a_format)
set export format
getLink($a_ref_id, $a_cmd="", $a_obj_id="", $a_frame="", $a_type="", $a_back_link="append", $a_anchor="", $a_srcstring="")
handles links for learning module presentation
ilLMSubMenu()
output learning module submenu
showTableOfContents()
table of contents
saveFrameUrl()
Save frame url.
setOfflineMode($a_offline=true)
set offline mode (content is generated for offline package)
getLinkXML($a_int_links, $a_layoutframes)
get xml for links
redrawHeaderAction()
Redraw header action.
downloadExportFile()
send download file (xml/html)
getLinkTargetsXML()
Get XMl for Link Targets.
determineLayout()
Determine layout.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
ilPage(&$a_page_node, $a_page_id=0)
process <ilPage> content tag
basicPageGuiInit($a_page_gui)
Basic page gui initialisation.
refreshToc()
Refresh toc (called if questions have been answered correctly)
buildTag($type, $name, $attr="")
generate a tag with given name and attributes
ilJavaScript($a_inline="", $a_file="", $a_location="")
Puts JS into template.
ilGlossary()
show glossary term
showNoPublicAccess()
Show info message, if page is not accessible in public area.
LM presentation (left frame) explorer GUI class.
LM presentation (separate toc screen) explorer GUI class.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
static getInstance($a_tree_id)
Get Instance.
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _parseCopyright($a_copyright)
Parse copyright.
_getMissingPreconditionsOfPage($cont_ref_id, $cont_obj_id, $page_id)
gets all missing preconditions of page
static getSupplyingExportFiles($a_target_dir=".")
Get supplying export files.
_checkPreconditionsOfPage($cont_ref_id, $cont_obj_id, $page_id)
checks wether the preconditions of a page are fulfilled or not
_getMissingPreconditionsTopChapter($cont_obj_ref_id, $cont_obj_id, $page_id)
get top chapter of page for that any precondition is missing
Class ilLearningModuleGUI.
getContentStylePath($a_style_id)
get content style path
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
getContentPrintStyle()
get content print style
getSyntaxStylePath()
get syntax style path
static getInstance($a_obj_id)
Get instance.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
_lookupActivationData($a_id, $a_parent_type, $a_lang="-")
Lookup activation data.
static _requiresPurchaseToAccess($a_ref_id, $a_purchasetype='')
this function should be used by all buyable repository objects !!
Class for permanent links.
This class represents an option in a radio group.
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.
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.
buildLinkTarget($a_node_id, $a_type)
note: most of this stuff is used by ilCourseContentInterface too
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
STATIC, do not use $this inside!
Session based immediate storage.
static _getPresentationTitle($a_st_id, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_lm_id=0, $a_lang="-")
get presentation title
special template class to simplify handling of ITX/PEAR
static highlight($a_dom_node_id, $a_text, $a_tpl=null)
Searches for all occurences of a text (case-insensitive) and highlights it.
static _getInstance($a_usr_id)
Get singleton instance.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
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 switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static now()
Return current timestamp in Y-m-d H:i:s format.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static getGotoForWikiPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
static initjQueryUI()
Init jQuery UI (see included_components.txt for included components)
static initjQuery($a_tpl=null)
Init jQuery.
domxml_open_mem($str, $mode=DOMXML_LOAD_PARSING, &$error=NULL)
xpath_eval($xpath_context, $eval_str, $contextnode=null)
xpath_new_context($dom_document)