4require_once(
"./Modules/LearningModule/classes/class.ilObjLearningModule.php");
5require_once(
"./Services/MainMenu/classes/class.ilMainMenuGUI.php");
6require_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
43 $lng->loadLanguageModule(
"content");
47 $this->offline =
false;
48 $this->frames = array();
50 $this->ctrl->saveParameter($this, array(
"ref_id",
"transl",
"focus_id",
"focus_return"));
53 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleGUI.php");
55 $this->lm = $this->lm_gui->object;
58 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
63 if ($this->ot->getContentActivated())
65 $langs = $this->ot->getLanguages();
66 if (isset($langs[
$_GET[
"transl"]]) ||
$_GET[
"transl"] == $this->ot->getMasterLanguage())
68 $this->lang =
$_GET[
"transl"];
70 else if (isset($langs[
$ilUser->getCurrentLanguage()]))
72 $this->lang =
$ilUser->getCurrentLanguage();
74 if ($this->lang == $this->ot->getMasterLanguage())
80 if(IS_PAYMENT_ENABLED)
82 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
85 else $this->needs_to_be_purchased =
false;
88 if (!$rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
90 if (!$this->lm->getOnline())
92 $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->WARNING);
96 include_once(
"./Modules/LearningModule/classes/class.ilLMTree.php");
103 if ((
int)
$_GET[
"focus_id"] > 0 && $this->lm_tree->isInTree((
int)
$_GET[
"focus_id"]))
105 $this->focus_id = (int)
$_GET[
"focus_id"];
117 if(IS_PAYMENT_ENABLED)
119 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
120 if($ilAccess->checkAccess(
'visible',
'',
$_GET[
'ref_id']) &&
121 $this->needs_to_be_purchased)
123 if(!((
int)
$_GET[
'obj_id'] &&
125 ($this->ctrl->getCmd() ==
'layout' || $this->ctrl->getCmd() ==
'')))
128 unset(
$_GET[
'obj_id']);
130 $this->tpl->getStandardTemplate();
133 include_once
'Services/Payment/classes/class.ilShopPurchaseGUI.php';
135 $ret = $this->ctrl->forwardCommand($pp);
143 if (!$ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]) &&
144 (!(($this->ctrl->getCmd() ==
"infoScreen" || $this->ctrl->getNextClass() ==
"ilinfoscreengui")
145 && $ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"]))))
147 $ilias->raiseError(
$lng->txt(
"permission_denied"),
$ilias->error_obj->WARNING);
150 $next_class = $this->ctrl->getNextClass($this);
151 $cmd = $this->ctrl->getCmd(
"layout", array(
"showPrintView"));
157 $obj_id =
$_GET[
"obj_id"];
158 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
159 $ilNavigationHistory->addItem(
$_GET[
"ref_id"], $this->ctrl->getLinkTarget($this),
"lm");
160 $this->ctrl->setParameter($this,
"obj_id", $obj_id);
168 case "ilinfoscreengui":
172 case "ilcommonactiondispatchergui":
173 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
175 $gui->enableCommentsSettings(
false);
176 $this->ctrl->forwardCommand($gui);
180 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
186 case "ilglossarydefpagegui":
187 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
193 case "illearningprogressgui":
195 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
197 $this->ctrl->forwardCommand($new_gui);
201 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
203 $rating_gui->setObject($this->lm->getId(),
"lm",
$_GET[
"obj_id"],
"lm");
204 $this->ctrl->forwardCommand($rating_gui);
219 $this->offline = $a_offline;
220 $this->export_all_languages = $a_all_languages;
239 $this->export_format = $a_format;
249 return $this->export_format;
269 switch($this->lm->getType())
272 $this->lm_gui->export();
284 include_once(
"./Modules/LearningModule/classes/class.ilLMTracker.php");
293 if(!is_array($a_attributes))
297 foreach ($a_attributes as $attribute)
299 $attr[$attribute->name()] = $attribute->value();
309 return $this->frames;
323 $layout = $this->lm->getLayout();
324 if ($this->lm->getLayoutPerPage())
327 if (!in_array(
$_GET[
"frame"], array(
"",
"_blank")) &&
$_GET[
"from_page"] > 0)
329 $pg_id = (int)
$_GET[
"from_page"];
333 if (in_array(
$_GET[
"cmd"], array(
"media",
"glossary")) &&
$_GET[
"back_pg"] > 0)
335 $pg_id = (int)
$_GET[
"back_pg"];
356 if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
$_GET[
"focus_id"] ==
"")
358 include_once(
"./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
362 if($last_accessed_page &&
363 $last_accessed_page != $this->lm_tree->getLastActivePage())
365 $_GET[
"obj_id"] = $last_accessed_page;
375 function layout($a_xml =
"main.xml", $doShow =
true)
384 $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/".$layout.
"/".$a_xml);
388 include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
390 $layout.
"/".$a_xml.
".");
392 $this->layout_doc = $doc;
398 ?
"/ilLayout/ilFrame[1]"
399 :
"//ilFrame[@name='".$_GET[
"frame"].
"']";
402 if (count($found) != 1)
404 include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
406 " path ".
$path.
" in ".$layout.
"/".$a_xml.
". LM Layout is ".$this->lm->getLayout());
412 $attributes = $this->
attrib2arr($node->attributes());
414 $this->frames = array();
415 if((!empty($attributes[
"rows"])) || (!empty($attributes[
"cols"])))
417 $content .= $this->
buildTag(
"start",
"frameset", $attributes);
420 $content .= $this->
buildTag(
"end",
"frameset");
421 $this->tpl =
new ilTemplate(
"tpl.frameset.html",
true,
true,
"Modules/LearningModule");
423 $this->tpl->setVariable(
"FS_CONTENT", $content);
426 $content = $this->tpl->get();
433 if ((empty($attributes[
"template"]) || !empty(
$_GET[
"obj_type"]))
434 && (
$_GET[
"frame"] !=
"_blank" ||
$_GET[
"obj_type"] !=
"MediaObject"))
441 if(empty(
$_GET[
"obj_type"]))
443 $obj_type =
"PageObject";
447 $obj_type =
$_GET[
"obj_type"];
451 $childs = $node->child_nodes();
453 foreach($childs as $child)
455 if ($child->node_name() == $obj_type)
458 $attributes = $this->
attrib2arr($child->attributes());
466 include_once(
"./Modules/LearningModule/exceptions/class.ilLMPresentationException.php");
468 $_GET[
"frame"].
"' and object type '".$obj_type.
"'.");
473 $in_module = ($attributes[
"template_location"] ==
"module")
478 $this->tpl =
new ilTemplate($attributes[
"template"],
true,
true, $in_module);
479 $this->tpl->setBodyClass(
"");
493 $style_name =
$ilUser->getPref(
"style").
".css";
494 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
497 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
502 include_once(
"./Services/UICore/classes/class.ilUIFramework.php");
508 $childs = $node->child_nodes();
510 foreach($childs as $child)
513 $child_attr = $this->
attrib2arr($child->attributes());
515 switch ($child->node_name())
523 $this->
ilTOC($child_attr[
"target_frame"]);
528 switch($this->lm->getType())
534 $content = $this->
ilPage($child);
543 case "ilLMNavigation":
556 $this->
ilJavaScript($child_attr[
"inline"], $child_attr[
"file"],
557 $child_attr[
"location"]);
588 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
593 $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
594 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
595 $close_call =
"il.LearningModule.setCloseHTML('".ilGlyphGUI::get(
ilGlyphGUI::CLOSE).
"');";
596 $this->tpl->addOnLoadCode($close_call);
601 if (
$_GET[
"frame"] ==
"")
603 include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
605 $last_frame_url = $store->get(
"cf_".$this->lm->getId());
606 if ($last_frame_url !=
"")
608 $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('".$last_frame_url.
"', 'center_bottom');");
611 if (in_array($layout, array(
"toc2windyn")))
613 $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('".
614 $ilCtrl->getLinkTarget($this,
"saveFrameUrl",
"",
false,
false).
"');
615 il.LearningModule.openInitFrames();
618 $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('".
619 $ilCtrl->getLinkTarget($this,
"refreshToc",
"",
false,
false).
"');
625 $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
626 $this->tpl->fillJavaScriptFiles();
627 $this->tpl->fillScreenReaderFocus();
629 $this->tpl->fillCssFiles();
634 $this->tpl->resetJavascript();
635 $this->tpl->resetCss();
636 $this->tpl->setBodyClass(
"ilLMNoMenu");
638 include_once(
"./Modules/LearningModule/classes/class.ilObjContentObject.php");
641 if ($f[
"type"] ==
"js")
643 $this->tpl->addJavascript($f[
"target"]);
645 if ($f[
"type"] ==
"css")
647 $this->tpl->addCSS($f[
"target"]);
650 $this->tpl->fillJavaScriptFiles(
true);
651 $this->tpl->fillCssFiles(
true);
655 $this->tpl->fillBodyClass();
665 $this->tpl->fillTabs();
666 if ($this->fill_on_load_code)
668 $this->tpl->fillOnLoadCode();
670 $content = $this->tpl->get();
671 $content = str_replace(
"{",
"{", $content);
672 $content = str_replace(
"}",
"}", $content);
674 header(
'Content-type: text/html; charset=UTF-8');
679 $this->tpl->fillLeftNav();
680 $this->tpl->fillOnLoadCode();
681 $content = $this->tpl->get();
695 include_once(
"./Services/Authentication/classes/class.ilSessionIStorage.php");
697 if (
$_GET[
"url"] !=
"")
699 $store->set(
"cf_".$this->lm->getId(),
$_GET[
"url"]);
703 $store->set(
"cf_".$this->lm->getId(),
$_GET[
"url"]);
715 if (
$_GET[
"frame"] !=
"_blank")
729 if (
$_GET[
"frame"] !=
"_blank")
735 $this->tpl =
new ilTemplate(
"tpl.glossary_term_output.html",
true,
true,
true);
746 $style_name =
$ilUser->getPref(
"style").
".css";;
747 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
757 return $this->tpl->get();
771 $this->tpl->touchBlock(
"pg_intro");
772 $this->tpl->touchBlock(
"pg_outro");
780 $ilMainMenu->setLoginTargetPar(
"pg_".$page_id.
"_".$this->lm->getRefId());
785 $this->tpl->touchBlock(
"pg_intro");
786 $this->tpl->touchBlock(
"pg_outro");
787 $this->tpl->setBodyClass(
"std");
788 $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
794 function ilTOC($a_get_explorer =
false)
796 include_once(
"./Modules/LearningModule/classes/class.ilLMTOCExplorerGUI.php");
797 $exp =
new ilLMTOCExplorerGUI($this,
"ilTOC", $this, $this->lang, $this->focus_id, $this->export_all_languages);
799 if (!$exp->handleCommand())
803 if ($this->deactivated_page)
805 $page_id =
$_GET[
"obj_id"];
809 $exp->setPathOpen((
int) $page_id);
812 if ($this->chapter_has_no_active_page &&
815 $exp->setHighlightNode(
$_GET[
"obj_id"]);
819 if ($this->lm->getTOCMode() ==
"pages")
821 if ($this->deactivated_page)
823 $exp->setHighlightNode(
$_GET[
"obj_id"]);
827 $exp->setHighlightNode($page_id);
832 $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
837 $exp->setOfflineMode(
true);
846 $this->tpl->setCurrentBlock(
"il_toc");
847 $this->tpl->setVariable(
"EXPLORER", $exp->getHTML());
848 $this->tpl->parseCurrentBlock();
861 if ($this->
offlineMode() && $this->lang !=
"" && $this->lang !=
"-")
863 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
865 $data = $ot->getLanguages();
872 return $this->lm->getTitle();
881 $this->tpl->setVariable(
"MENU", $this->lm_gui->setilLMMenu($this->offlineMode()
882 ,$this->getExportFormat(),
"content",
false,
true, $this->getCurrentPageId()));
890 $this->tpl->setCurrentBlock(
"header_image");
893 $this->tpl->setVariable(
"IMG_HEADER",
"./images/icon_lm.svg");
899 $this->tpl->parseCurrentBlock();
900 $this->tpl->setCurrentBlock(
"lm_head");
902 $this->tpl->parseCurrentBlock();
913 if ($this->lm->getType() ==
"dbk" && $this->abstract)
918 $showViewInFrameset =
true;
920 if ($showViewInFrameset)
926 $buttonTarget =
"_top";
930 include_once(
"./Services/UICore/classes/class.ilTemplate.php");
931 $tpl_menu =
new ilTemplate(
"tpl.lm_sub_menu.html",
true,
true,
true);
942 if ($rbacsystem->checkAccess(
"write",
$_GET[
"ref_id"]))
944 $tpl_menu->setCurrentBlock(
"edit_page");
946 $tpl_menu->setVariable(
"EDIT_LINK", ILIAS_HTTP_PATH.
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=".
$_GET[
"ref_id"].
947 "&obj_id=".$page_id.
"&to_page=1");
948 $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
949 $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
950 $tpl_menu->parseCurrentBlock();
955 include_once(
"./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
957 $page_id.
"_".$this->lm->getRefId(),
963 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
964 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
967 $title.=
": ".$pg_title;
970 $plinkgui->setTitle($title);
972 $tpl_menu->setCurrentBlock(
"perma_link");
973 $tpl_menu->setVariable(
"PERMA_LINK", $plinkgui->getHTML());
974 $tpl_menu->parseCurrentBlock();
978 $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
996 global $ilAccess,
$tpl;
998 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
1000 $ilAccess, $this->lm->getType(),
$_GET[
"ref_id"], $this->lm->getId());
1003 include_once
"Services/Object/classes/class.ilObjectListGUI.php";
1004 ilObjectListGUI::prepareJSLinks($this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
1005 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
1006 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false));
1008 $lg = $dispatcher->initHeaderAction();
1009 $lg->enableNotes(
true);
1010 $lg->enableComments($this->lm->publicNotes(),
false);
1012 if($this->lm->hasRating())
1014 $lg->enableRating(
true, $this->lng->txt(
"lm_rating"),
false,
1015 array(
"ilcommonactiondispatchergui",
"ilratinggui"));
1020 $this->tpl->setVariable(
"HEAD_ACTION",
$lg->getHeaderAction());
1025 return $lg->getHeaderAction().
1026 $tpl->getOnLoadCodeForAsynch();
1039 if ($this->lm->getType() ==
"dbk" && $this->abstract)
1052 if (!$ilSetting->get(
"disable_notes"))
1059 if ($ilSetting->get(
"disable_comments"))
1064 if (!$this->lm->publicNotes())
1069 $next_class = $this->ctrl->getNextClass($this);
1071 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1078 $notes_gui =
new ilNoteGUI($this->lm->getId(), $this->getCurrentPageId(),
"pg");
1080 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) &&
1083 $notes_gui->enablePublicNotesDeletion(
true);
1086 $this->ctrl->setParameter($this,
"frame",
$_GET[
"frame"]);
1087 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1089 $notes_gui->enablePrivateNotes();
1090 if ($this->lm->publicNotes())
1092 $notes_gui->enablePublicNotes();
1095 if ($next_class ==
"ilnotegui")
1097 $html = $this->ctrl->forwardCommand($notes_gui);
1101 $html = $notes_gui->getNotesHTML();
1103 $this->tpl->setVariable(
"NOTES",
$html);
1112 global $ilLocator, $tree,
$ilCtrl;
1114 require_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
1116 if (empty(
$_GET[
"obj_id"]))
1118 $a_id = $this->lm_tree->getRootId();
1122 $a_id =
$_GET[
"obj_id"];
1125 $this->tpl->addBlockFile(
"STATUSLINE",
"statusline",
"tpl.statusline.html");
1127 if (!$this->lm->cleanFrames())
1129 $frame_param =
$_GET[
"frame"];
1140 $frame_target =
"_top";
1145 $ilLocator->addItem(
"...",
"");
1147 $par_id = $tree->getParentId(
$_GET[
"ref_id"]);
1148 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $par_id);
1149 $ilLocator->addItem(
1151 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
1153 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1157 $ilLocator->setOffline(
true);
1160 if($this->lm_tree->isInTree($a_id))
1162 $path = $this->lm_tree->getPathFull($a_id);
1166 if (
$row[
"type"] !=
"pg")
1168 if(
$row[
"child"] != $this->lm_tree->getRootId())
1170 $ilLocator->addItem(
1173 $this->lm->isActiveNumbering(),
1174 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang),
1176 $this->getLink(
$_GET[
"ref_id"],
"layout",
$row[
"child"], $frame_param,
"StructureObject"),
1181 $ilLocator->addItem(
1183 $this->
getLink(
$_GET[
"ref_id"],
"layout",
"", $frame_param),
1184 $frame_target,
$_GET[
"ref_id"]);
1192 $ilLocator->addItem(
1196 require_once(
"./Modules/LearningModule/classes/class.ilLMObjectFactory.php");
1199 $ilLocator->addItem(
1200 $lm_obj->getTitle(),
1201 $this->getLink(
$_GET[
"ref_id"],
"layout", $a_id, $frame_param),
1207 $debug =
"DEBUG: <font color=\"red\">".$this->type.
"::".$this->
id.
"::".
$_GET[
"cmd"].
"</font><br/>";
1213 $this->tpl->setLocator();
1225 if (!$this->
offlineMode() && $this->current_page_id !==
false)
1230 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1232 $this->chapter_has_no_active_page =
false;
1233 $this->deactivated_page =
false;
1236 if(empty(
$_GET[
"obj_id"]))
1238 $obj_id = $this->lm_tree->getRootId();
1242 $obj_id =
$_GET[
"obj_id"];
1244 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1249 $this->deactivated_page =
true;
1254 if (!$this->lm_tree->isInTree($obj_id))
1259 $curr_node = $this->lm_tree->getNodeData($obj_id);
1262 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1264 if ($curr_node[
"type"] ==
"pg" &&
1267 $page_id = $curr_node[
"obj_id"];
1274 while($succ_node && !$active)
1276 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
"pg");
1277 $page_id = $succ_node[
"obj_id"];
1279 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
1282 if ($succ_node[
"type"] !=
"pg")
1284 $this->chapter_has_no_active_page =
true;
1289 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
1290 $this->lm_gui->object->getPublicAccessMode() ==
'selected')
1294 while ($public ===
false && $page_id > 0)
1296 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
'pg');
1297 $page_id = $succ_node[
'obj_id'];
1303 if ($this->lm_tree->isInTree($page_id))
1305 $path = $this->lm_tree->getPathId($page_id);
1308 $this->chapter_has_no_active_page =
true;
1313 $this->current_page_id = $page_id;
1320 $this->tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
true);
1322 $this->tpl->setVariable(
"MENU",$this->lm_gui->setilCitationMenu());
1324 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
1326 $this->pg_obj = $this->
getLMPage($page_id);
1327 $xml = $this->pg_obj->getXMLContent();
1328 $this->lm_gui->showCitation($xml);
1336 if (!is_object($this->layout_doc))
1341 $path =
"/ilLayout/ilLinkTargets/LinkTarget";
1344 for ($i = 0; $i < count(
$res->nodeset); $i++)
1346 $type =
$res->nodeset[$i]->get_attribute(
"Type");
1347 $frame =
$res->nodeset[$i]->get_attribute(
"Frame");
1348 $onclick =
$res->nodeset[$i]->get_attribute(
"OnClick");
1349 $targets[$type] = array(
"Type" => $type,
"Frame" => $frame,
"OnClick" => $onclick);
1361 function ilPage(&$a_page_node, $a_page_id = 0)
1367 $ilHelp->setScreenIdComponent(
"lm");
1368 $ilHelp->setScreenId(
"content");
1369 $ilHelp->setSubScreenId(
"content");
1371 $this->fill_on_load_code =
true;
1374 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
1375 $this->lm_gui->object->getPublicAccessMode() ==
'selected')
1392 if ($this->lm->getRestrictForwardNavigation())
1403 require_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
1404 require_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
1407 if ($a_page_id == 0)
1415 include_once
'./Services/Search/classes/class.ilUserSearchCache.php';
1418 $search_string = $cache->getQuery();
1421 if(is_array($search_string))
1423 $search_string = $search_string[
"lom_content"];
1426 include_once(
"./Services/UIComponent/TextHighlighter/classes/class.ilTextHighlighterGUI.php");
1427 include_once(
"./Services/Search/classes/class.ilQueryParser.php");
1431 $words = $p->getQuotedWords();
1432 if (is_array($words))
1434 foreach ($words as
$w)
1440 $this->fill_on_load_code =
true;
1445 $page_id = $a_page_id;
1449 $this->tpl->setCurrentBlock(
"ContentStyle");
1452 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1457 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
1459 $this->tpl->parseCurrentBlock();
1462 if ($this->chapter_has_no_active_page &&
1465 $mtpl =
new ilTemplate(
"tpl.no_content_message.html",
true,
true,
1466 "Modules/LearningModule");
1467 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_no_page_in_chapter"));
1470 $mtpl->setVariable(
"ITEM_TITLE",
1472 $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
1473 return $mtpl->get();
1477 if ($this->deactivated_page)
1479 $mtpl =
new ilTemplate(
"tpl.no_content_message.html",
true,
true,
1480 "Modules/LearningModule");
1481 $m = $this->lng->txt(
"cont_page_currently_deactivated");
1483 if ($act_data[
"show_activation_info"] &&
1486 $m.=
"<p>".sprintf($this->lng->txt(
"cont_page_activation_on"),
1491 $mtpl->setVariable(
"MESSAGE", $m);
1494 $mtpl->setVariable(
"ITEM_TITLE",
1496 $this->tpl->setVariable(
"PAGE_CONTENT", $mtpl->get());
1497 return $mtpl->get();
1502 if ($this->focus_id > 0)
1504 $path = $this->lm_tree->getPathId($page_id);
1507 if (!in_array($this->focus_id,
$path))
1509 $mtpl =
new ilTemplate(
"tpl.out_of_focus_message.html",
true,
true,
1510 "Modules/LearningModule");
1511 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message"));
1512 $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
1516 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
1517 $this->ctrl->setParameter($this,
"obj_id", $this->focus_id);
1518 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this,
"layout"));
1519 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1523 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
1524 include_once(
"./Services/Link/classes/class.ilLink.php");
1528 $this->ctrl->setParameter($this,
"focus_id",
"");
1529 $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this,
"layout"));
1530 $this->ctrl->setParameter($this,
"focus_id",
$_GET[
"focus_id"]);
1532 $focus_mess = $mtpl->get();
1542 if ($sp == 0 || !in_array($this->focus_id, $path2))
1544 $mtpl =
new ilTemplate(
"tpl.out_of_focus_message.html",
true,
true,
1545 "Modules/LearningModule");
1546 $mtpl->setVariable(
"MESSAGE", $this->lng->txt(
"cont_out_of_focus_message_last_page"));
1547 $mtpl->setVariable(
"TXT_SHOW_CONTENT", $this->lng->txt(
"cont_show_content_after_focus"));
1551 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_beginning"));
1552 $this->ctrl->setParameter($this,
"obj_id", $this->focus_id);
1553 $mtpl->setVariable(
"LINK_BACK_TO_BEGINNING", $this->ctrl->getLinkTarget($this,
"layout"));
1554 $this->ctrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
1558 $mtpl->setVariable(
"TXT_BACK_BEGINNING", $this->lng->txt(
"cont_to_focus_return_crs"));
1559 include_once(
"./Services/Link/classes/class.ilLink.php");
1563 $this->ctrl->setParameter($this,
"focus_id",
"");
1564 $mtpl->setVariable(
"LINK_SHOW_CONTENT", $this->ctrl->getLinkTarget($this,
"layout"));
1565 $this->ctrl->setParameter($this,
"focus_id",
$_GET[
"focus_id"]);
1567 $focus_mess = $mtpl->get();
1575 $cont = $this->lng->txt(
"cont_no_page");
1576 $this->tpl->setVariable(
"PAGE_CONTENT", $cont);
1583 $page_object = $page_object_gui->getPageObject();
1584 $page_object->buildDom();
1585 $page_object->registerOfflineHandler($this);
1587 $int_links = $page_object->getInternalLinks();
1591 $page_object_gui->setTemplateOutput(
false);
1594 $ilUser->setDesktopItemParameters($this->lm->getRefId(), $this->lm->getType(), $page_id);
1597 include_once
'./Modules/Course/classes/class.ilCourseLMHistory.php';
1606 $lm_pg_obj->setLMId($this->lm->getId());
1608 $page_object_gui->setLinkXML($link_xml);
1612 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
1615 if ($page_id == 0 || ($page_id != $this->lm->getHeaderPage() &&
1616 $page_id != $this->lm->getFooterPage()))
1618 $page_object_gui->setPresentationTitle(
1620 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
1621 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang));
1624 if (
$ilUser->getId() != ANONYMOUS_USER_ID && $page_id != 0 && !$this->offlineMode())
1631 $page_object_gui->setEnabledPageFocus(
false);
1632 $page_object_gui->getPageConfig()->setEnableSelfAssessment(
false);
1636 $page_object_gui->setLinkParams(
"ref_id=".$this->lm->getRefId());
1637 $page_object_gui->setTemplateTargetVar(
"PAGE_CONTENT");
1641 $this->tpl->setCurrentBlock(
"SyntaxStyle");
1644 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1649 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
1650 "syntaxhighlight.css");
1652 $this->tpl->parseCurrentBlock();
1655 $ret = $page_object_gui->presentation($page_object_gui->getOutputMode());
1658 if ($this->lm->getHeaderPage() > 0 &&
1659 $page_id != $this->lm->getHeaderPage() &&
1660 ($page_id == 0 || $page_id != $this->lm->getFooterPage()))
1664 $head = $this->
ilPage($a_page_node, $this->lm->getHeaderPage());
1669 if ($this->lm->getFooterPage() > 0 &&
1670 $page_id != $this->lm->getFooterPage() &&
1671 ($page_id == 0 || $page_id != $this->lm->getHeaderPage()))
1675 $foot = $this->
ilPage($a_page_node, $this->lm->getFooterPage());
1681 if($this->lm->hasRatingPages())
1683 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
1685 $rating_gui->setObject($this->lm->getId(),
"lm", $page_id,
"lm");
1686 $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1693 $this->ctrl->setParameter($this,
"pgid", $page_id);
1694 $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('".
1695 $this->ctrl->getLinkTarget($this,
"updatePageRating",
"",
true,
false).
1697 $this->ctrl->setParameter($this,
"pgid",
"");
1699 $rating =
'<div id="ilrtrpg" style="text-align:right">'.
1700 $rating_gui->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);").
1704 $this->tpl->setVariable(
"PAGE_CONTENT", $rating.$head.$focus_mess.$ret.$foot);
1706 return $head.$focus_mess.$ret.$foot;
1713 $pg_id =
$_GET[
"pgid"];
1714 if(!$this->ctrl->isAsynch() || !$pg_id)
1719 include_once
'./Services/Rating/classes/class.ilRating.php';
1720 $rating = (int)
$_POST[
"rating"];
1729 $pg_id,
"lm",
$ilUser->getId());
1732 include_once
'./Services/Rating/classes/class.ilRatingGUI.php';
1734 $rating->setObject($this->lm->getId(),
"lm", $pg_id,
"lm",
$ilUser->getId());
1735 $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1737 echo $rating->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);");
1739 echo $this->tpl->getOnLoadCodeForAsynch();
1751 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1753 $this->lm->getStyleSheetId(),
"lm"));
1756 $a_page_gui->setOutputMode(
"presentation");
1757 $this->fill_on_load_code =
true;
1761 $a_page_gui->setOutputMode(
"offline");
1763 $this->fill_on_load_code =
false;
1765 $a_page_gui->setFileDownloadLink($this->
getLink(
$_GET[
"ref_id"],
"downloadFile"));
1766 $a_page_gui->setFullscreenLink($this->
getLink(
$_GET[
"ref_id"],
"fullscreen"));
1780 $this->tpl->setCurrentBlock(
"ContentStyle");
1783 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1788 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
1790 $this->tpl->parseCurrentBlock();
1792 $this->tpl->addBlockFile(
"PAGE_CONTENT",
"pg_content",
"tpl.page_preconditions.html",
true);
1795 include_once(
"./Services/Repository/classes/class.ilRepositoryExplorer.php");
1796 foreach($conds as $cond)
1798 include_once(
"./Services/Link/classes/class.ilLink.php");
1800 $this->tpl->setCurrentBlock(
"condition");
1802 $this->tpl->setVariable(
"LINK_ITEM", $obj_link);
1803 if ($cond[
"operator"] ==
"passed")
1805 $cond_str = $this->lng->txt(
"passed");
1809 $cond_str = $this->lng->txt(
"condition_".$cond[
"operator"]);
1811 $this->tpl->setVariable(
"VAL_CONDITION", $cond_str.
" ".$cond[
"value"]);
1812 $this->tpl->parseCurrentBlock();
1814 $this->tpl->setCurrentBlock(
"pg_content");
1816 $this->tpl->setVariable(
"TXT_MISSING_PRECONDITIONS",
1817 sprintf($this->lng->txt(
"cont_missing_preconditions"),
1819 $this->tpl->setVariable(
"TXT_ITEM", $this->lng->txt(
"object"));
1820 $this->tpl->setVariable(
"TXT_CONDITION", $this->lng->txt(
"condition"));
1823 $parent = $this->lm_tree->getParentId($topchap);
1824 $childs = $this->lm_tree->getChildsByType($parent,
"st");
1827 foreach($childs as $child)
1829 if ($child[
"child"] == $topchap)
1835 $succ_node = $this->lm_tree->fetchSuccessorNode($child[
"child"],
"pg");
1838 if($succ_node !=
"")
1840 $framestr = (!empty(
$_GET[
"frame"]))
1841 ?
"frame=".
$_GET[
"frame"].
"&"
1844 $showViewInFrameset =
true;
1845 $link =
"<br /><a href=\"".
1846 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"],
$_GET[
"frame"]).
1847 "\">".$this->lng->txt(
"cont_skip_chapter").
"</a>";
1848 $this->tpl->setVariable(
"LINK_SKIP_CHAPTER", $link);
1851 $this->tpl->parseCurrentBlock();
1863 $showViewInFrameset =
true;
1865 if ($a_layoutframes ==
"")
1867 $a_layoutframes = array();
1869 $link_info =
"<IntLinkInfos>";
1870 foreach ($a_int_links as $int_link)
1872 $target = $int_link[
"Target"];
1873 if (substr($target, 0, 4) ==
"il__")
1877 $type = $int_link[
"Type"];
1878 $targetframe = ($int_link[
"TargetFrame"] !=
"")
1879 ? $int_link[
"TargetFrame"]
1883 $anc = $anc_add =
"";
1884 if ($int_link[
"Anchor"] !=
"")
1886 $anc = $int_link[
"Anchor"];
1887 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1893 case "StructureObject":
1895 if ($lm_id == $this->lm->getId() ||
1896 ($targetframe !=
"None" && $targetframe !=
"New"))
1898 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1902 $nframe = ($ltarget ==
"")
1907 if ($showViewInFrameset) {
1928 if ($type ==
"PageObject")
1930 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1934 $href =
"./goto.php?target=st_".$target_id;
1939 if ($type ==
"PageObject")
1941 $href = ILIAS_HTTP_PATH.
"/goto.php?target=pg_".
$target_id.$anc_add.
"&client_id=".CLIENT_ID;
1945 $href = ILIAS_HTTP_PATH.
"/goto.php?target=st_".
$target_id.
"&client_id=".CLIENT_ID;
1948 if ($targetframe !=
"New")
1954 $ltarget =
"_blank";
1959 case "GlossaryItem":
1960 if ($targetframe ==
"None")
1962 $targetframe =
"Glossary";
1964 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1965 $nframe = ($ltarget ==
"")
1973 $ltarget = $a_layoutframes[$targetframe][
"Frame"];
1974 $nframe = ($ltarget ==
"")
1981 case "RepositoryItem":
1986 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1990 $href = ILIAS_HTTP_PATH.
"/goto.php?target=".$obj_type.
"_".
$target_id.
"&client_id=".CLIENT_ID;
1996 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
2004 $ilCtrl->setParameter($this,
"file_id",
"il__file_".
$target_id);
2005 $href =
$ilCtrl->getLinkTarget($this,
"downloadFile");
2006 $ilCtrl->setParameter($this,
"file_id",
"");
2007 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
2012 $anc_par =
'Anchor="'.$anc.
'"';
2014 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
2015 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
2026 $link_info.=
"</IntLinkInfos>";
2035 $link_info =
"<LinkTargets>";
2038 $link_info.=
"<LinkTarget TargetFrame=\"".$t[
"Type"].
"\" LinkTarget=\"".
$t[
"Frame"].
"\" OnClick=\"".
$t[
"OnClick"].
"\" />";
2040 $link_info.=
"</LinkTargets>";
2051 require_once(
"./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
2055 $this->tpl->setCurrentBlock(
"ContentStyle");
2058 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2063 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2065 $this->tpl->parseCurrentBlock();
2068 $this->tpl->setCurrentBlock(
"SyntaxStyle");
2072 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
2077 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
2078 "syntaxhighlight.css");
2080 $this->tpl->parseCurrentBlock();
2082 $int_links = $term_gui->getInternalLinks();
2085 $term_gui->setLinkXML($link_xml);
2090 $ilCtrl->setParameter($this,
"pg_type",
"glo");
2092 $term_gui->output($this->
offlineMode(), $this->tpl);
2098 $ilCtrl->setParameter($this,
"pg_type",
"");
2109 $this->tpl->setCurrentBlock(
"ContentStyle");
2112 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2117 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2119 $this->tpl->parseCurrentBlock();
2130 $style_name =
$ilUser->getPref(
"style").
".css";;
2131 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
2134 $this->tpl->setCurrentBlock(
"ilMedia");
2141 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2143 if (!empty (
$_GET[
"pg_id"]))
2145 require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2147 $pg_obj->buildDom();
2152 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2173 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2174 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2189 $mode = (
$_GET[
"cmd"] ==
"fullscreen")
2194 $this->
getLink($this->lm->getRefId(),
"fullscreen");
2195 $params = array (
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2196 'link_params' =>
"ref_id=".$this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
2197 'ref_id' => $this->lm->getRefId(),
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
2198 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args,
$params);
2203 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
2206 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
2215 if ($a_inline !=
"")
2217 $js_tpl =
new ilTemplate($a_inline,
true,
false, $a_location);
2218 $js = $js_tpl->get();
2219 $this->tpl->setVariable(
"INLINE_JS",
$js);
2244 if ($this->chapter_has_no_active_page &&
2247 $c_id =
$_GET[
"obj_id"];
2251 if ($this->deactivated_page)
2253 $c_id =
$_GET[
"obj_id"];
2262 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
2263 $c_id = $succ_node[
"obj_id"];
2266 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2268 if ($succ_node[
"obj_id"] > 0 &&
2269 (
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2270 ( $this->lm->getPublicAccessMode() ==
"selected" &&
2275 else if ($succ_node[
"obj_id"] > 0 && !$active)
2279 if ($act_data[
"show_activation_info"] &&
2297 return $succ_node[
"obj_id"];
2311 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2313 include_once(
"./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
2323 if(!$this->lm_tree->isInTree($page_id))
2329 $limpos = strpos(
$_GET[
"back_pg"],
":");
2332 $back_pg = substr(
$_GET[
"back_pg"], 0, $limpos);
2336 $back_pg =
$_GET[
"back_pg"];
2338 if (!$this->lm->cleanFrames())
2341 $this->
getLink($this->lm->getRefId(),
"layout", $back_pg,
$_GET[
"frame"],
2348 $this->
getLink($this->lm->getRefId(),
"layout", $back_pg,
"",
2350 $back_target =
'target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2354 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
2355 $this->tpl->setVariable(
"IMG_PREV", $back_img);
2356 $this->tpl->setVariable(
"HREF_PREV", $back_href);
2357 $this->tpl->setVariable(
"FRAME_PREV", $back_target);
2358 $this->tpl->setVariable(
"TXT_PREV", $this->lng->txt(
"back"));
2359 $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"back"));
2360 $this->tpl->setVariable(
"PREV_ACC_KEY",
2362 $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
2363 ?
"images/spacer.png"
2365 $this->tpl->parseCurrentBlock();
2366 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
2367 $this->tpl->setVariable(
"IMG_PREV2", $back_img);
2368 $this->tpl->setVariable(
"HREF_PREV2", $back_href);
2369 $this->tpl->setVariable(
"FRAME_PREV2", $back_target);
2370 $this->tpl->setVariable(
"TXT_PREV2", $this->lng->txt(
"back"));
2371 $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"back"));
2372 $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
2373 ?
"images/spacer.png"
2375 $this->tpl->parseCurrentBlock();
2383 if ($this->chapter_has_no_active_page &&
2386 $c_id =
$_GET[
"obj_id"];
2390 if ($this->deactivated_page)
2392 $c_id =
$_GET[
"obj_id"];
2401 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
2402 $c_id = $succ_node[
"obj_id"];
2405 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2407 if ($succ_node[
"obj_id"] > 0 &&
2408 (
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2409 ( $this->lm->getPublicAccessMode() ==
"selected" &&
2414 else if ($succ_node[
"obj_id"] > 0 && !$active)
2418 if ($act_data[
"show_activation_info"] &&
2434 $succ_str = ($succ_node !==
false)
2435 ?
" -> ".$succ_node[
"obj_id"].
"_".$succ_node[
"type"]
2440 if ($this->deactivated_page)
2442 $c_id =
$_GET[
"obj_id"];
2450 $pre_node = $this->lm_tree->fetchPredecessorNode($c_id,
"pg");
2451 $c_id = $pre_node[
"obj_id"];
2453 $this->lm->getType(), $this->lm_set->get(
"time_scheduled_page_activation"));
2454 if ($pre_node[
"obj_id"] > 0 &&
2455 (
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2456 ($this->lm->getPublicAccessMode() ==
"selected" &&
2461 else if ($pre_node[
"obj_id"] > 0 && !$active)
2465 if ($act_data[
"show_activation_info"] &&
2481 $pre_str = ($pre_node !==
false)
2482 ? $pre_node[
"obj_id"].
"_".$pre_node[
"type"].
" -> "
2486 $framestr = (!empty(
$_GET[
"frame"]))
2487 ?
"frame=".
$_GET[
"frame"].
"&"
2493 $showViewInFrameset =
true;
2499 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2500 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
2505 if (!$this->lm->cleanFrames())
2508 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"],
$_GET[
"frame"]);
2511 else if ($showViewInFrameset && !$this->
offlineMode())
2514 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"]);
2515 $prev_target =
'target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2520 $this->
getLink($this->lm->getRefId(),
"layout", $pre_node[
"obj_id"]);
2521 $prev_target =
'target="_top" ';
2524 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2527 $output = $this->lng->txt(
"msg_page_not_public");
2530 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev");
2531 $this->tpl->setVariable(
"IMG_PREV", $prev_img);
2532 $this->tpl->setVariable(
"HREF_PREV", $prev_href);
2533 $this->tpl->setVariable(
"FRAME_PREV", $prev_target);
2534 $this->tpl->setVariable(
"TXT_PREV", $prev_title);
2535 $this->tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"previous"));
2536 $this->tpl->setVariable(
"SPACER_PREV", $this->
offlineMode()
2537 ?
"images/spacer.png"
2539 $this->tpl->setVariable(
"PREV_ACC_KEY",
2541 $this->tpl->parseCurrentBlock();
2542 $this->tpl->setCurrentBlock(
"ilLMNavigation_Prev2");
2543 $this->tpl->setVariable(
"IMG_PREV2", $prev_img);
2544 $this->tpl->setVariable(
"HREF_PREV2", $prev_href);
2545 $this->tpl->setVariable(
"FRAME_PREV2", $prev_target);
2546 $this->tpl->setVariable(
"TXT_PREV2", $prev_title);
2547 $this->tpl->setVariable(
"ALT_PREV2", $this->lng->txt(
"previous"));
2548 $this->tpl->setVariable(
"SPACER_PREV2", $this->
offlineMode()
2549 ?
"images/spacer.png"
2551 $this->tpl->parseCurrentBlock();
2553 if($succ_node !=
"")
2557 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
2558 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
2562 if (!$this->lm->cleanFrames())
2565 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"],
$_GET[
"frame"]);
2568 else if ($showViewInFrameset && !$this->
offlineMode())
2571 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"]);
2572 $succ_target =
' target="'.ilFrameTargetInfo::_getFrame(
"MainContent").
'" ';
2577 $this->
getLink($this->lm->getRefId(),
"layout", $succ_node[
"obj_id"]);
2578 $succ_target =
' target="_top" ';
2581 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
2584 $output = $this->lng->txt(
"msg_page_not_public");
2587 $this->tpl->setCurrentBlock(
"ilLMNavigation_Next");
2588 $this->tpl->setVariable(
"IMG_SUCC", $succ_img);
2589 $this->tpl->setVariable(
"HREF_SUCC", $succ_href);
2590 $this->tpl->setVariable(
"FRAME_SUCC", $succ_target);
2591 $this->tpl->setVariable(
"TXT_SUCC", $succ_title);
2592 $this->tpl->setVariable(
"ALT_SUCC", $this->lng->txt(
"next"));
2593 $this->tpl->setVariable(
"SPACER_SUCC", $this->
offlineMode()
2594 ?
"images/spacer.png"
2596 $this->tpl->setVariable(
"NEXT_ACC_KEY",
2598 $this->tpl->parseCurrentBlock();
2599 $this->tpl->setCurrentBlock(
"ilLMNavigation_Next2");
2600 $this->tpl->setVariable(
"IMG_SUCC2", $succ_img);
2601 $this->tpl->setVariable(
"HREF_SUCC2", $succ_href);
2602 $this->tpl->setVariable(
"FRAME_SUCC2", $succ_target);
2603 $this->tpl->setVariable(
"TXT_SUCC2", $succ_title);
2604 $this->tpl->setVariable(
"ALT_SUCC2", $this->lng->txt(
"next"));
2605 $this->tpl->setVariable(
"SPACER_SUCC2", $this->
offlineMode()
2606 ?
"images/spacer.png"
2608 $this->tpl->parseCurrentBlock();
2613 if ($this->lm->getRestrictForwardNavigation())
2615 if ($this->
getTracker()->hasPredIncorrectAnswers($succ_node[
"obj_id"]))
2617 $this->tpl->addOnLoadCode(
"$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
2627 $child_nodes = $a_node->child_nodes();
2628 foreach ($child_nodes as $child)
2630 if($child->node_name() ==
"ilFrame")
2632 $attributes = $this->
attrib2arr($child->attributes());
2634 if ((!empty($attributes[
"rows"])) || (!empty($attrubtes[
"cols"])))
2638 if(!empty($attributes[
"name"]))
2640 unset($attributes[
"template"]);
2641 unset($attributes[
"template_location"]);
2642 $attributes[
"src"] =
2643 $this->
getLink($this->lm->getRefId(),
"layout",
$_GET[
"obj_id"], $attributes[
"name"],
2644 "",
"keep",
"",
$_GET[
"srcstring"]);
2645 $attributes[
"title"] = $this->lng->txt(
"cont_frame_".$attributes[
"name"]);
2646 $a_content .= $this->
buildTag(
"",
"frame", $attributes);
2647 $this->frames[$attributes[
"name"]] = $attributes[
"name"];
2652 $a_content .= $this->
buildTag(
"start",
"frameset", $attributes);
2654 $a_content .= $this->
buildTag(
"end",
"frameset");
2659 unset($attributes[
"template"]);
2660 unset($attributes[
"template_location"]);
2661 $attributes[
"src"] =
2662 $this->
getLink($this->lm->getRefId(),
"layout",
$_GET[
"obj_id"], $attributes[
"name"],
2663 "",
"keep",
"",
$_GET[
"srcstring"]);
2664 $attributes[
"title"] = $this->lng->txt(
"cont_frame_".$attributes[
"name"]);
2665 if ($attributes[
"name"] ==
"toc")
2667 $attributes[
"src"].=
"#".$_GET[
"obj_id"];
2672 if (
$_GET[
"anchor"] !=
"")
2674 $attributes[
"src"].=
"#".rawurlencode(
$_GET[
"anchor"]);
2677 $a_content .= $this->
buildTag(
"",
"frame", $attributes);
2678 $this->frames[$attributes[
"name"]] = $attributes[
"name"];
2700 if (is_array($attr))
2702 while (list($k,$v) = each($attr))
2703 $tag.=
" ".$k.
"=\"$v\"";
2722 if (!$this->lm->isActiveTOC() || !$this->lm->isActiveLMMenu())
2728 $this->tpl->setCurrentBlock(
"ContentStyle");
2731 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2736 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2738 $this->tpl->parseCurrentBlock();
2749 $style_name =
$ilUser->getPref(
"style").
".css";;
2750 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
2754 $this->tpl->getStandardTemplate();
2757 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2758 ,$this->getExportFormat(),
"toc",
true));
2761 $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
2765 include_once(
"./Modules/LearningModule/classes/class.ilLMTableOfContentsExplorerGUI.php");
2768 if (!$exp->handleCommand())
2772 if ($this->deactivated_page)
2774 $page_id =
$_GET[
"obj_id"];
2777 if ($this->chapter_has_no_active_page &&
2780 $exp->setHighlightNode(
$_GET[
"obj_id"]);
2784 if ($this->lm->getTOCMode() ==
"pages")
2786 if ($this->deactivated_page)
2788 $exp->setHighlightNode(
$_GET[
"obj_id"]);
2792 $exp->setHighlightNode($page_id);
2797 $exp->setHighlightNode($this->lm_tree->getParentId($page_id));
2802 $exp->setOfflineMode(
true);
2805 $this->tpl->setVariable(
"ADM_CONTENT", $exp->getHTML());
2809 return $this->tpl->get();
2825 $this->ctrl->setCmd(
"showSummary");
2826 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2840 global $ilAccess, $ilLocator,
$ilUser;
2851 $style_name =
$ilUser->getPref(
"style").
".css";;
2852 $this->tpl->setStyleSheetLocation(
"./".$style_name);
2855 $this->tpl->getStandardTemplate();
2859 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2860 ,$this->getExportFormat(), $a_active_tab,
true));
2863 if ($ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
2869 $ilLocator->addRepositoryItems();
2870 $this->tpl->setLocator();
2883 $this->lng->loadLanguageModule(
"meta");
2885 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2888 $info->enablePrivateNotes();
2889 $info->enableLearningProgress();
2891 $info->enableNews();
2892 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
2895 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
2897 $info->enableNewsEditing();
2899 if ($enable_internal_rss)
2901 $info->setBlockProperty(
"news",
"settings",
true);
2923 $info->addMetaDataSections($this->lm->getId(),0, $this->lm->getType());
2927 $this->tpl->setContent(
$info->getHTML());
2928 return $this->tpl->get();
2933 $this->ctrl->forwardCommand(
$info);
2946 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
2947 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu())
2952 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
2955 $this->tpl->setCurrentBlock(
"ContentStyle");
2958 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
2963 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
2965 $this->tpl->parseCurrentBlock();
2969 $this->tpl->getStandardTemplate();
2971 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
2972 ,$this->getExportFormat(),
"print",
true));
2975 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
2976 "tpl.lm_print_selection.html",
"Modules/LearningModule");
2987 $this->ctrl->setParameterByClass(
"illmpresentationgui",
"obj_id",
$_GET[
"obj_id"]);
2988 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
2990 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
2992 if (!is_array(
$_POST[
"item"]))
2994 if (
$_GET[
"obj_id"] !=
"")
3006 foreach ($nodes as $node)
3011 $this->lm_set->get(
"time_scheduled_page_activation"));
3013 if ($node[
"type"] ==
"pg" &&
3019 $text = $img_scr = $img_alt =
"";
3023 switch ($node[
"type"])
3029 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3030 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
3032 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased)&&
3033 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3038 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3042 $img_alt =
$lng->txt(
"icon").
" ".
$lng->txt(
"pg");
3049 $img_alt =
$lng->txt(
"icon").
" ".
$lng->txt(
"obj_lm");
3056 $this->lm->isActiveNumbering(),
3057 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang);
3058 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3059 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3064 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3068 $img_alt =
$lng->txt(
"icon").
" ".
$lng->txt(
"st");
3074 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3077 $this->nl->addListNode($node[
"obj_id"],
$text, $node[
"parent"], $checked, $disabled,
3078 $img_src, $img_alt);
3083 if (
$_GET[
"obj_id"] > 0 && !$this->lm_tree->isInTree(
$_GET[
"obj_id"]))
3087 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3088 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
3090 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3091 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3096 $text.=
" (".$this->lng->txt(
"cont_no_access").
")";
3100 $id =
$_GET[
"obj_id"];
3104 $this->nl->addListNode($id,
$text, 0, $checked, $disabled,
3105 $img_src, $img_alt);
3108 $f = $this->form->getHTML();
3112 $tb->addFormButton(
$lng->txt(
"cont_show_print_view"),
"showPrintView");
3113 $this->tpl->setVariable(
"TOOLBAR", $tb->getHTML());
3115 $this->tpl->setVariable(
"ITEM_SELECTION", $f);
3127 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3132 $radg->setValue(
"page");
3134 $radg->addOption($op1);
3136 $radg->addOption($op2);
3138 $radg->addOption($op3);
3140 include_once(
"./Services/Form/classes/class.ilNestedListInputGUI.php");
3143 $op3->addSubItem($nl);
3146 $this->form->addItem($radg);
3148 $this->form->addCommandButton(
"showPrintView",
$lng->txt(
"cont_show_print_view"));
3149 $this->form->setOpenTag(
false);
3150 $this->form->setCloseTag(
false);
3152 $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
3153 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
3163 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
3165 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu())
3174 if (
$_POST[
"sel_type"] ==
"page")
3176 if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id,
$_POST[
"obj_id"]))
3178 $_POST[
"obj_id"][] = $c_obj_id;
3181 if (
$_POST[
"sel_type"] ==
"chapter" && $c_obj_id > 0)
3184 $path = $this->lm_tree->getPathFull($c_obj_id);
3185 $chap_id =
$path[1][
"child"];
3188 $_POST[
"obj_id"][] = $chap_id;
3201 $style_name =
$ilUser->getPref(
"style").
".css";;
3202 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/".$style_name);
3206 $this->tpl->setCurrentBlock(
"ContentStyle");
3209 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
3214 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
3216 $this->tpl->parseCurrentBlock();
3219 $this->tpl->setCurrentBlock(
"SyntaxStyle");
3220 $this->tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
3222 $this->tpl->parseCurrentBlock();
3225 $this->tpl->addBlockFile(
"CONTENT",
"content",
"tpl.lm_print_view.html",
true);
3230 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
3232 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
3233 include_once(
"./Modules/LearningModule/classes/class.ilLMPageObject.php");
3234 include_once(
"./Modules/LearningModule/classes/class.ilStructureObject.php");
3239 $glossary_links = array();
3240 $output_header =
false;
3241 $media_links = array();
3244 if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint())
3248 $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
3249 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3251 $this->lm->getStyleSheetId(),
"lm"));
3255 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3256 $page_object_gui->setOutputMode(
"print");
3257 $page_object_gui->setPresentationTitle(
"");
3258 $page_object_gui->setFileDownloadLink(
"#");
3259 $page_object_gui->setFullscreenLink(
"#");
3260 $page_object_gui->setSourceCodeDownloadScript(
"#");
3261 $footer_page_content = $page_object_gui->showPage();
3264 if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint())
3268 $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
3269 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3271 $this->lm->getStyleSheetId(),
"lm"));
3275 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3276 $page_object_gui->setOutputMode(
"print");
3277 $page_object_gui->setPresentationTitle(
"");
3278 $page_object_gui->setFileDownloadLink(
"#");
3279 $page_object_gui->setFullscreenLink(
"#");
3280 $page_object_gui->setSourceCodeDownloadScript(
"#");
3281 $header_page_content = $page_object_gui->showPage();
3286 if (is_array(
$_POST[
"obj_id"]))
3288 foreach(
$_POST[
"obj_id"] as $k)
3290 if ($k > 0 && !$this->lm_tree->isInTree($k))
3294 $nodes[] = array(
"obj_id" => $k,
"type" =>
"pg",
"free" =>
true);
3302 $ilCtrl->redirect($this,
"showPrintViewSelection");
3305 foreach ($nodes as $node_key => $node)
3309 $this->lm_set->get(
"time_scheduled_page_activation"));
3310 if ($node[
"type"] ==
"pg" && !$active)
3317 if ($node[
"depth"] <= $act_level)
3319 if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"],
$_POST[
"obj_id"]))
3321 $act_level = $node[
"depth"];
3335 if ($node[
"type"] ==
"du")
3337 $output_header =
true;
3341 if ($node[
"type"] ==
"st")
3343 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3344 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3353 $this->tpl->setCurrentBlock(
"print_chapter");
3355 $chapter_title = $chap->_getPresentationTitle($node[
"obj_id"],
3356 $this->lm->isActiveNumbering(),
3357 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang);
3358 $this->tpl->setVariable(
"CHAP_TITLE",
3363 if ($nodes[$node_key + 1][
"type"] ==
"pg")
3365 $this->tpl->setVariable(
"CHAP_HEADER",
3366 $header_page_content);
3367 $did_chap_page_header =
true;
3371 $this->tpl->parseCurrentBlock();
3372 $this->tpl->setCurrentBlock(
"print_block");
3373 $this->tpl->parseCurrentBlock();
3377 if ($node[
"type"] ==
"pg")
3379 if((
$ilUser->getId() == ANONYMOUS_USER_ID || $this->needs_to_be_purchased) &&
3380 $this->lm_gui->object->getPublicAccessMode() ==
"selected")
3388 $this->tpl->setCurrentBlock(
"print_item");
3391 $page_id = $node[
"obj_id"];
3393 $page_object = $page_object_gui->getPageObject();
3394 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
3396 $this->lm->getStyleSheetId(),
"lm"));
3401 $lm_pg_obj->setLMId($this->lm->getId());
3404 $page_object_gui->setLinkFrame(
$_GET[
"frame"]);
3405 $page_object_gui->setOutputMode(
"print");
3406 $page_object_gui->setPresentationTitle(
"");
3408 if ($this->lm->getPageHeader() ==
IL_PAGE_TITLE || $node[
"free"] ===
true)
3411 $this->lm->getPageHeader(), $this->lm->isActiveNumbering(),
3412 $this->lm_set->get(
"time_scheduled_page_activation"),
false, 0, $this->lang);
3416 if ($this->lm->isActiveNumbering())
3418 $chapter_title = trim(substr($chapter_title,
3419 strpos($chapter_title,
" ")));
3422 if ($page_title != $chapter_title)
3424 $page_object_gui->setPresentationTitle($page_title);
3429 $hcont = $header_page_content;
3430 $fcont = $footer_page_content;
3434 if ($did_chap_page_header)
3438 if ($nodes[$node_key + 1][
"type"] ==
"pg" &&
3439 !($nodes[$node_key + 1][
"depth"] <= $act_level
3440 && !in_array($nodes[$node_key + 1][
"obj_id"],
$_POST[
"obj_id"])))
3446 $page_object_gui->setFileDownloadLink(
"#");
3447 $page_object_gui->setFullscreenLink(
"#");
3448 $page_object_gui->setSourceCodeDownloadScript(
"#");
3449 $page_content = $page_object_gui->showPage();
3452 $this->tpl->setVariable(
"CONTENT",
3453 $hcont.$page_content.$fcont);
3457 $this->tpl->setVariable(
"CONTENT",
3458 $hcont.$page_content.$fcont.
"<br />");
3460 $chapter_title =
"";
3461 $this->tpl->parseCurrentBlock();
3462 $this->tpl->setCurrentBlock(
"print_block");
3463 $this->tpl->parseCurrentBlock();
3470 foreach ($int_links as $key => $link)
3472 if ($link[
"type"] ==
"git" &&
3473 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0))
3475 $glossary_links[$key] = $link;
3477 if ($link[
"type"] ==
"mob" &&
3478 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0))
3481 $mob_links[$key] = $link;
3492 $page_object->buildDom();
3493 $links = $page_object->getInternalLinks();
3494 foreach($links as $link)
3496 if ($link[
"Type"] ==
"MediaObject"
3497 && $link[
"TargetFrame"] !=
""
3498 && $link[
"TargetFrame"] !=
"None")
3500 $media_links[] = $link;
3512 if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix())
3514 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
3515 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
3520 foreach($glossary_links as $key => $link)
3523 $terms[$term.
":".$key] = array(
"key" => $key,
"link" => $link,
"term" => $term);
3528 foreach($terms as
$t)
3536 foreach($defs as $def)
3539 if (count($defs) > 1)
3541 $this->tpl->setCurrentBlock(
"def_title");
3542 $this->tpl->setVariable(
"TXT_DEFINITION",
3543 $this->lng->txt(
"cont_definition").
" ".($def_cnt++));
3544 $this->tpl->parseCurrentBlock();
3546 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPageGUI.php");
3548 $page_gui->setTemplateOutput(
false);
3549 $page_gui->setOutputMode(
"print");
3551 $this->tpl->setCurrentBlock(
"definition");
3552 $page_gui->setFileDownloadLink(
"#");
3553 $page_gui->setFullscreenLink(
"#");
3554 $page_gui->setSourceCodeDownloadScript(
"#");
3555 $output = $page_gui->showPage();
3556 $this->tpl->setVariable(
"VAL_DEFINITION", $output);
3557 $this->tpl->parseCurrentBlock();
3561 $this->tpl->setCurrentBlock(
"term");
3562 $this->tpl->setVariable(
"VAL_TERM",
3564 $this->tpl->parseCurrentBlock();
3569 $this->tpl->setCurrentBlock(
"glossary");
3570 $annex_title = $this->lng->txt(
"cont_annex").
" ".
3571 chr(64+$annex_cnt).
": ".$this->lng->txt(
"glo");
3572 $this->tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
3573 $this->tpl->parseCurrentBlock();
3575 $annexes[] = $annex_title;
3579 if (count($media_links) > 0)
3581 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3582 include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
3584 foreach($media_links as $media)
3586 if (substr($media[
"Target"],0,4) ==
"il__")
3588 $arr = explode(
"_",$media[
"Target"]);
3589 $id = $arr[count($arr) - 1];
3592 $med_item = $med_obj->getMediaItem(
"Standard");
3593 if (is_object($med_item))
3595 if (is_int(strpos($med_item->getFormat(),
"image")))
3597 $this->tpl->setCurrentBlock(
"ref_image");
3600 if ($med_item->getLocationType() ==
"LocalFile")
3602 $this->tpl->setVariable(
"IMG_SOURCE",
3604 "/".$med_item->getLocation());
3608 $this->tpl->setVariable(
"IMG_SOURCE",
3609 $med_item->getLocation());
3612 if ($med_item->getCaption() !=
"")
3614 $this->tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
3618 $this->tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
3620 $this->tpl->parseCurrentBlock();
3628 $this->tpl->setCurrentBlock(
"ref_images");
3629 $annex_title = $this->lng->txt(
"cont_annex").
" ".
3630 chr(64+$annex_cnt).
": ".$this->lng->txt(
"cont_ref_images");
3631 $this->tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
3632 $this->tpl->parseCurrentBlock();
3634 $annexes[] = $annex_title;
3640 $this->tpl->setCurrentBlock(
"print_header");
3642 if ($this->lm->getDescription() !=
"none")
3644 include_once(
"Services/MetaData/classes/class.ilMD.php");
3645 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
3646 $md_gen = $md->getGeneral();
3647 foreach($md_gen->getDescriptionIds() as $id)
3649 $md_des = $md_gen->getDescription($id);
3650 $description = $md_des->getDescription();
3653 $this->tpl->setVariable(
"LM_DESCRIPTION",
3656 $this->tpl->parseCurrentBlock();
3660 foreach ($nodes2 as $node2)
3662 if ($node2[
"type"] ==
"st"
3665 for ($j=1; $j < $node2[
"depth"]; $j++)
3667 $this->tpl->setCurrentBlock(
"indent");
3669 $this->tpl->parseCurrentBlock();
3671 $this->tpl->setCurrentBlock(
"toc_entry");
3672 $this->tpl->setVariable(
"TXT_TOC_TITLE",
3674 $this->lm->isActiveNumbering(),
3675 $this->lm_set->get(
"time_scheduled_page_activation"), 0, $this->lang));
3676 $this->tpl->parseCurrentBlock();
3681 foreach ($annexes as $annex)
3683 $this->tpl->setCurrentBlock(
"indent");
3685 $this->tpl->parseCurrentBlock();
3686 $this->tpl->setCurrentBlock(
"toc_entry");
3687 $this->tpl->setVariable(
"TXT_TOC_TITLE", $annex);
3688 $this->tpl->parseCurrentBlock();
3691 $this->tpl->setCurrentBlock(
"toc");
3692 $this->tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
3693 $this->tpl->parseCurrentBlock();
3695 $this->tpl->setCurrentBlock(
"print_start_block");
3696 $this->tpl->parseCurrentBlock();
3700 include_once
'Services/MetaData/classes/class.ilMD.php';
3701 $md =
new ilMD($this->lm->getId(),0, $this->lm->getType());
3702 if(is_object($lifecycle = $md->getLifecycle()))
3704 $sep = $author =
"";
3705 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
3707 $md_con = $lifecycle->getContribute($con_id);
3708 if ($md_con->getRole() ==
"Author")
3710 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
3712 $md_ent = $md_con->getEntity($ent_id);
3713 $author = $author.$sep.$md_ent->getEntity();
3720 $this->lng->loadLanguageModule(
"meta");
3721 $this->tpl->setCurrentBlock(
"author");
3722 $this->tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
3723 $this->tpl->setVariable(
"LM_AUTHOR", $author);
3724 $this->tpl->parseCurrentBlock();
3730 if (is_object($md_rights = $md->getRights()))
3732 $copyright = $md_rights->getDescription();
3733 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
3736 if ($copyright !=
"")
3738 $this->lng->loadLanguageModule(
"meta");
3739 $this->tpl->setCurrentBlock(
"copyright");
3740 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
3741 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
3742 $this->tpl->parseCurrentBlock();
3746 $this->tpl->show(
false);
3755 $pg_obj->buildDom();
3756 $int_links = $pg_obj->getInternalLinks();
3757 foreach ($int_links as $il)
3759 if ($il[
"Target"] == str_replace(
"_file_",
"_dfile_",
$_GET[
"file_id"]))
3763 require_once(
"./Modules/File/classes/class.ilObjFile.php");
3764 $fileObj =
new ilObjFile($file_id,
false);
3765 $fileObj->sendFile();
3769 if (in_array(
$_GET[
"file_id"], $pg_obj->getAllFileObjIds()))
3771 require_once(
"./Modules/File/classes/class.ilObjFile.php");
3774 $fileObj =
new ilObjFile($file_id,
false);
3775 $fileObj->sendFile();
3786 require_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
3788 $pg_obj->send_paragraph (
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
3796 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu())
3802 $this->tpl->setCurrentBlock(
"ContentStyle");
3805 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
3810 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
3812 $this->tpl->parseCurrentBlock();
3816 $this->tpl->getStandardTemplate();
3818 $this->tpl->setVariable(
"TABS", $this->lm_gui->setilLMMenu($this->offlineMode()
3819 ,$this->getExportFormat(),
"download",
true));
3823 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_download_list.html",
"Modules/LearningModule");
3836 include_once
'Services/MetaData/classes/class.ilMD.php';
3837 $md =
new ilMD($this->lm->getId(),0, $this->lm->getType());
3838 if (is_object($md_rights = $md->getRights()))
3840 $copyright = $md_rights->getDescription();
3842 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
3845 if ($copyright !=
"")
3847 $this->lng->loadLanguageModule(
"meta");
3848 $this->tpl->setCurrentBlock(
"copyright");
3849 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
3850 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
3851 $this->tpl->parseCurrentBlock();
3856 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
3860 $this->tpl->addBlockfile(
"DOWNLOAD_TABLE",
"download_table",
"tpl.table.html");
3863 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.download_file_row.html",
"Modules/LearningModule");
3865 $export_files = array();
3866 $types = array(
"xml",
"html",
"scorm");
3867 foreach($types as $type)
3869 if ($this->lm->getPublicExportFile($type) !=
"")
3871 if (is_file($this->lm->getExportDirectory($type).
"/".
3872 $this->lm->getPublicExportFile($type)))
3874 $dir = $this->lm->getExportDirectory($type);
3875 $size = filesize($this->lm->getExportDirectory($type).
"/".
3876 $this->lm->getPublicExportFile($type));
3877 $export_files[] = array(
"type" => $type,
3878 "file" => $this->lm->getPublicExportFile($type),
3886 $tbl->setTitle($this->lng->txt(
"download"));
3888 $tbl->setHeaderNames(array($this->lng->txt(
"cont_format"),
3889 $this->lng->txt(
"cont_file"),
3890 $this->lng->txt(
"size"), $this->lng->txt(
"date"),
3893 $cols = array(
"format",
"file",
"size",
"date",
"download");
3894 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
"obj_id" =>
$_GET[
"obj_id"],
3895 "cmd" =>
"showDownloadList",
"cmdClass" => strtolower(get_class($this)));
3896 $tbl->setHeaderVars($cols, $header_params);
3897 $tbl->setColumnWidth(array(
"10%",
"30%",
"20%",
"20%",
"20%"));
3898 $tbl->disable(
"sort");
3902 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
3905 $tbl->setMaxCount($this->maxcount);
3911 $tbl->disable(
"footer");
3913 $tbl->setMaxCount(count($export_files));
3914 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
3916 if(count($export_files) > 0)
3920 foreach($export_files as $exp_file)
3922 if (!$exp_file[
"size"] > 0)
3927 $this->tpl->setCurrentBlock(
"tbl_content");
3928 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
3931 $this->tpl->setVariable(
"CSS_ROW", $css_row);
3933 include_once(
"./Services/Utilities/classes/class.ilFormat.php");
3935 $this->tpl->setVariable(
"TXT_FORMAT", strtoupper($exp_file[
"type"]));
3936 $this->tpl->setVariable(
"CHECKBOX_ID", $exp_file[
"type"].
":".$exp_file[
"file"]);
3938 $file_arr = explode(
"__", $exp_file[
"file"]);
3939 include_once(
"./Services/Calendar/classes/class.ilDatePresentation.php");
3943 $this->tpl->setVariable(
"TXT_DOWNLOAD", $this->lng->txt(
"download"));
3944 $this->ctrl->setParameter($this,
"type", $exp_file[
"type"]);
3945 $this->tpl->setVariable(
"LINK_DOWNLOAD",
3946 $this->ctrl->getLinkTarget($this,
"downloadExportFile"));
3948 $this->tpl->parseCurrentBlock();
3965 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu())
3970 $file = $this->lm->getPublicExportFile(
$_GET[
"type"]);
3971 if ($this->lm->getPublicExportFile(
$_GET[
"type"]) !=
"")
3973 $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
3974 if (is_file($dir.
"/".
$file))
3993 return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$a_ref_id.
"&obj_id=".$a_obj_id.
"&focus_id=".
3994 $a_obj_id.
"&focus_return=".$a_return_ref_id;
4001 function getLink($a_ref_id, $a_cmd =
"", $a_obj_id =
"", $a_frame =
"", $a_type =
"",
4002 $a_back_link =
"append", $a_anchor =
"", $a_srcstring =
"")
4013 $back_pg =
$_GET[
"back_pg"];
4014 if ($a_obj_id !=
"" && !$this->lm_tree->isInTree($a_obj_id) && $cur_page_id !=
"" &&
4015 $a_back_link ==
"append")
4019 $back_pg = $cur_page_id.
":".$back_pg;
4023 $back_pg = $cur_page_id;
4028 if ($a_back_link ==
"reduce")
4030 $limpos = strpos(
$_GET[
"back_pg"],
":");
4034 $back_pg = substr($back_pg, strpos($back_pg,
":") + 1);
4041 else if ($a_back_link !=
"keep")
4050 if (
$_GET[
"from_page"] ==
"")
4052 $this->ctrl->setParameter($this,
"from_page", $cur_page_id);
4058 if (!in_array($a_frame, array(
"",
"_blank")))
4060 $this->ctrl->setParameter($this,
"from_page",
$_GET[
"from_page"]);
4064 if ($a_anchor !=
"")
4066 $this->ctrl->setParameter($this,
"anchor", rawurlencode($a_anchor));
4068 if ($a_srcstring !=
"")
4070 $this->ctrl->setParameter($this,
"srcstring", $a_srcstring);
4075 $link = $this->ctrl->getLinkTarget($this,
"fullscreen",
"",
false,
false);
4082 $this->ctrl->setParameter($this,
"back_pg", $back_pg);
4086 $this->ctrl->setParameter($this,
"frame", $a_frame);
4088 if ($a_obj_id !=
"")
4093 $this->ctrl->setParameter($this,
"mob_id", $a_obj_id);
4097 $this->ctrl->setParameter($this,
"obj_id", $a_obj_id);
4098 $link.=
"&obj_id=".$a_obj_id;
4104 $this->ctrl->setParameter($this,
"obj_type", $a_type);
4106 $link = $this->ctrl->getLinkTarget($this, $a_cmd, $a_anchor);
4109 $this->ctrl->setParameter($this,
"frame",
"");
4110 $this->ctrl->setParameter($this,
"obj_id",
"");
4111 $this->ctrl->setParameter($this,
"mob_id",
"");
4118 if ($this->export_all_languages)
4120 if ($this->lang !=
"" && $this->lang !=
"-")
4122 $lang_suffix =
"_".$this->lang;
4128 case "downloadFile":
4132 $link =
"fullscreen.html";
4137 if ($a_obj_id ==
"")
4139 $a_obj_id = $this->lm_tree->getRootId();
4140 $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id,
"pg");
4141 $a_obj_id = $pg_node[
"obj_id"];
4143 if ($a_type ==
"StructureObject")
4145 $pg_node = $this->lm_tree->fetchSuccessorNode($a_obj_id,
"pg");
4146 $a_obj_id = $pg_node[
"obj_id"];
4148 if ($a_frame !=
"" && $a_frame !=
"_blank")
4150 if ($a_frame !=
"toc")
4152 $link =
"frame_".$a_obj_id.
"_".$a_frame.$lang_suffix.
".html";
4156 $link =
"frame_".$a_frame.$lang_suffix.
".html";
4164 $link =
"lm_pg_".$nid.$lang_suffix.
".html";
4168 $link =
"lm_pg_".$a_obj_id.$lang_suffix.
".html";
4174 $link =
"term_".$a_obj_id.
".html";
4178 $link =
"media_".$a_obj_id.
".html";
4186 $this->ctrl->clearParameters($this);
4200 $this->tpl->setCurrentBlock(
"ContentStyle");
4203 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
4208 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
"content_style/content.css");
4210 $this->tpl->parseCurrentBlock();
4212 $tpl =
new ilTemplate(
"tpl.page_message_screen.html",
true,
true,
"Modules/LearningModule");
4213 $tpl->setVariable(
"TXT_PAGE_NO_PUBLIC_ACCESS", $a_content);
4215 $this->tpl->setVariable(
"PAGE_CONTENT",
$tpl->get());
4241 $target = $this->ctrl->getLinkTarget($this,
"");
4243 return $this->ctrl->getLinkTarget($this,
"");
4259 $this->offline_directory = $offdir;
4280 $file = $directory.
"/".$title;
4281 if (!($fp = @fopen(
$file,
"w+")))
4283 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
4284 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
4295 $this->tpl->fillWindowTitle();
4296 $this->tpl->fillContentLanguage();
4308 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
4309 include_once(
"./Modules/LearningModule/classes/class.ilLMPageGUI.php");
4312 return new ilLMPageGUI($a_id, 0,
false, $this->lang);
4325 include_once(
"./Modules/LearningModule/classes/class.ilLMPage.php");
4328 return new ilLMPage($a_id, 0, $this->lang);
4338 $exp = $this->
ilTOC(
true);
4340 echo $exp->getHTML().
4341 "<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
setOfflineMode($a_offline=true, $a_all_languages=false)
set offline mode (content is generated for offline package)
handleCodeParagraph($page_id, $paragraph_id, $title, $text)
store paragraph into file directory files/codefile_$pg_id_$paragraph_id/downloadtitle
getCurrentPageId()
Get the current page id.
ilLMMenu()
output learning module menu
initPrintViewSelectionForm()
Init print view selection form.
layout($a_xml="main.xml", $doShow=true)
generates frame layout
processNodes(&$a_content, &$a_node)
download_paragraph()
download source code paragraph
getExportFormat()
get export format
export()
calls export of digilib-object at this point other lm-objects can be exported
addHeaderAction($a_redraw=false)
Add header action.
initScreenHead($a_active_tab="info")
showPrintView()
show print view
nop()
this dummy function is needed for offline package creation
downloadFile()
download file of file lists
showMessageScreen($a_content)
Show message screen.
getSourcecodeDownloadLink()
showPreconditionsOfPage()
show preconditions of the page
executeCommand()
execute command
getFocusLink($a_ref_id, $a_obj_id, $a_return_ref_id)
Get focused link (used in learning objectives courses)
attrib2arr($a_attributes)
showNavRestrictionDueToQuestions()
Show message if navigation to page is not allowed due to unanswered questions.
showDownloadList()
show download list
getLMPageGUI($a_id)
Get lm page gui object.
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.
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.
getLMPresentationTitle()
Get lm presentationtitle.
LM presentation (left frame) explorer GUI class.
LM presentation (separate toc screen) explorer GUI class.
static getInstance($a_ref_id, $a_user_id=0)
Get instance.
static getInstance($a_tree_id)
Get Instance.
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _parseCopyright($a_copyright)
Parse copyright.
_getLastAccessedPage($a_ref_id, $a_user_id="")
get last accessed page
_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="", $a_no_cache=false)
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.
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.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
domxml_open_mem($str, $mode=DOMXML_LOAD_PARSING, &$error=NULL)
xpath_eval($xpath_context, $eval_str, $contextnode=null)
xpath_new_context($dom_document)