165 $a_export_format =
"",
166 $a_all_languages =
false,
168 bool $claim_repo_context =
true 172 $this->offline = ($a_export_format !=
"");
173 $this->export_all_languages = $a_all_languages;
174 $this->export_format = $a_export_format;
175 $this->offline_directory = $a_export_dir;
177 $this->tabs = $DIC->tabs();
178 $this->
user = $DIC->user();
179 $this->rbacsystem = $DIC->rbac()->system();
180 $this->error = $DIC[
"ilErr"];
181 $this->nav_history = $DIC[
"ilNavigationHistory"];
182 $this->access = $DIC->access();
184 $this->locator = $DIC[
"ilLocator"];
185 $this->tree = $DIC->repositoryTree();
186 $this->
help = $DIC[
"ilHelp"];
188 $lng = $DIC->language();
194 $lng->loadLanguageModule(
"content");
197 $this->tpl = $DIC->ui()->mainTemplate();
198 $this->frames = array();
200 $this->ctrl->saveParameter($this, array(
"ref_id",
"transl",
"focus_id",
"focus_return"));
207 if (!
$rbacsystem->checkAccess(
"write", $this->requested_ref_id)) {
208 if ($this->lm->getOfflineStatus()) {
213 if ($claim_repo_context) {
214 $DIC->globalScreen()->tool()->context()->claim()->repository();
217 if ($this->service->getPresentationStatus()->isTocNecessary()) {
218 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
240 $this->export_all_languages,
244 $request = $this->service->getRequest();
246 $this->requested_obj_type = $request->getRequestedObjType();
247 $this->requested_ref_id = $request->getRequestedRefId();
248 $this->requested_transl = $request->getRequestedTranslation();
249 $this->requested_obj_id = $request->getRequestedObjId();
250 $this->requested_back_pg = $request->getRequestedBackPage();
251 $this->requested_frame = $request->getRequestedFrame();
252 $this->requested_search_string = $request->getRequestedSearchString();
253 $this->requested_focus_return = $request->getRequestedFocusReturn();
254 $this->requested_mob_id = $request->getRequestedMobId();
256 $this->lm_set = $this->service->getSettings();
257 $this->lm_gui = $this->service->getLearningModuleGUI();
258 $this->lm = $this->service->getLearningModule();
259 $this->tracker = $this->service->getTracker();
260 $this->linker = $this->service->getLinker();
263 $this->lang = $this->service->getPresentationStatus()->getLang();
265 $this->lm_tree = $this->service->getLMTree();
266 $this->focus_id = $this->service->getPresentationStatus()->getFocusId();
286 return $this->service->getTracker();
304 if (!$ilAccess->checkAccess(
"read",
"", $this->requested_ref_id) &&
305 (!(($this->ctrl->getCmd() ==
"infoScreen" || $this->ctrl->getNextClass() ==
"ilinfoscreengui")
306 && $ilAccess->checkAccess(
"visible",
"", $this->requested_ref_id)))) {
310 $next_class = $this->ctrl->getNextClass($this);
311 $cmd = $this->ctrl->getCmd(
"layout", array(
"showPrintView"));
315 $this->ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
316 $ilNavigationHistory->addItem($this->requested_ref_id, $this->ctrl->getLinkTarget($this),
"lm");
317 $this->ctrl->setParameter($this,
"obj_id", $obj_id);
319 switch ($next_class) {
324 case "ilinfoscreengui":
328 case "ilcommonactiondispatchergui":
330 $gui->enableCommentsSettings(
false);
331 $this->ctrl->forwardCommand($gui);
335 $page_gui = $this->
getLMPageGUI($this->requested_obj_id);
340 case "ilglossarydefpagegui":
346 case "illearningprogressgui":
350 $this->requested_ref_id,
353 $this->ctrl->forwardCommand($new_gui);
359 $this->ctrl->forwardCommand($rating_gui);
364 switch (
$_GET[
"ntf"]) {
381 $ilCtrl->redirect($this,
"layout");
383 $ret = $this->$cmd();
406 return $this->export_format;
419 if (!is_array($a_attributes)) {
422 foreach ($a_attributes as $attribute) {
423 $attr[$attribute->name()] = $attribute->value();
433 return $this->frames;
453 public function layout($a_xml =
"main.xml", $doShow =
true)
466 $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/" . $layout .
"/" . $a_xml);
470 $layout .
"/" . $a_xml .
".");
472 $this->layout_doc = $doc;
477 $path = (empty($this->requested_frame) || ($this->requested_frame ==
"_blank"))
478 ?
"/ilLayout/ilFrame[1]" 479 :
"//ilFrame[@name='" . $this->requested_frame .
"']";
482 if (count($found) != 1) {
484 " path " . $path .
" in " . $layout .
"/" . $a_xml .
". LM Layout is " . $this->lm->getLayout());
492 $this->frames = array();
495 if ((empty(
$attributes[
"template"]) || !empty($this->requested_obj_type))
496 && ($this->requested_frame !=
"_blank" || $this->requested_obj_type !=
"MediaObject")) {
502 if (empty($this->requested_obj_type)) {
503 $obj_type =
"PageObject";
509 $childs = $node->child_nodes();
511 foreach ($childs as $child) {
512 if ($child->node_name() == $obj_type) {
522 $this->requested_frame .
"' and object type '" . $obj_type .
"'.");
527 $in_module = (
$attributes[
"template_location"] ==
"module")
544 $style_name =
$ilUser->getPref(
"style") .
".css";
545 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/" . $style_name);
556 $childs = $node->child_nodes();
558 foreach ($childs as $child) {
559 $child_attr = $this->
attrib2arr($child->attributes());
561 switch ($child->node_name()) {
578 $this->tpl->setContent($content);
585 case "ilLMNavigation":
600 $child_attr[
"inline"],
602 $child_attr[
"location"]
637 $this->tpl->addJavascript(
"./Modules/LearningModule/js/LearningModule.js");
639 $this->tpl->addOnLoadCode($close_call);
644 if ($this->requested_frame ==
"") {
646 $last_frame_url =
$store->get(
"cf_" . $this->lm->getId());
647 if ($last_frame_url !=
"") {
648 $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('" . $last_frame_url .
"', 'center_bottom');");
651 if (in_array($layout, array(
"toc2windyn"))) {
652 $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('" .
653 $ilCtrl->getLinkTarget($this,
"saveFrameUrl",
"",
false,
false) .
"'); 654 il.LearningModule.openInitFrames(); 657 $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('" .
658 $ilCtrl->getLinkTarget($this,
"refreshToc",
"",
false,
false) .
"'); 664 $this->tpl->addJavascript(
"./Services/Navigation/js/ServiceNavigation.js");
714 $tpl->printToStdout();
720 $content =
$tpl->printToString();
735 if (
$_GET[
"url"] !=
"") {
736 $store->set(
"cf_" . $this->lm->getId(),
$_GET[
"url"]);
738 $store->set(
"cf_" . $this->lm->getId(),
$_GET[
"url"]);
745 return $this->
media();
754 $this->tpl =
new ilGlobalTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
763 $this->tpl->printToStdout();
765 return $this->tpl->printToString();
776 $this->tpl =
new ilGlobalTemplate(
"tpl.glossary_term_output.html",
true,
true,
"Modules/LearningModule");
786 $this->tpl->printToStdout();
788 return $this->tpl->printToString();
806 $this->tpl =
new ilGlobalTemplate(
"tpl.page_fullscreen.html",
true,
true,
"Modules/LearningModule");
816 $style_name =
$ilUser->getPref(
"style") .
".css";
818 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/" . $style_name);
823 $this->tpl->printToStdout();
825 return $this->tpl->get();
837 $ltiview = $DIC[
"lti"];
838 if ($ltiview->isActive()) {
839 $ilMainMenu =
new LTI\ilMainMenuGUI(
"_top",
false, $this->tpl);
845 $this->tpl->touchBlock(
"pg_intro");
846 $this->tpl->touchBlock(
"pg_outro");
852 $ilMainMenu->setLoginTargetPar(
"pg_" . $page_id .
"_" . $this->lm->getRefId());
857 $this->tpl->touchBlock(
"pg_intro");
858 $this->tpl->touchBlock(
"pg_outro");
859 $this->tpl->setBodyClass(
"std");
860 $this->tpl->setVariable(
"MAINMENU", $ilMainMenu->getHTML());
862 $this->tpl->setVariable(
"MAINMENU_SPACER", $ilMainMenu->getSpacerClass());
868 public function ilTOC($a_get_explorer =
false)
871 $exp = $fac->getExplorer($this->service,
"ilTOC");
872 $exp->handleCommand();
884 return $this->service->getPresentationStatus()->getLMPresentationTitle();
914 if ($this->
abstract) {
918 $showViewInFrameset =
true;
920 if ($showViewInFrameset) {
923 $buttonTarget =
"_top";
927 $tpl_menu =
new ilTemplate(
"tpl.lm_sub_menu.html",
true,
true,
"Modules/LearningModule");
936 if (
$rbacsystem->checkAccess(
"write", $this->requested_ref_id)) {
937 $tpl_menu->setCurrentBlock(
"edit_page");
939 $tpl_menu->setVariable(
"EDIT_LINK",
ILIAS_HTTP_PATH .
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
940 "&obj_id=" . $page_id .
"&to_page=1");
941 $tpl_menu->setVariable(
"EDIT_TXT", $this->lng->txt(
"edit_page"));
942 $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
943 $tpl_menu->parseCurrentBlock();
949 $this->tpl->setPermanentLink(
"pg",
"", $page_id .
"_" . $this->lm->getRefId());
952 $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
970 if ($this->offline) {
976 $lm_id = $this->lm->getId();
979 $this->lng->loadLanguageModule(
"content");
984 $this->lm->getType(),
990 ilObjectListGUI::prepareJSLinks(
991 $this->ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
992 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"ilnotegui"),
"",
"",
true,
false),
993 $this->ctrl->getLinkTargetByClass(array(
"ilcommonactiondispatchergui",
"iltagginggui"),
"",
"",
true,
false),
997 $lg = $dispatcher->initHeaderAction();
998 $lg->enableNotes(
true);
999 $lg->enableComments($this->lm->publicNotes(),
false);
1001 if ($this->lm->hasRating() && !$this->
offlineMode()) {
1004 $this->lng->txt(
"lm_rating"),
1006 array(
"ilcommonactiondispatchergui",
"ilratinggui")
1011 if ($this->
user->getId() != ANONYMOUS_USER_ID) {
1013 $this->ctrl->setParameter($this,
"ntf", 1);
1015 $lg->addCustomCommand($this->ctrl->getLinkTarget($this),
"cont_notification_deactivate_lm");
1021 $this->lng->txt(
"cont_notification_activated")
1024 $this->ctrl->setParameter($this,
"ntf", 2);
1025 $lg->addCustomCommand($this->ctrl->getLinkTarget($this),
"cont_notification_activate_lm");
1028 $this->ctrl->setParameter($this,
"ntf", 3);
1029 $lg->addCustomCommand($this->ctrl->getLinkTarget($this),
"cont_notification_deactivate_page");
1034 $this->lng->txt(
"cont_page_notification_activated")
1037 $this->ctrl->setParameter($this,
"ntf", 4);
1038 $lg->addCustomCommand($this->ctrl->getLinkTarget($this),
"cont_notification_activate_page");
1043 $this->lng->txt(
"cont_notification_deactivated")
1047 $this->ctrl->setParameter($this,
"ntf",
"");
1050 if (!$this->offline) {
1051 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
1053 $link = $this->ctrl->getLinkTargetByClass([
"ilLMEditorGUI",
"ilobjlearningmodulegui"],
"chapters");
1055 $link =
ILIAS_HTTP_PATH .
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
1058 $lg->addCustomCommand($link,
"edit_page");
1064 $this->tpl->setVariable(
"HEAD_ACTION", $lg->getHeaderAction($this->tpl));
1067 return $lg->getHeaderAction() .
1068 $tpl->getOnLoadCodeForAsynch();
1096 if (!$this->lm->publicNotes()) {
1100 $next_class = $this->ctrl->getNextClass($this);
1109 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id) &&
1114 $this->ctrl->setParameter($this,
"frame", $this->requested_frame);
1115 $this->ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1117 $notes_gui->enablePrivateNotes();
1118 if ($this->lm->publicNotes()) {
1119 $notes_gui->enablePublicNotes();
1122 $callback = array($this,
"observeNoteAction");
1123 $notes_gui->addObserver($callback);
1125 if ($next_class ==
"ilnotegui") {
1126 $html = $this->ctrl->forwardCommand($notes_gui);
1128 $html = $notes_gui->getNotesHTML();
1140 $ltiview = $DIC[
"lti"];
1145 if (empty($this->requested_obj_id)) {
1146 $a_id = $this->lm_tree->getRootId();
1152 if (!$this->lm->cleanFrames()) {
1160 $frame_target =
"_top";
1165 if ($ltiview->isActive()) {
1166 $ilLocator->addRepositoryItems();
1168 $ilLocator->addRepositoryItems();
1181 $ilLocator->setOffline(
true);
1184 if ($this->lm_tree->isInTree($a_id)) {
1185 $path = $this->lm_tree->getPathFull($a_id);
1187 foreach ($path as $key => $row) {
1188 if ($row[
"type"] !=
"pg") {
1189 if ($row[
"child"] != $this->lm_tree->getRootId()) {
1190 $ilLocator->addItem(
1194 ilLMOBject::CHAPTER_TITLE,
1195 $this->lm->isActiveNumbering(),
1196 $this->lm_set->get(
"time_scheduled_page_activation"),
1204 $this->linker->getLink(
"layout", $row[
"child"], $frame_param,
"StructureObject"),
1208 $ilLocator->addItem(
1210 $this->linker->getLink(
"layout",
"", $frame_param),
1218 $ilLocator->addItem(
1220 $this->linker->getLink(
"layout",
"", $this->requested_frame)
1225 $ilLocator->addItem(
1226 $lm_obj->getTitle(),
1227 $this->linker->getLink(
"layout", $a_id, $frame_param),
1233 $debug =
"DEBUG: <font color=\"red\">" . $this->type .
"::" . $this->
id .
"::" .
$_GET[
"cmd"] .
"</font><br/>";
1239 $this->tpl->setLocator();
1249 return $this->service->getNavigationStatus()->getCurrentPage();
1253 if (!$this->
offlineMode() && $this->current_page_id !==
false) {
1257 $this->chapter_has_no_active_page =
false;
1258 $this->deactivated_page =
false;
1261 if (empty($this->requested_obj_id)) {
1262 $obj_id = $this->lm_tree->getRootId();
1267 $this->lm->getType(),
1268 $this->lm_set->get(
"time_scheduled_page_activation")
1273 $this->deactivated_page =
true;
1278 if (!$this->lm_tree->isInTree($obj_id)) {
1282 $curr_node = $this->lm_tree->getNodeData($obj_id);
1286 $this->lm->getType(),
1287 $this->lm_set->get(
"time_scheduled_page_activation")
1290 if ($curr_node[
"type"] ==
"pg" &&
1292 $page_id = $curr_node[
"obj_id"];
1297 while ($succ_node && !$active) {
1298 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
"pg");
1299 $page_id = $succ_node[
"obj_id"];
1302 $this->lm->getType(),
1303 $this->lm_set->get(
"time_scheduled_page_activation")
1307 if ($succ_node[
"type"] !=
"pg") {
1308 $this->chapter_has_no_active_page =
true;
1313 if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
1314 $this->lm_gui->object->getPublicAccessMode() ==
'selected') {
1317 while ($public ===
false && $page_id > 0) {
1318 $succ_node = $this->lm_tree->fetchSuccessorNode($page_id,
'pg');
1319 $page_id = $succ_node[
'obj_id'];
1325 if ($this->lm_tree->isInTree($page_id)) {
1326 $path = $this->lm_tree->getPathId($page_id);
1327 if (!in_array($this->requested_obj_id, $path)) {
1328 $this->chapter_has_no_active_page =
true;
1333 $this->current_page_id = $page_id;
1340 if (!is_object($this->layout_doc)) {
1346 $path =
"/ilLayout/ilLinkTargets/LinkTarget";
1349 for (
$i = 0;
$i < count(
$res->nodeset);
$i++) {
1351 $frame =
$res->nodeset[
$i]->get_attribute(
"Frame");
1352 $onclick =
$res->nodeset[
$i]->get_attribute(
"OnClick");
1353 $targets[
$type] = array(
"Type" =>
$type,
"Frame" => $frame,
"OnClick" => $onclick);
1418 $this->fill_on_load_code =
true;
1421 $tpl =
new ilTemplate(
"tpl.lm_content.html",
true,
true,
"Modules/LearningModule/Presentation");
1431 $this->requested_obj_id,
1432 $this->requested_back_pg,
1433 $this->requested_frame
1437 $tpl->setVariable(
"TOP_NAVIGATION", $navigation_renderer->renderTop());
1438 $tpl->setVariable(
"BOTTOM_NAVIGATION", $navigation_renderer->renderBottom());
1459 $this->requested_obj_id
1462 return $content_renderer->render();
1474 if ($this->lm->hasRatingPages() && !$this->
offlineMode()) {
1476 $rating_gui->setObject($this->lm->getId(),
"lm", $this->
getCurrentPageId(),
"lm");
1477 $rating_gui->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1485 $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('" .
1486 $this->ctrl->getLinkTarget($this,
"updatePageRating",
"",
true,
false) .
1488 $this->ctrl->setParameter($this,
"pgid",
"");
1490 $rating =
'<div id="ilrtrpg" style="text-align:right">' .
1491 $rating_gui->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);") .
1503 $pg_id =
$_GET[
"pgid"];
1504 if (!$this->ctrl->isAsynch() || !$pg_id) {
1508 $rating = (int)
$_POST[
"rating"];
1529 $rating->setObject($this->lm->getId(),
"lm", $pg_id,
"lm",
$ilUser->getId());
1530 $rating->setYourRatingText($this->lng->txt(
"lm_rate_page"));
1532 echo $rating->getHtml(
true,
true,
"il.LearningModule.saveRating(%rating%);");
1534 echo $this->tpl->getOnLoadCodeForAsynch();
1547 $this->lm->getStyleSheetId(),
1551 $a_page_gui->setOutputMode(
"presentation");
1552 $this->fill_on_load_code =
true;
1554 $a_page_gui->setOutputMode(
"offline");
1556 $this->fill_on_load_code =
false;
1561 $a_page_gui->setFileDownloadLink($this->linker->getLink(
"downloadFile"));
1562 $a_page_gui->setSourcecodeDownloadScript($this->linker->getLink(
"sourcecodeDownload",
1563 $this->getCurrentPageId()));
1565 $this->ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1567 $a_page_gui->setFullscreenLink($this->linker->getLink(
"fullscreen"));
1583 $term_gui->setPageLinker($this->linker);
1587 $ilCtrl->setParameter($this,
"pg_type",
"glo");
1589 $term_gui->output($this->
offlineMode(), $this->tpl);
1593 $ilCtrl->setParameter($this,
"pg_type",
"");
1606 $this->tpl->setCurrentBlock(
"ilMedia");
1609 $link_xml = $this->linker->getLinkXML($med_links);
1612 if (!empty(
$_GET[
"pg_id"])) {
1614 $pg_obj->buildDom();
1619 $xml .= $pg_obj->getMediaAliasElement($this->requested_mob_id);
1634 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1635 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
1644 $mode = (
$_GET[
"cmd"] ==
"fullscreen")
1649 $this->linker->getLink(
"fullscreen");
1650 $params = array(
'mode' => $mode,
'enlarge_path' => $enlarge_path,
1651 'link_params' =>
"ref_id=" . $this->lm->getRefId(),
'fullscreen_link' => $fullscreen_link,
1652 'ref_id' => $this->lm->getRefId(),
'pg_frame' => $pg_frame,
'webspace_path' => $wb_path);
1653 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", null, $args, $params);
1659 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
1668 public function ilJavaScript($a_inline =
"", $a_file =
"", $a_location =
"")
1670 if ($a_inline !=
"") {
1671 $js_tpl =
new ilTemplate($a_inline,
true,
false, $a_location);
1672 $js = $js_tpl->get();
1673 $this->tpl->setVariable(
"INLINE_JS", $js);
1689 if (empty($page_id)) {
1697 if ($this->chapter_has_no_active_page &&
1701 if ($this->deactivated_page) {
1708 $succ_node = $this->lm_tree->fetchSuccessorNode($c_id,
"pg");
1709 $c_id = $succ_node[
"obj_id"];
1713 $this->lm->getType(),
1714 $this->lm_set->get(
"time_scheduled_page_activation")
1717 if ($succ_node[
"obj_id"] > 0 &&
1718 $ilUser->getId() == ANONYMOUS_USER_ID &&
1719 ($this->lm->getPublicAccessMode() ==
"selected" &&
1722 } elseif ($succ_node[
"obj_id"] > 0 && !$active) {
1725 if ($act_data[
"show_activation_info"] &&
1726 (
ilUtil::now() < $act_data[
"activation_start"])) {
1737 return $succ_node[
"obj_id"];
1745 $child_nodes = $a_node->child_nodes();
1746 foreach ($child_nodes as $child) {
1747 if ($child->node_name() ==
"ilFrame") {
1750 if ((!empty(
$attributes[
"rows"])) || (!empty($attrubtes[
"cols"]))) {
1757 $this->linker->getLink(
1759 $this->requested_obj_id,
1768 $this->frames[
$attributes[
"name"]] = $attributes[
"name"];
1779 $this->linker->getLink(
1781 $this->requested_obj_id,
1793 if (
$_GET[
"anchor"] !=
"") {
1798 $this->frames[
$attributes[
"name"]] = $attributes[
"name"];
1815 if (
$type ==
"end") {
1821 if (is_array($attr)) {
1822 foreach ($attr as $k => $v) {
1823 $tag .=
" " . $k .
"=\"$v\"";
1845 $this->ctrl->setCmd(
"showSummary");
1846 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1878 $this->tpl->loadStandardTemplate();
1888 if ($ilAccess->checkAccess(
"read",
"", $this->requested_ref_id)) {
1891 $ilLocator->addRepositoryItems();
1892 $this->tpl->setLocator();
1905 $this->lng->loadLanguageModule(
"meta");
1908 $info->enablePrivateNotes();
1909 $info->enableLearningProgress();
1911 $info->enableNews();
1912 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
1914 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1916 $info->enableNewsEditing();
1918 if ($enable_internal_rss) {
1919 $info->setBlockProperty(
"news",
"settings",
true);
1941 $info->addMetaDataSections($this->lm->getId(), 0, $this->lm->getType());
1944 $this->tpl->setContent($info->getHTML());
1945 return $this->tpl->get();
1948 $this->ctrl->forwardCommand($info);
1950 $this->tpl->printToStdout();
1962 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
1970 $this->tpl->loadStandardTemplate();
1978 $this->tpl->addBlockFile(
1981 "tpl.lm_print_selection.html",
1982 "Modules/LearningModule" 1994 $this->ctrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $this->requested_obj_id);
1995 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormaction($this));
1997 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
2000 if (!is_array(
$_POST[
"item"])) {
2001 if ($this->requested_obj_id !=
"") {
2010 foreach ($nodes as $node) {
2015 $this->lm->getType(),
2016 $this->lm_set->get(
"time_scheduled_page_activation")
2019 if ($node[
"type"] ==
"pg" &&
2024 $text = $img_scr = $img_alt =
"";
2028 switch ($node[
"type"]) {
2034 $this->lm->getPageHeader(),
2035 $this->lm->isActiveNumbering(),
2036 $this->lm_set->get(
"time_scheduled_page_activation"),
2042 if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
2043 $this->lm_gui->object->getPublicAccessMode() ==
"selected") {
2046 $text .=
" (" . $this->lng->txt(
"cont_no_access") .
")";
2050 $img_alt =
$lng->txt(
"icon") .
" " .
$lng->txt(
"pg");
2057 $img_alt =
$lng->txt(
"icon") .
" " .
$lng->txt(
"obj_lm");
2065 ilLMOBject::CHAPTER_TITLE,
2066 $this->lm->isActiveNumbering(),
2067 $this->lm_set->get(
"time_scheduled_page_activation"),
2072 if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
2073 $this->lm_gui->object->getPublicAccessMode() ==
"selected") {
2076 $text .=
" (" . $this->lng->txt(
"cont_no_access") .
")";
2080 $img_alt =
$lng->txt(
"icon") .
" " .
$lng->txt(
"st");
2085 $text .=
" (" . $this->lng->txt(
"cont_no_access") .
")";
2088 $this->nl->addListNode(
2101 if ($this->requested_obj_id > 0 && !$this->lm_tree->isInTree($this->requested_obj_id)) {
2104 $this->requested_obj_id,
2105 $this->lm->getPageHeader(),
2106 $this->lm->isActiveNumbering(),
2107 $this->lm_set->get(
"time_scheduled_page_activation"),
2113 if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
2114 $this->lm_gui->object->getPublicAccessMode() ==
"selected") {
2117 $text .=
" (" . $this->lng->txt(
"cont_no_access") .
")";
2125 $this->nl->addListNode(
2136 $f = $this->form->getHTML();
2140 $tb->addFormButton(
$lng->txt(
"cont_show_print_view"),
"showPrintView");
2141 $this->tpl->setVariable(
"TOOLBAR", $tb->getHTML());
2143 $this->tpl->setVariable(
"ITEM_SELECTION",
$f);
2144 $this->tpl->printToStdout();
2157 if ($this->lm->getRestrictForwardNavigation()) {
2158 $nodes = array_filter($nodes,
function ($node) use ($tracker) {
2159 return !$tracker->hasPredIncorrectAnswers($node[
"child"]);
2181 $radg->addOption($op1);
2183 $radg->addOption($op2);
2185 $radg->addOption($op3);
2189 $op3->addSubItem($nl);
2192 $this->form->addItem($radg);
2194 $this->form->addCommandButton(
"showPrintView",
$lng->txt(
"cont_show_print_view"));
2195 $this->form->setOpenTag(
false);
2196 $this->form->setCloseTag(
false);
2198 $this->form->setTitle(
$lng->txt(
"cont_print_selection"));
2199 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
2210 $tabs = $this->tabs;
2212 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
2218 $tabs->setBackTarget(
2220 $ilCtrl->getLinkTarget($this,
"showPrintViewSelection")
2225 if (
$_POST[
"sel_type"] ==
"page") {
2226 if (!is_array(
$_POST[
"obj_id"]) || !in_array($c_obj_id,
$_POST[
"obj_id"])) {
2227 $_POST[
"obj_id"][] = $c_obj_id;
2230 if (
$_POST[
"sel_type"] ==
"chapter" && $c_obj_id > 0) {
2231 $path = $this->lm_tree->getPathFull($c_obj_id);
2232 $chap_id = $path[1][
"child"];
2234 $_POST[
"obj_id"][] = $chap_id;
2240 $tpl =
new ilTemplate(
"tpl.lm_print_view.html",
true,
true,
"Modules/LearningModule");
2245 $nodes = $this->lm_tree->getSubtree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
2250 $glossary_links = array();
2251 $output_header =
false;
2252 $media_links = array();
2255 if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
2257 $page_object_gui = $this->
getLMPageGUI($this->lm->getFooterPage());
2259 $this->lm->getStyleSheetId(),
2265 $page_object_gui->setLinkFrame($this->requested_frame);
2266 $page_object_gui->setOutputMode(
"print");
2267 $page_object_gui->setPresentationTitle(
"");
2268 $page_object_gui->setFileDownloadLink(
"#");
2269 $page_object_gui->setFullscreenLink(
"#");
2270 $page_object_gui->setSourceCodeDownloadScript(
"#");
2271 $footer_page_content = $page_object_gui->showPage();
2274 if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
2276 $page_object_gui = $this->
getLMPageGUI($this->lm->getHeaderPage());
2278 $this->lm->getStyleSheetId(),
2284 $page_object_gui->setLinkFrame($this->requested_frame);
2285 $page_object_gui->setOutputMode(
"print");
2286 $page_object_gui->setPresentationTitle(
"");
2287 $page_object_gui->setFileDownloadLink(
"#");
2288 $page_object_gui->setFullscreenLink(
"#");
2289 $page_object_gui->setSourceCodeDownloadScript(
"#");
2290 $header_page_content = $page_object_gui->showPage();
2295 if (is_array(
$_POST[
"obj_id"])) {
2296 foreach (
$_POST[
"obj_id"] as $k) {
2297 if ($k > 0 && !$this->lm_tree->isInTree($k)) {
2299 $nodes[] = array(
"obj_id" => $k,
"type" =>
"pg",
"free" =>
true);
2305 $ilCtrl->redirect($this,
"showPrintViewSelection");
2308 foreach ($nodes as $node_key => $node) {
2312 $this->lm->getType(),
2313 $this->lm_set->get(
"time_scheduled_page_activation")
2315 if ($node[
"type"] ==
"pg" && !$active) {
2321 if ($node[
"depth"] <= $act_level) {
2322 if (is_array(
$_POST[
"obj_id"]) && in_array($node[
"obj_id"],
$_POST[
"obj_id"])) {
2323 $act_level = $node[
"depth"];
2330 if ($this->lm->getRestrictForwardNavigation()) {
2331 if ($this->
getTracker()->hasPredIncorrectAnswers($node[
"obj_id"])) {
2338 if ($node[
"type"] ==
"du") {
2339 $output_header =
true;
2343 if ($node[
"type"] ==
"st") {
2344 if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
2345 $this->lm_gui->object->getPublicAccessMode() ==
"selected") {
2352 $tpl->setCurrentBlock(
"print_chapter");
2354 $chapter_title = $chap->_getPresentationTitle(
2356 $this->lm->isActiveNumbering(),
2357 $this->lm_set->get(
"time_scheduled_page_activation"),
2366 if ($this->lm->getPageHeader() == ilLMOBject::CHAPTER_TITLE) {
2367 if ($nodes[$node_key + 1][
"type"] ==
"pg") {
2370 $header_page_content
2372 $did_chap_page_header =
true;
2376 $tpl->parseCurrentBlock();
2377 $tpl->setCurrentBlock(
"print_block");
2378 $tpl->parseCurrentBlock();
2382 if ($node[
"type"] ==
"pg") {
2383 if (
$ilUser->getId() == ANONYMOUS_USER_ID &&
2384 $this->lm_gui->object->getPublicAccessMode() ==
"selected") {
2390 $tpl->setCurrentBlock(
"print_item");
2393 $page_id = $node[
"obj_id"];
2395 $page_object = $page_object_gui->getPageObject();
2397 $this->lm->getStyleSheetId(),
2404 $lm_pg_obj->setLMId($this->lm->getId());
2407 $page_object_gui->setLinkFrame($this->requested_frame);
2408 $page_object_gui->setOutputMode(
"print");
2409 $page_object_gui->setPresentationTitle(
"");
2413 $lm_pg_obj->getId(),
2414 $this->lm->getPageHeader(),
2415 $this->lm->isActiveNumbering(),
2416 $this->lm_set->get(
"time_scheduled_page_activation"),
2424 if ($this->lm->isActiveNumbering()) {
2425 $chapter_title = trim(substr(
2427 strpos($chapter_title,
" ")
2431 if ($page_title != $chapter_title) {
2432 $page_object_gui->setPresentationTitle($page_title);
2437 $hcont = $header_page_content;
2438 $fcont = $footer_page_content;
2440 if ($this->lm->getPageHeader() == ilLMOBject::CHAPTER_TITLE) {
2441 if ($did_chap_page_header) {
2444 if ($nodes[$node_key + 1][
"type"] ==
"pg" &&
2445 !($nodes[$node_key + 1][
"depth"] <= $act_level
2446 && !in_array($nodes[$node_key + 1][
"obj_id"],
$_POST[
"obj_id"]))) {
2451 $page_object_gui->setFileDownloadLink(
"#");
2452 $page_object_gui->setFullscreenLink(
"#");
2453 $page_object_gui->setSourceCodeDownloadScript(
"#");
2454 $page_content = $page_object_gui->showPage();
2458 $hcont . $page_content . $fcont
2463 $hcont . $page_content . $fcont .
"<br />" 2466 $chapter_title =
"";
2467 $tpl->parseCurrentBlock();
2468 $tpl->setCurrentBlock(
"print_block");
2469 $tpl->parseCurrentBlock();
2476 foreach ($int_links as $key => $link) {
2477 if ($link[
"type"] ==
"git" &&
2478 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0)) {
2479 $glossary_links[$key] = $link;
2481 if ($link[
"type"] ==
"mob" &&
2482 ($link[
"inst"] == IL_INST_ID || $link[
"inst"] == 0)) {
2484 $mob_links[$key] = $link;
2494 $page_object->buildDom();
2495 $links = $page_object->getInternalLinks();
2496 foreach ($links as $link) {
2497 if ($link[
"Type"] ==
"MediaObject" 2498 && $link[
"TargetFrame"] !=
"" 2499 && $link[
"TargetFrame"] !=
"None") {
2500 $media_links[] = $link;
2512 if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix()) {
2516 foreach ($glossary_links as $key => $link) {
2518 $terms[$term .
":" . $key] = array(
"key" => $key,
"link" => $link,
"term" => $term);
2523 foreach ($terms as $t) {
2530 foreach ($defs as $def) {
2532 if (count($defs) > 1) {
2533 $tpl->setCurrentBlock(
"def_title");
2536 $this->lng->txt(
"cont_definition") .
" " . ($def_cnt++)
2538 $tpl->parseCurrentBlock();
2541 $page_gui->setTemplateOutput(
false);
2542 $page_gui->setOutputMode(
"print");
2544 $tpl->setCurrentBlock(
"definition");
2545 $page_gui->setFileDownloadLink(
"#");
2546 $page_gui->setFullscreenLink(
"#");
2547 $page_gui->setSourceCodeDownloadScript(
"#");
2548 $output = $page_gui->showPage();
2549 $tpl->setVariable(
"VAL_DEFINITION", $output);
2550 $tpl->parseCurrentBlock();
2554 $tpl->setCurrentBlock(
"term");
2559 $tpl->parseCurrentBlock();
2564 $tpl->setCurrentBlock(
"glossary");
2565 $annex_title = $this->lng->txt(
"cont_annex") .
" " .
2566 chr(64 + $annex_cnt) .
": " . $this->lng->txt(
"glo");
2567 $tpl->setVariable(
"TXT_GLOSSARY", $annex_title);
2568 $tpl->parseCurrentBlock();
2570 $annexes[] = $annex_title;
2574 if (count($media_links) > 0) {
2575 foreach ($media_links as $media) {
2576 if (substr($media[
"Target"], 0, 4) ==
"il__") {
2577 $arr = explode(
"_", $media[
"Target"]);
2578 $id = $arr[count($arr) - 1];
2581 $med_item = $med_obj->getMediaItem(
"Standard");
2582 if (is_object($med_item)) {
2583 if (is_int(strpos($med_item->getFormat(),
"image"))) {
2584 $tpl->setCurrentBlock(
"ref_image");
2587 if ($med_item->getLocationType() ==
"LocalFile") {
2591 "/" . $med_item->getLocation()
2596 $med_item->getLocation()
2600 if ($med_item->getCaption() !=
"") {
2601 $tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
2603 $tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
2605 $tpl->parseCurrentBlock();
2613 $tpl->setCurrentBlock(
"ref_images");
2614 $annex_title = $this->lng->txt(
"cont_annex") .
" " .
2615 chr(64 + $annex_cnt) .
": " . $this->lng->txt(
"cont_ref_images");
2616 $tpl->setVariable(
"TXT_REF_IMAGES", $annex_title);
2617 $tpl->parseCurrentBlock();
2619 $annexes[] = $annex_title;
2623 if ($output_header) {
2624 $tpl->setCurrentBlock(
"print_header");
2626 if ($this->lm->getDescription() !=
"none") {
2627 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
2629 foreach ($md_gen->getDescriptionIds() as $id) {
2630 $md_des = $md_gen->getDescription($id);
2631 $description = $md_des->getDescription();
2639 $tpl->parseCurrentBlock();
2643 foreach ($nodes2 as $node2) {
2644 if ($node2[
"type"] ==
"st" 2646 for ($j = 1; $j < $node2[
"depth"]; $j++) {
2647 $tpl->setCurrentBlock(
"indent");
2649 $tpl->parseCurrentBlock();
2651 $tpl->setCurrentBlock(
"toc_entry");
2656 ilLMOBject::CHAPTER_TITLE,
2657 $this->lm->isActiveNumbering(),
2658 $this->lm_set->get(
"time_scheduled_page_activation"),
2664 $tpl->parseCurrentBlock();
2669 foreach ($annexes as $annex) {
2670 $tpl->setCurrentBlock(
"indent");
2672 $tpl->parseCurrentBlock();
2673 $tpl->setCurrentBlock(
"toc_entry");
2674 $tpl->setVariable(
"TXT_TOC_TITLE", $annex);
2675 $tpl->parseCurrentBlock();
2678 $tpl->setCurrentBlock(
"toc");
2679 $tpl->setVariable(
"TXT_TOC", $this->lng->txt(
"cont_toc"));
2680 $tpl->parseCurrentBlock();
2682 $tpl->setCurrentBlock(
"print_start_block");
2683 $tpl->parseCurrentBlock();
2687 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
2688 if (is_object($lifecycle = $md->getLifecycle())) {
2689 $sep = $author =
"";
2690 foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
2691 $md_con = $lifecycle->getContribute($con_id);
2692 if ($md_con->getRole() ==
"Author") {
2693 foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
2694 $md_ent = $md_con->getEntity($ent_id);
2695 $author = $author . $sep . $md_ent->getEntity();
2700 if ($author !=
"") {
2701 $this->lng->loadLanguageModule(
"meta");
2702 $tpl->setCurrentBlock(
"author");
2703 $tpl->setVariable(
"TXT_AUTHOR", $this->lng->txt(
"meta_author"));
2704 $tpl->setVariable(
"LM_AUTHOR", $author);
2705 $tpl->parseCurrentBlock();
2711 if (is_object($md_rights = $md->getRights())) {
2712 $copyright = $md_rights->getDescription();
2715 if ($copyright !=
"") {
2716 $this->lng->loadLanguageModule(
"meta");
2717 $tpl->setCurrentBlock(
"copyright");
2718 $tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
2719 $tpl->setVariable(
"LM_COPYRIGHT", $copyright);
2720 $tpl->parseCurrentBlock();
2724 $this->tpl->setContent(
$tpl->get());
2725 $this->tpl->printToStdout();
2734 $page_gui->downloadFile();
2742 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
2749 $this->tpl->loadStandardTemplate();
2755 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.lm_download_list.html",
"Modules/LearningModule");
2762 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
2763 if (is_object($md_rights = $md->getRights())) {
2764 $copyright = $md_rights->getDescription();
2768 if ($copyright !=
"") {
2769 $this->lng->loadLanguageModule(
"meta");
2770 $this->tpl->setCurrentBlock(
"copyright");
2771 $this->tpl->setVariable(
"TXT_COPYRIGHT", $this->lng->txt(
"meta_copyright"));
2772 $this->tpl->setVariable(
"LM_COPYRIGHT", $copyright);
2773 $this->tpl->parseCurrentBlock();
2779 $this->tpl->setVariable(
"DOWNLOAD_TABLE", $download_table->getHTML());
2780 $this->tpl->printToStdout();
2789 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
2793 $base_type = explode(
"_",
$_GET[
"type"]);
2794 $base_type = $base_type[0];
2795 $file = $this->lm->getPublicExportFile($base_type);
2796 if ($this->lm->getPublicExportFile($base_type) !=
"") {
2797 $dir = $this->lm->getExportDirectory(
$_GET[
"type"]);
2798 if (is_file($dir .
"/" . $file)) {
2816 return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $a_ref_id .
"&obj_id=" . $a_obj_id .
"&focus_id=" .
2817 $a_obj_id .
"&focus_return=" . $a_return_ref_id;
2831 $tpl =
new ilTemplate(
"tpl.page_message_screen.html",
true,
true,
"Modules/LearningModule");
2834 $this->tpl->setVariable(
"PAGE_CONTENT",
$tpl->get());
2868 $target = $this->ctrl->getLinkTarget($this,
"");
2870 return $this->ctrl->getLinkTarget($this,
"");
2895 $directory = $this->
getOfflineDirectory() .
"/codefiles/" . $page_id .
"/" . $paragraph_id;
2897 $file = $directory .
"/" . $title;
2898 if (!($fp = @fopen($file,
"w+"))) {
2899 die(
"<b>Error</b>: Could not open \"" . $file .
"\" for writing" .
2900 " in <b>" . __FILE__ .
"</b> on line <b>" . __LINE__ .
"</b><br />");
2926 return new ilLMPageGUI($a_id, 0,
false, $this->lang);
2961 $exp = $this->
ilTOC(
true);
2963 echo $exp->getHTML() .
2964 "<script>" . $exp->getOnLoadCode() .
"</script>";
2978 $note =
new ilNote($a_note_id);
2979 $note = $note->getText();
2989 $notification->send();
3001 $menu_editor->setObjId($this->lm->getId());
3008 $this->export_all_languages,
3018 $navigation_renderer->render();
outputInfoScreen($a_standard_locator=false)
info screen
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
saveFrameUrl()
Save frame url.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
determineLayout()
Determine layout.
static _parseCopyright($a_copyright)
Parse copyright.
This class represents an option in a radio group.
static _getPresentationTitle( $a_pg_id, $a_mode=self::CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
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.
Handles display of the main menu.
static getDefinitionList($a_term_id)
static
static hasNotification($type, $user_id, $id)
Check notification status for object and user.
downloadFile()
download file of file lists
redrawHeaderAction()
Redraw header action.
static _lookupType($a_obj_id, $a_lm_id=0)
Lookup type.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
xpath_new_context($dom_document)
observeNoteAction($a_lm_id, $a_page_id, $a_type, $a_action, $a_note_id)
Generate new ilNote and send Notifications to the users informing that there are new comments in the ...
special template class to simplify handling of ITX/PEAR
getOfflineDirectory()
get offline directory
renderRating()
Render rating.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static _exists($a_id)
checks wether a lm content object with specified id exists or not
getLMPage($a_id, $a_type="")
Get lm page object.
showDownloadList()
show download list
domxml_open_mem($str, $mode=0, &$error=null)
static _checkPreconditionsOfPage($cont_ref_id, $cont_obj_id, $page_id)
checks wether the preconditions of a page are fulfilled or not
ilLMMenu()
output learning module menu
setSystemStyle()
Set system style.
xpath_eval($xpath_context, $eval_str, $contextnode=null)
getLMPageGUI($a_id)
Get lm page gui object.
static hasOptOut($obj_id)
Is opt out (disable notification) allowed?
static get($a_glyph, $a_text="")
Get glyph html.
showNavRestrictionDueToQuestions()
Show message if navigation to page is not allowed due to unanswered questions.
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
injectTemplate($tpl)
Inject template.
ilGlossary()
show glossary term
getContent()
process <ilPage> content tag
showInfoScreen()
info screen call from inside learning module
static now()
Return current timestamp in Y-m-d H:i:s format.
refreshToc()
Refresh toc (called if questions have been answered correctly)
getPageContent()
Get page content.
ilLMSubMenu()
output learning module submenu
Base exception class for learning module presentation.
addHeaderAction($a_redraw=false)
Add header action.
getLMPresentationTitle()
Get lm presentationtitle.
ilJavaScript($a_inline="", $a_file="", $a_location="")
Puts JS into template.
Class ilLMPresentationGUI.
getFocusLink($a_ref_id, $a_obj_id, $a_return_ref_id)
Get focused link (used in learning objectives courses)
getSourcecodeDownloadLink()
static addJavaScript(ilGlobalTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
getCurrentFrameSet()
get frames of current frame set
setHeader()
output lm header
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static addCss()
Add required css.
foreach($_POST as $key=> $value) $res
getExportFormat()
get export format
static _lookupActive($a_id, $a_parent_type, $a_check_scheduled_activation=false, $a_lang="-")
lookup activation status
filterNonAccessibleNode($nodes)
buildTag($type, $name, $attr="")
generate a tag with given name and attributes
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
showMessageScreen($a_content)
Show message screen.
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.
Extension of ilPageObjectGUI for learning modules.
$chapter_has_no_active_page
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
ilTOC($a_get_explorer=false)
table of contents
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
TableGUI class for lm download files.
static _getPresentationTitle( $a_st_id, $a_mode=self::CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
get presentation title
static getInstance(&$a_content_obj, $a_id=0, $a_halt=true)
processNodes(&$a_content, &$a_node)
offlineMode()
checks wether offline content generation is activated
GUI class for glossary terms.
downloadExportFile()
send download file (xml/html)
ilLocator($a_std_templ_loaded=false)
locator
getCurrentPageId()
Get the current page id.
initByRequest($query_params)
Init services and this class by request params.
static getSyntaxStylePath()
get syntax style path
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
showPrintViewSelection()
show selection screen for print view
basicPageGuiInit($a_page_gui)
Basic page gui initialisation.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
attrib2arr($a_attributes)
nop()
this dummy function is needed for offline package creation
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
showNoPageAccess()
Show info message, if page is not accessible in public area.
getSuccessorPage()
Get successor page.
__construct( $a_export_format="", $a_all_languages=false, $a_export_dir="", bool $claim_repo_context=true)
initScreenHead($a_active_tab="info")
static _lookupActivationData($a_id, $a_parent_type, $a_lang="-")
Lookup activation data.
showNoPublicAccess()
Show info message, if page is not accessible in public area.
enablePublicNotesDeletion($a_enable=true)
enable public notes
handleCodeParagraph($page_id, $paragraph_id, $title, $text)
store paragraph into file directory files/codefile_$pg_id_$paragraph_id/downloadtitle ...
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static init(ilGlobalTemplateInterface $a_tpl=null)
Init.
const LP_CONTEXT_REPOSITORY
Glossary definition page GUI class.
Class ilLearningModuleNotification class.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
Session based immediate storage.
ilMainMenu()
output main menu
layout($a_xml="main.xml", $doShow=true)
generates frame layout
static _isPagePublic($a_node_id, $a_check_public_mode=false)
ilLMNotes()
output notes of page
renderTabs($active_tab, $current_page_id)
Render tabs.
static getWebspaceDir($mode="filesystem")
get webspace directory
Class ilObjUserTrackingGUI.
static _lookGlossaryTerm($term_id)
get glossary term
showPrintView()
show print view
Class ilCommonActionDispatcherGUI.
Extension of ilPageObject for learning modules.
setSubObject($a_sub_obj_type, $a_sub_obj_id)
Set sub object attributes.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
setContentStyles()
Set content style.
initPrintViewSelectionForm()
Init print view selection form.
Main service init and factory.