31 protected \ILIAS\Notes\DomainService
$notes;
77 protected \ILIAS\DI\UIServices
$ui;
92 string $a_export_format =
"",
93 bool $a_all_languages =
false,
94 string $a_export_dir =
"",
95 bool $claim_repo_context =
true,
96 array $query_params =
null,
101 $this->offline = ($a_export_format !=
"");
102 $this->export_all_languages = $a_all_languages;
103 $this->export_format = $a_export_format;
104 $this->offline_directory = $a_export_dir;
106 $this->
tabs = $DIC->tabs();
107 $this->
toolbar = $DIC->toolbar();
108 $this->
user = $DIC->user();
109 $this->rbacsystem =
$DIC->rbac()->system();
110 $this->nav_history =
$DIC[
"ilNavigationHistory"];
111 $this->
access = $DIC->access();
113 $this->
locator = $DIC[
"ilLocator"];
114 $this->tree =
$DIC->repositoryTree();
115 $this->
help = $DIC[
"ilHelp"];
116 $this->global_screen =
$DIC->globalScreen();
120 $ilCtrl =
$DIC->ctrl();
127 $this->
ui = $DIC->ui();
128 $this->tpl =
$DIC->ui()->mainTemplate();
129 $this->frames = array();
130 $this->
ctrl = $ilCtrl;
131 $this->
ctrl->saveParameter($this, array(
"ref_id",
"transl",
"focus_id",
"focus_return"));
133 $this->cs =
$DIC->contentStyle();
139 if ($this->lm->getOfflineStatus()) {
144 if ($claim_repo_context) {
145 $DIC->globalScreen()->tool()->context()->claim()->repository();
148 if (!$ilCtrl->isAsynch()) {
151 if ($this->service->getPresentationStatus()->isTocNecessary()) {
152 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
158 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
165 $ilCtrl->setParameter($this,
"embed_mode", 1);
168 "ref_id" => $this->lm->getRefId(),
171 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
176 $this->reading_time_manager = new \ILIAS\LearningModule\ReadingTime\ReadingTimeManager();
177 $this->notes =
$DIC->notes()->domain();
199 ?array $query_params =
null,
208 $this->export_all_languages,
209 $this->export_format,
214 $post = is_null($query_params)
218 $request =
$DIC->learningModule()
227 $this->requested_obj_type = $request->getObjType();
228 $this->requested_ref_id = $request->getRefId();
229 $this->requested_transl = $request->getTranslation();
230 $this->requested_obj_id = $request->getObjId();
231 $this->requested_back_pg = $request->getBackPage();
232 $this->requested_frame = $request->getFrame();
233 $this->requested_search_string = $request->getSearchString();
234 $this->requested_focus_return = $request->getFocusReturn();
235 $this->requested_mob_id = $request->getMobId();
236 $this->requested_cmd = $request->getCmd();
237 $this->requested_pg_id = $request->getPgId();
238 $this->requested_pg_type = $request->getPgType();
239 $this->requested_notification_switch = $request->getNotificationSwitch();
240 $this->requested_type = $request->getType();
241 $this->requested_url = $request->getUrl();
243 $this->lm_set = $this->service->getSettings();
244 $this->lm_gui = $this->service->getLearningModuleGUI();
245 $this->lm = $this->service->getLearningModule();
246 $this->tracker = $this->service->getTracker();
247 $this->linker = $this->service->getLinker();
249 if ($request->getEmbedMode()) {
250 $this->embed_mode =
true;
254 $this->lang = $this->service->getPresentationStatus()->getLang();
256 $this->lm_tree = $this->service->getLMTree();
257 $this->focus_id = $this->service->getPresentationStatus()->getFocusId();
259 $this->content_style_gui = $this->cs->gui();
260 $this->content_style_domain = $this->cs->domain()->styleForRefId($this->lm->getRefId());
275 return $this->service->getTracker();
285 $ilNavigationHistory = $this->nav_history;
286 $ilAccess = $this->access;
288 $ilCtrl = $this->ctrl;
293 if (!$ilAccess->checkAccess(
"read",
"", $this->requested_ref_id) &&
294 (!(($this->ctrl->getCmd() ==
"infoScreen" || $this->ctrl->getNextClass() ==
"ilinfoscreengui")
295 && $ilAccess->checkAccess(
"visible",
"", $this->requested_ref_id)))) {
299 $next_class = $this->
ctrl->getNextClass($this);
300 $cmd = $this->
ctrl->getCmd(
"layout");
302 $obj_id = $this->requested_obj_id;
303 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
304 $ilNavigationHistory->addItem($this->requested_ref_id, $this->
ctrl->getLinkTarget($this),
"lm");
305 $this->
ctrl->setParameter($this,
"obj_id", $obj_id);
307 switch ($next_class) {
309 $ret = $this->layout();
312 case "ilinfoscreengui":
313 $ret = $this->outputInfoScreen();
316 case "ilcommonactiondispatchergui":
318 $gui->enableCommentsSettings(
false);
319 $this->
ctrl->forwardCommand($gui);
323 $page_gui = $this->getLMPageGUI($this->requested_obj_id);
324 $this->basicPageGuiInit($page_gui);
325 $ret = $ilCtrl->forwardCommand($page_gui);
328 case "ilassgenfeedbackpagegui":
331 $ret = $ilCtrl->forwardCommand($page_gui);
334 case "ilglossarydefpagegui":
338 $this->basicPageGuiInit($page_gui);
339 $ret = $ilCtrl->forwardCommand($page_gui);
342 case "illearningprogressgui":
343 $this->initScreenHead(
"learning_progress");
346 $this->requested_ref_id,
349 $this->
ctrl->forwardCommand($new_gui);
352 if ($this->
ctrl->getCmd() !==
"editManual") {
353 $this->tpl->printToStdout();
359 $rating_gui->setObject($this->lm->getId(),
"lm", $this->requested_obj_id,
"lm");
360 $this->
ctrl->forwardCommand($rating_gui);
364 if ($this->requested_notification_switch > 0) {
365 switch ($this->requested_notification_switch) {
369 $this->
user->getId(),
378 $this->
user->getId(),
387 $this->
user->getId(),
388 $this->getCurrentPageId(),
396 $this->
user->getId(),
397 $this->getCurrentPageId(),
402 $ilCtrl->redirect($this,
"layout");
404 $ret = $this->$cmd();
414 return $this->offline;
419 return $this->export_format;
425 public function nop(): void
432 if (!is_array($a_attributes)) {
435 foreach ($a_attributes as $attribute) {
436 $attr[$attribute->name()] = $attribute->value();
446 return $this->frames;
466 string $a_xml =
"main.xml",
472 $layout = $this->determineLayout();
477 $xmlfile = file_get_contents(
"./Modules/LearningModule/layouts/lm/" . $layout .
"/" . $a_xml);
480 $this->layout_doc = $doc;
485 $path = (empty($this->requested_frame) || ($this->requested_frame ==
"_blank"))
486 ?
"/ilLayout/ilFrame[1]"
487 :
"//ilFrame[@name='" . $this->requested_frame .
"']";
489 $found = $result->nodeset;
490 if (count($found) != 1) {
492 " path " .
$path .
" in " . $layout .
"/" . $a_xml .
". LM Layout is " . $this->lm->getLayout());
498 $attributes = $this->attrib2arr($node->attributes());
500 $this->frames = array();
503 if ((empty(
$attributes[
"template"]) || !empty($this->requested_obj_type))
504 && ($this->requested_frame !=
"_blank" || $this->requested_obj_type !=
"MediaObject")) {
510 if (empty($this->requested_obj_type)) {
511 $obj_type =
"PageObject";
513 $obj_type = $this->requested_obj_type;
517 $childs = $node->child_nodes();
519 foreach ($childs as $child) {
520 if ($child->node_name() == $obj_type) {
522 $attributes = $this->attrib2arr($child->attributes());
530 $this->requested_frame .
"' and object type '" . $obj_type .
"'.");
535 if (!$this->offlineMode()) {
538 $style_name =
$ilUser->getPref(
"style") .
".css";
539 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/" . $style_name);
545 $childs = $node->child_nodes();
547 foreach ($childs as $child) {
548 $child_attr = $this->attrib2arr($child->attributes());
550 switch ($child->node_name()) {
553 $this->renderPageTitle();
556 $this->addHeaderAction();
558 $content .= $this->ilLMNotes();
559 $additional = $this->
ui->renderer()->render($this->additional_content);
567 case "ilLMNavigation":
582 $child_attr[
"inline"],
584 $child_attr[
"location"]
598 $this->ilLMSubMenu();
607 $this->addResourceFiles();
610 $tpl->printToStdout();
612 $content =
$tpl->printToString();
624 if (!$this->offlineMode()) {
628 $this->tpl->addJavaScript(
"./Modules/LearningModule/js/LearningModule.js");
630 $this->tpl->addOnLoadCode($close_call);
635 if ($this->requested_frame ==
"") {
637 $last_frame_url =
$store->get(
"cf_" . $this->lm->getId());
638 if ($last_frame_url !=
"") {
639 $this->tpl->addOnLoadCode(
"il.LearningModule.setLastFrameUrl('" . $last_frame_url .
"', 'center_bottom');");
642 $this->tpl->addOnLoadCode(
"il.LearningModule.setSaveUrl('" .
643 $this->
ctrl->getLinkTarget($this,
"saveFrameUrl",
"",
false,
false) .
"');
644 il.LearningModule.openInitFrames();
647 $this->tpl->addOnLoadCode(
"il.LearningModule.setTocRefreshUrl('" .
648 $this->
ctrl->getLinkTarget($this,
"refreshToc",
"",
false,
false) .
"');
654 $this->tpl->addJavaScript(
"./Services/Navigation/js/ServiceNavigation.js");
662 $store->set(
"cf_" . $this->lm->getId(), $this->requested_url);
667 return $this->media();
672 $this->tpl =
new ilGlobalTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
675 $this->setContentStyles();
676 $this->setSystemStyle();
679 if (!$this->offlineMode()) {
680 $this->tpl->printToStdout();
682 return $this->tpl->printToString();
689 $this->tpl =
new ilGlobalTemplate(
"tpl.glossary_term_output.html",
true,
true,
"Modules/LearningModule");
690 $this->renderPageTitle();
699 $this->setContentStyles();
700 $this->setSystemStyle();
704 $js = $this->global_screen->layout()->meta()->getJs();
705 foreach ($js->getItemsInOrderOfDelivery() as $item) {
706 $this->tpl->addJavaScript($item->getContent());
709 if (!$this->offlineMode()) {
710 $this->tpl->printToStdout();
712 return $this->tpl->printToString();
721 $this->tpl =
new ilGlobalTemplate(
"tpl.page_fullscreen.html",
true,
true,
"Modules/LearningModule");
723 $this->renderPageTitle();
725 $this->setContentStyles();
728 if (!$this->offlineMode()) {
731 $style_name =
$ilUser->getPref(
"style") .
".css";
732 $this->tpl->setVariable(
"LOCATION_STYLESHEET",
"./style/" . $style_name);
735 $this->tpl->setVariable(
"PAGE_CONTENT", $this->getPageContent());
736 if (!$this->offlineMode()) {
737 $this->tpl->printToStdout();
739 return $this->tpl->get();
750 $exp = $fac->getExplorer($this->service,
"ilTOC");
751 $exp->handleCommand();
757 return $this->service->getPresentationStatus()->getLMPresentationTitle();
762 $this->renderTabs(
"content", $this->getCurrentPageId());
767 $this->tpl->setTitle($this->getLMPresentationTitle());
776 $rbacsystem = $this->rbacsystem;
777 if ($this->
abstract) {
783 $tpl_menu =
new ilTemplate(
"tpl.lm_sub_menu.html",
true,
true,
"Modules/LearningModule");
785 $pg_id = $this->getCurrentPageId();
791 if (!$this->offlineMode()) {
792 if ($rbacsystem->
checkAccess(
"write", $this->requested_ref_id)) {
793 $tpl_menu->setCurrentBlock(
"edit_page");
794 $page_id = $this->getCurrentPageId();
795 $tpl_menu->setVariable(
797 ILIAS_HTTP_PATH .
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
798 "&obj_id=" . $page_id .
"&to_page=1"
800 $tpl_menu->setVariable(
"EDIT_TXT", $this->
lng->txt(
"edit_page"));
801 $tpl_menu->setVariable(
"EDIT_TARGET", $buttonTarget);
802 $tpl_menu->parseCurrentBlock();
805 $page_id = $this->getCurrentPageId();
808 $this->tpl->setPermanentLink(
"pg",
null, $page_id .
"_" . $this->lm->getRefId());
811 $this->tpl->setVariable(
"SUBMENU", $tpl_menu->get());
816 echo $this->getHeaderAction(
true);
823 $this->tpl->setHeaderActionMenu($this->getHeaderAction());
827 bool $a_redraw =
false
829 if ($this->offline) {
832 $ilAccess = $this->access;
836 $lm_id = $this->lm->getId();
837 $pg_id = $this->getCurrentPageId();
839 $this->
lng->loadLanguageModule(
"content");
844 $this->lm->getType(),
845 $this->lm->getRefId(),
848 $dispatcher->setSubObject(
"pg", $this->getCurrentPageId());
850 $this->
ctrl->setParameter($this,
"embed_mode", (
int) $this->embed_mode);
851 $this->
ctrl->setParameterByClass(
"ilnotegui",
"embed_mode", (
int) $this->embed_mode);
852 $this->
ctrl->setParameterByClass(
"iltagginggui",
"embed_mode", (
int) $this->embed_mode);
854 $this->
ctrl->getLinkTarget($this,
"redrawHeaderAction",
"",
true),
856 $this->ctrl->getLinkTargetByClass(
857 array(
"ilcommonactiondispatchergui",
"iltagginggui"),
866 $lg = $dispatcher->initHeaderAction();
868 $lg->enableNotes(
true);
869 if (!$this->embed_mode) {
870 $lg->enableComments($this->lm->publicNotes(),
false);
874 if ($this->lm->hasRating() && !$this->offlineMode()) {
877 $this->
lng->txt(
"lm_rating"),
879 array(
"ilcommonactiondispatchergui",
"ilratinggui"),
887 $this->
ctrl->setParameter($this,
"ntf", 1);
889 $lg->addCustomCommand($this->
ctrl->getLinkTarget($this),
"cont_notification_deactivate_lm");
895 $this->
lng->txt(
"cont_notification_activated")
898 $this->
ctrl->setParameter($this,
"ntf", 2);
899 $lg->addCustomCommand($this->
ctrl->getLinkTarget($this),
"cont_notification_activate_lm");
902 $this->
ctrl->setParameter($this,
"ntf", 3);
903 $lg->addCustomCommand($this->
ctrl->getLinkTarget($this),
"cont_notification_deactivate_page");
908 $this->
lng->txt(
"cont_page_notification_activated")
911 $this->
ctrl->setParameter($this,
"ntf", 4);
912 $lg->addCustomCommand($this->
ctrl->getLinkTarget($this),
"cont_notification_activate_page");
917 $this->
lng->txt(
"cont_notification_deactivated")
921 $this->
ctrl->setParameter($this,
"ntf",
"");
924 if (!$this->offline) {
925 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
926 if ($this->getCurrentPageId() <= 0) {
927 $link = $this->
ctrl->getLinkTargetByClass([
"ilLMEditorGUI",
"ilobjlearningmodulegui"],
"chapters");
929 $link = ILIAS_HTTP_PATH .
"/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
930 "&obj_id=" . $this->getCurrentPageId() .
"&to_page=1";
932 $lg->addCustomCommand($link,
"edit_page");
937 return $lg->getHeaderAction($this->tpl);
940 return $lg->getHeaderAction() .
941 $tpl->getOnLoadCodeForAsynch();
950 $ilAccess = $this->access;
954 if ($this->offlineMode()) {
963 if (!$this->lm->publicNotes()) {
967 $next_class = $this->
ctrl->getNextClass($this);
969 $pg_id = $this->getCurrentPageId();
974 $notes_gui =
new ilNoteGUI($this->lm->getId(), $this->getCurrentPageId(),
"pg");
975 $notes_gui->setUseObjectTitleHeader(
false);
977 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id) &&
979 $notes_gui->enablePublicNotesDeletion(
true);
982 $this->
ctrl->setParameter($this,
"frame", $this->requested_frame);
983 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
985 $notes_gui->enablePrivateNotes();
986 if ($this->lm->publicNotes()) {
987 $notes_gui->enablePublicNotes();
990 $callback = array($this,
"observeNoteAction");
991 $notes_gui->addObserver($callback);
993 if ($next_class ==
"ilnotegui") {
994 $html = $this->
ctrl->forwardCommand($notes_gui);
996 $html = $notes_gui->getCommentsHTML();
1004 $ltiview =
$DIC[
"lti"];
1005 $ilLocator = $this->locator;
1007 if (empty($this->requested_obj_id)) {
1008 $a_id = $this->lm_tree->getRootId();
1010 $a_id = $this->requested_obj_id;
1013 if (!$this->lm->cleanFrames()) {
1014 $frame_param = $this->requested_frame;
1016 } elseif (!$this->offlineMode()) {
1021 $frame_target =
"_top";
1024 if (!$this->offlineMode()) {
1026 if ($ltiview->isActive()) {
1029 $ilLocator->addRepositoryItems();
1032 $ilLocator->setOffline(
true);
1035 if ($this->lm_tree->isInTree($a_id)) {
1036 $path = $this->lm_tree->getPathFull($a_id);
1039 if ($row[
"type"] !=
"pg") {
1040 if ($row[
"child"] != $this->lm_tree->getRootId()) {
1041 $ilLocator->addItem(
1046 $this->lm->isActiveNumbering(),
1047 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
1055 $this->linker->getLink(
"layout", $row[
"child"], $frame_param,
"StructureObject"),
1059 $ilLocator->addItem(
1061 $this->linker->getLink(
"layout", 0, $frame_param),
1063 $this->requested_ref_id
1069 $ilLocator->addItem(
1070 $this->getLMPresentationTitle(),
1071 $this->linker->getLink(
"layout", 0, $this->requested_frame)
1076 $ilLocator->addItem(
1077 $lm_obj->getTitle(),
1078 $this->linker->getLink(
"layout", $a_id, $frame_param),
1083 $this->tpl->setLocator();
1091 return $this->service->getNavigationStatus()->getCurrentPage();
1100 $this->content_style_gui->addCss(
1102 $this->lm->getRefId()
1116 bool $skip_nav =
false
1118 $this->fill_on_load_code =
true;
1119 $this->setContentStyles();
1121 $tpl =
new ilTemplate(
"tpl.lm_content.html",
true,
true,
"Modules/LearningModule/Presentation");
1129 $this->requested_obj_id,
1130 $this->requested_back_pg,
1131 $this->requested_frame
1135 $tpl->setVariable(
"TOP_NAVIGATION", $navigation_renderer->renderTop());
1136 $tpl->setVariable(
"BOTTOM_NAVIGATION", $navigation_renderer->renderBottom());
1138 $tpl->setVariable(
"PAGE_CONTENT", $this->getPageContent());
1139 $tpl->setVariable(
"RATING", $this->renderRating());
1154 $this->requested_obj_id
1157 return $content_renderer->render();
1164 if ($this->lm->hasRatingPages() && !$this->offlineMode()) {
1166 $rating_gui->setObject($this->lm->getId(),
"lm", $this->getCurrentPageId(),
"lm");
1167 $rating_gui->setYourRatingText($this->
lng->txt(
"lm_rate_page"));
1169 $this->
ctrl->setParameter($this,
"pg_id", $this->getCurrentPageId());
1170 $this->tpl->addOnLoadCode(
"il.LearningModule.setRatingUrl('" .
1171 $this->
ctrl->getLinkTarget($this,
"updatePageRating",
"",
true,
false) .
1173 $this->
ctrl->setParameter($this,
"pg_id",
"");
1175 $rating =
'<div id="ilrtrpg" style="text-align:right">' .
1176 $rating_gui->getHTML(
true,
true,
"il.LearningModule.saveRating(%rating%);") .
1185 $pg_id = $this->service->getRequest()->getPgId();
1186 if (!$this->
ctrl->isAsynch() || !$pg_id) {
1190 $rating = $this->service->getRequest()->getRating();
1211 $rating->setObject($this->lm->getId(),
"lm", $pg_id,
"lm");
1212 $rating->setYourRatingText($this->
lng->txt(
"lm_rate_page"));
1214 echo $rating->getHTML(
true,
true,
"il.LearningModule.saveRating(%rating%);");
1216 echo $this->tpl->getOnLoadCodeForAsynch();
1223 $this->content_style_domain->getEffectiveStyleId()
1225 if (!$this->offlineMode()) {
1227 $this->fill_on_load_code =
true;
1231 $this->fill_on_load_code =
false;
1233 if (!$this->offlineMode()) {
1234 $this->
ctrl->setParameter($this,
"obj_id", $this->getCurrentPageId());
1238 "sourcecodeDownload",
1239 $this->getCurrentPageId()
1241 if (!$this->offlineMode()) {
1242 $this->
ctrl->setParameter($this,
"obj_id", $this->requested_obj_id);
1250 $ilCtrl = $this->ctrl;
1255 $this->setContentStyles();
1257 $term_gui->setPageLinker($this->linker);
1259 $term_gui->setOfflineDirectory($this->getOfflineDirectory());
1260 if (!$this->offlineMode()) {
1261 $ilCtrl->setParameter($this,
"pg_type",
"glo");
1263 $term_gui->output($this->offlineMode(), $this->tpl);
1265 if (!$this->offlineMode()) {
1266 $ilCtrl->setParameter($this,
"pg_type",
"");
1273 $this->setContentStyles();
1275 $this->renderPageTitle();
1277 $this->tpl->setCurrentBlock(
"ilMedia");
1279 $link_xml = $this->linker->getLinkXML($med_links);
1282 if (!empty($this->requested_pg_id)) {
1283 $pg_obj = $this->getLMPage($this->requested_pg_id, $this->requested_pg_type);
1284 $pg_obj->buildDom();
1289 $xml .= $pg_obj->getMediaAliasElement($this->requested_mob_id);
1300 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1301 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl);
1304 if (!$this->offlineMode()) {
1310 $mode = ($this->requested_cmd ==
"fullscreen")
1315 $this->linker->getLink(
"fullscreen");
1316 $params = array(
'mode' => $mode,
1317 'enlarge_path' => $enlarge_path,
1318 'link_params' =>
"ref_id=" . $this->lm->getRefId(),
1319 'fullscreen_link' => $fullscreen_link,
1321 'ref_id' => $this->lm->getRefId(),
1322 'pg_frame' => $pg_frame,
1323 'webspace_path' => $wb_path
1325 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args,
$params);
1330 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
1337 string $a_inline =
"",
1338 string $a_file =
"",
1339 string $a_location =
""
1341 if ($a_inline !=
"") {
1342 $js_tpl =
new ilTemplate($a_inline,
true,
false, $a_location);
1343 $js = $js_tpl->get();
1344 $this->tpl->setVariable(
"INLINE_JS", $js);
1355 $this->
ctrl->setCmd(
"showSummary");
1356 $this->
ctrl->setCmdClass(
"ilinfoscreengui");
1357 $this->outputInfoScreen();
1365 $this->outputInfoScreen();
1369 string $a_active_tab =
"info"
1371 $ilAccess = $this->
access;
1372 $ilLocator = $this->locator;
1374 $this->renderPageTitle();
1376 $this->tpl->loadStandardTemplate();
1377 $this->tpl->setTitle($this->getLMPresentationTitle());
1380 $this->renderTabs($a_active_tab, 0);
1383 if ($ilAccess->checkAccess(
"read",
"", $this->requested_ref_id)) {
1386 $ilLocator->addRepositoryItems();
1387 $this->tpl->setLocator();
1396 $ilAccess = $this->access;
1398 $this->initScreenHead();
1400 $this->
lng->loadLanguageModule(
"meta");
1403 $info->enablePrivateNotes();
1405 $info->enableNews();
1406 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
1408 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1410 $info->enableNewsEditing();
1412 if ($enable_internal_rss) {
1413 $info->setBlockProperty(
"news",
"settings",
true);
1418 $info->addMetaDataSections($this->lm->getId(), 0, $this->lm->getType());
1420 $this->
lng->loadLanguageModule(
"copg");
1421 $est_reading_time = $this->reading_time_manager->getReadingTime($this->lm->getId());
1422 if (!is_null($est_reading_time)) {
1424 $this->
lng->txt(
"copg_est_reading_time"),
1425 sprintf($this->
lng->txt(
"copg_x_minutes"), $est_reading_time)
1429 if ($this->offlineMode()) {
1430 $this->tpl->setContent($info->getHTML());
1431 return $this->tpl->get();
1434 $this->
ctrl->forwardCommand($info);
1436 $this->tpl->printToStdout();
1449 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
1456 $tpl =
new ilTemplate(
"tpl.lm_print_selection.html",
true,
true,
"Modules/LearningModule");
1458 $this->
ctrl->setParameterByClass(
"illmpresentationgui",
"obj_id", $this->requested_obj_id);
1459 $tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this));
1461 $nodes = $this->lm_tree->getSubTree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
1462 $nodes = $this->filterNonAccessibleNode($nodes);
1474 $this->initPrintViewSelectionForm();
1476 foreach ($nodes as $node) {
1484 $this->lm->getType(),
1485 (
bool) $this->lm_set->get(
"time_scheduled_page_activation")
1488 if ($node[
"type"] ==
"pg" &&
1497 switch ($node[
"type"]) {
1503 $this->lm->getPageHeader(),
1504 $this->lm->isActiveNumbering(),
1505 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
1512 $this->lm_gui->getObject()->getPublicAccessMode() ==
"selected") {
1515 $text .=
" (" . $this->
lng->txt(
"cont_no_access") .
")";
1519 $img_alt =
$lng->txt(
"icon") .
" " .
$lng->txt(
"pg");
1524 $text = $this->getLMPresentationTitle();
1526 $img_alt =
$lng->txt(
"icon") .
" " .
$lng->txt(
"obj_lm");
1535 $this->lm->isActiveNumbering(),
1536 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
1542 $this->lm_gui->getObject()->getPublicAccessMode() ==
"selected") {
1545 $text .=
" (" . $this->
lng->txt(
"cont_no_access") .
")";
1549 $img_alt =
$lng->txt(
"icon") .
" " .
$lng->txt(
"st");
1554 $this->lm->getRefId(),
1558 $text .=
" (" . $this->
lng->txt(
"cont_no_access") .
")";
1561 $this->nl->addListNode(
1573 if ($this->requested_obj_id > 0 && !$this->lm_tree->isInTree($this->requested_obj_id)) {
1576 $this->requested_obj_id,
1577 $this->lm->getPageHeader(),
1578 $this->lm->isActiveNumbering(),
1579 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
1586 $this->lm_gui->getObject()->getPublicAccessMode() ==
"selected") {
1589 $text .=
" (" . $this->
lng->txt(
"cont_no_access") .
")";
1593 $id = $this->requested_obj_id;
1597 $this->nl->addListNode(
1608 $f = $this->
form->getHTMLAsync();
1612 $modal = $this->
ui->factory()->modal()->roundtrip(
1613 $this->
lng->txt(
"cont_print_view"),
1614 $this->ui->factory()->legacy(
$tpl->get())
1616 echo $this->
ui->renderer()->render($modal);
1623 $tracker = $this->getTracker();
1626 if (!$this->offlineMode()) {
1627 if ($this->lm->getRestrictForwardNavigation()) {
1628 $nodes = array_filter($nodes,
function ($node) use ($tracker) {
1639 $ilCtrl = $this->ctrl;
1642 $this->
form->setForceTopButtons(
true);
1646 $radg->setValue(
"page");
1648 $radg->addOption($op1);
1650 $radg->addOption($op2);
1652 $radg->addOption($op3);
1656 $op3->addSubItem($nl);
1658 $this->
form->addItem($radg);
1660 $this->
form->addCommandButton(
"showPrintView", $lng->
txt(
"cont_show_print_view"));
1661 $this->
form->setOpenTag(
false);
1662 $this->
form->setCloseTag(
false);
1664 $this->
form->setTitle(
" ");
1665 $this->
form->setFormAction($ilCtrl->getFormAction($this));
1672 $ilCtrl = $this->ctrl;
1673 $tabs = $this->tabs;
1674 $header_page_content =
"";
1675 $footer_page_content =
"";
1676 $chapter_title =
"";
1677 $did_chap_page_header =
false;
1680 if (!$this->lm->isActivePrintView() || !$this->lm->isActiveLMMenu()) {
1684 $this->renderPageTitle();
1688 $ilCtrl->getLinkTarget($this,
"layout")
1691 $c_obj_id = $this->getCurrentPageId();
1693 $sel_type = $this->service->getRequest()->getSelectedType();
1694 $sel_obj_ids = $this->service->getRequest()->getSelectedObjIds();
1695 if ($sel_type ==
"page") {
1696 if (!in_array($c_obj_id, $sel_obj_ids)) {
1697 $sel_obj_ids[] = $c_obj_id;
1700 if ($sel_type ==
"chapter" && $c_obj_id > 0) {
1701 $path = $this->lm_tree->getPathFull($c_obj_id);
1702 $chap_id =
$path[1][
"child"];
1704 $sel_obj_ids[] = $chap_id;
1708 $this->setContentStyles();
1710 $tpl =
new ilTemplate(
"tpl.lm_print_view.html",
true,
true,
"Modules/LearningModule");
1713 $this->tpl->setTitle($this->getLMPresentationTitle());
1715 $nodes = $this->lm_tree->getSubTree($this->lm_tree->getNodeData($this->lm_tree->getRootId()));
1720 $glossary_links = array();
1721 $output_header =
false;
1722 $media_links = array();
1725 if ($this->lm->getFooterPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
1727 $page_object_gui = $this->getLMPageGUI($this->lm->getFooterPage());
1728 $page_object_gui->setStyleId(
1729 $this->content_style_domain->getEffectiveStyleId()
1733 $page_object_gui->setLinkFrame($this->requested_frame);
1734 $page_object_gui->setOutputMode(
"print");
1735 $page_object_gui->setPresentationTitle(
"");
1736 $page_object_gui->setFileDownloadLink(
"#");
1737 $page_object_gui->setFullscreenLink(
"#");
1738 $page_object_gui->setSourcecodeDownloadScript(
"#");
1739 $footer_page_content = $page_object_gui->showPage();
1742 if ($this->lm->getHeaderPage() > 0 && !$this->lm->getHideHeaderFooterPrint()) {
1744 $page_object_gui = $this->getLMPageGUI($this->lm->getHeaderPage());
1745 $page_object_gui->setStyleId(
1746 $this->content_style_domain->getEffectiveStyleId()
1750 $page_object_gui->setLinkFrame($this->requested_frame);
1751 $page_object_gui->setOutputMode(
"print");
1752 $page_object_gui->setPresentationTitle(
"");
1753 $page_object_gui->setFileDownloadLink(
"#");
1754 $page_object_gui->setFullscreenLink(
"#");
1755 $page_object_gui->setSourcecodeDownloadScript(
"#");
1756 $header_page_content = $page_object_gui->showPage();
1761 if (count($sel_obj_ids) > 0) {
1762 foreach ($sel_obj_ids as $k) {
1763 if ($k > 0 && !$this->lm_tree->isInTree($k)) {
1765 $nodes[] = array(
"obj_id" => $k,
"type" =>
"pg",
"free" =>
true);
1770 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"cont_print_no_page_selected"),
true);
1771 $ilCtrl->redirect($this,
"showPrintViewSelection");
1774 foreach ($nodes as $node_key => $node) {
1778 $this->lm->getType(),
1779 (
bool) $this->lm_set->get(
"time_scheduled_page_activation")
1781 if ($node[
"type"] ==
"pg" && !$active) {
1787 if ($node[
"depth"] <= $act_level) {
1788 if (in_array($node[
"obj_id"], $sel_obj_ids)) {
1789 $act_level = $node[
"depth"];
1796 if ($this->lm->getRestrictForwardNavigation()) {
1797 if ($this->getTracker()->hasPredIncorrectAnswers($node[
"obj_id"])) {
1803 $this->lm->getRefId(),
1808 if ($node[
"type"] ==
"du") {
1809 $output_header =
true;
1813 if ($node[
"type"] ==
"st") {
1815 $this->lm_gui->getObject()->getPublicAccessMode() ==
"selected") {
1822 $tpl->setCurrentBlock(
"print_chapter");
1824 $chapter_title = $chap->_getPresentationTitle(
1826 $this->lm->isActiveNumbering(),
1827 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
1837 if ($nodes[$node_key + 1][
"type"] ==
"pg") {
1840 $header_page_content
1842 $did_chap_page_header =
true;
1846 $tpl->parseCurrentBlock();
1847 $tpl->setCurrentBlock(
"print_block");
1848 $tpl->parseCurrentBlock();
1852 if ($node[
"type"] ===
"pg") {
1854 $this->lm_gui->getObject()->getPublicAccessMode() ===
"selected") {
1860 $tpl->setCurrentBlock(
"print_item");
1863 $page_id = $node[
"obj_id"];
1864 $page_object_gui = $this->getLMPageGUI($page_id);
1865 $page_object = $page_object_gui->getPageObject();
1866 $page_object_gui->setStyleId(
1867 $this->content_style_domain->getEffectiveStyleId()
1872 $lm_pg_obj->setLMId($this->lm->getId());
1875 $page_object_gui->setLinkFrame($this->requested_frame);
1876 $page_object_gui->setOutputMode(
"print");
1877 $page_object_gui->setPresentationTitle(
"");
1881 $lm_pg_obj->getId(),
1882 $this->lm->getPageHeader(),
1883 $this->lm->isActiveNumbering(),
1884 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
1892 if ($this->lm->isActiveNumbering()) {
1893 $chapter_title = trim(substr(
1895 strpos($chapter_title,
" ")
1899 if ($page_title != $chapter_title) {
1900 $page_object_gui->setPresentationTitle($page_title);
1905 $hcont = $header_page_content;
1906 $fcont = $footer_page_content;
1909 if ($did_chap_page_header) {
1912 if (($nodes[$node_key + 1][
"type"] ??
"") ==
"pg" &&
1913 !($nodes[$node_key + 1][
"depth"] <= $act_level
1914 && !in_array($nodes[$node_key + 1][
"obj_id"], $sel_obj_ids))) {
1919 $page_object_gui->setFileDownloadLink(
"#");
1920 $page_object_gui->setFullscreenLink(
"#");
1921 $page_object_gui->setSourcecodeDownloadScript(
"#");
1922 $page_content = $page_object_gui->showPage();
1926 $hcont . $page_content . $fcont
1931 $hcont . $page_content . $fcont .
"<br />"
1934 $chapter_title =
"";
1935 $tpl->parseCurrentBlock();
1936 $tpl->setCurrentBlock(
"print_block");
1937 $tpl->parseCurrentBlock();
1944 foreach ($int_links as
$key => $link) {
1945 if ($link[
"type"] ==
"git" &&
1946 ($link[
"inst"] ==
IL_INST_ID || $link[
"inst"] == 0)) {
1947 $glossary_links[
$key] = $link;
1949 if ($link[
"type"] ==
"mob" &&
1950 ($link[
"inst"] ==
IL_INST_ID || $link[
"inst"] == 0)) {
1952 $mob_links[
$key] = $link;
1962 $page_object->buildDom();
1963 $links = $page_object->getInternalLinks();
1964 $tf = $link[
"TargetFrame"] ??
"";
1965 foreach ($links as $link) {
1966 if ($link[
"Type"] ===
"MediaObject"
1968 && $tf !==
"None") {
1969 $media_links[] = $link;
1981 if (count($glossary_links) > 0 && !$this->lm->isActivePreventGlossaryAppendix()) {
1985 foreach ($glossary_links as
$key => $link) {
1987 $terms[$term .
":" .
$key] = array(
"key" =>
$key,
"link" => $link,
"term" => $term);
1992 foreach ($terms as $t) {
1999 foreach ($defs as $def) {
2001 if (count($defs) > 1) {
2002 $tpl->setCurrentBlock(
"def_title");
2005 $this->
lng->txt(
"cont_definition") .
" " . ($def_cnt++)
2007 $tpl->parseCurrentBlock();
2010 $page_gui->setTemplateOutput(
false);
2011 $page_gui->setOutputMode(
"print");
2013 $tpl->setCurrentBlock(
"definition");
2014 $page_gui->setFileDownloadLink(
"#");
2015 $page_gui->setFullscreenLink(
"#");
2016 $page_gui->setSourcecodeDownloadScript(
"#");
2017 $output = $page_gui->showPage();
2018 $tpl->setVariable(
"VAL_DEFINITION", $output);
2019 $tpl->parseCurrentBlock();
2023 $tpl->setCurrentBlock(
"term");
2028 $tpl->parseCurrentBlock();
2033 $tpl->setCurrentBlock(
"glossary");
2034 $annex_title = $this->
lng->txt(
"cont_annex") .
" " .
2035 chr(64 + $annex_cnt) .
": " . $this->
lng->txt(
"glo");
2037 $tpl->parseCurrentBlock();
2039 $annexes[] = $annex_title;
2043 if (count($media_links) > 0) {
2044 foreach ($media_links as $media) {
2045 if (substr($media[
"Target"], 0, 4) ==
"il__") {
2046 $arr = explode(
"_", $media[
"Target"]);
2047 $id = $arr[count($arr) - 1];
2050 $med_item = $med_obj->getMediaItem(
"Standard");
2051 if (is_object($med_item)) {
2052 if (is_int(strpos($med_item->getFormat(),
"image"))) {
2053 $tpl->setCurrentBlock(
"ref_image");
2056 if ($med_item->getLocationType() ==
"LocalFile") {
2060 "/" . $med_item->getLocation()
2065 $med_item->getLocation()
2069 if ($med_item->getCaption() !=
"") {
2070 $tpl->setVariable(
"IMG_TITLE", $med_item->getCaption());
2072 $tpl->setVariable(
"IMG_TITLE", $med_obj->getTitle());
2074 $tpl->parseCurrentBlock();
2082 $tpl->setCurrentBlock(
"ref_images");
2083 $annex_title = $this->
lng->txt(
"cont_annex") .
" " .
2084 chr(64 + $annex_cnt) .
": " . $this->
lng->txt(
"cont_ref_images");
2085 $tpl->
setVariable(
"TXT_REF_IMAGES", $annex_title);
2086 $tpl->parseCurrentBlock();
2088 $annexes[] = $annex_title;
2092 if ($output_header) {
2093 $tpl->setCurrentBlock(
"print_header");
2094 $tpl->setVariable(
"LM_TITLE", $this->getLMPresentationTitle());
2095 if ($this->lm->getDescription() !=
"none") {
2096 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
2097 $md_gen = $md->getGeneral();
2098 foreach ($md_gen->getDescriptionIds() as
$id) {
2099 $md_des = $md_gen->getDescription(
$id);
2100 $description = $md_des->getDescription();
2108 $tpl->parseCurrentBlock();
2112 foreach ($nodes2 as $node2) {
2113 if ($node2[
"type"] ==
"st"
2115 $this->lm->getRefId(),
2119 for ($j = 1; $j < $node2[
"depth"]; $j++) {
2120 $tpl->setCurrentBlock(
"indent");
2122 $tpl->parseCurrentBlock();
2124 $tpl->setCurrentBlock(
"toc_entry");
2130 $this->lm->isActiveNumbering(),
2131 (
bool) $this->lm_set->get(
"time_scheduled_page_activation"),
2137 $tpl->parseCurrentBlock();
2142 foreach ($annexes as $annex) {
2143 $tpl->setCurrentBlock(
"indent");
2145 $tpl->parseCurrentBlock();
2146 $tpl->setCurrentBlock(
"toc_entry");
2147 $tpl->setVariable(
"TXT_TOC_TITLE", $annex);
2148 $tpl->parseCurrentBlock();
2151 $tpl->setCurrentBlock(
"toc");
2152 $tpl->setVariable(
"TXT_TOC", $this->
lng->txt(
"cont_toc"));
2155 $tpl->setCurrentBlock(
"print_start_block");
2156 $tpl->parseCurrentBlock();
2160 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
2161 if (is_object($lifecycle = $md->getLifecycle())) {
2162 $sep = $author =
"";
2163 foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
2164 $md_con = $lifecycle->getContribute($con_id);
2165 if ($md_con->getRole() ==
"Author") {
2166 foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
2167 $md_ent = $md_con->getEntity($ent_id);
2168 $author = $author . $sep . $md_ent->getEntity();
2173 if ($author !=
"") {
2174 $this->
lng->loadLanguageModule(
"meta");
2176 $tpl->setVariable(
"TXT_AUTHOR", $this->
lng->txt(
"meta_author"));
2178 $tpl->parseCurrentBlock();
2183 if (is_object($md_rights = $md->getRights())) {
2184 $copyright = $md_rights->getDescription();
2187 if ($copyright !=
"") {
2188 $this->
lng->loadLanguageModule(
"meta");
2190 $tpl->setVariable(
"TXT_COPYRIGHT", $this->
lng->txt(
"meta_copyright"));
2192 $tpl->parseCurrentBlock();
2195 $this->tpl->setContent(
$tpl->get());
2196 $this->tpl->addOnLoadCode(
"il.Util.print();");
2197 $this->tpl->printToStdout();
2205 $page_gui = $this->getLMPageGUI($this->getCurrentPageId());
2206 $page_gui->downloadFile();
2214 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
2217 $tpl =
new ilTemplate(
"tpl.lm_download_list.html",
true,
true,
"Modules/LearningModule");
2220 $md =
new ilMD($this->lm->getId(), 0, $this->lm->getType());
2221 if (is_object($md_rights = $md->getRights())) {
2222 $copyright = $md_rights->getDescription();
2226 if ($copyright !=
"") {
2227 $this->
lng->loadLanguageModule(
"meta");
2229 $tpl->setVariable(
"TXT_COPYRIGHT", $this->
lng->txt(
"meta_copyright"));
2231 $tpl->parseCurrentBlock();
2236 $tpl->setVariable(
"DOWNLOAD_TABLE", $download_table->getHTML());
2239 $modal = $this->
ui->factory()->modal()->roundtrip(
2240 $this->
lng->txt(
"download"),
2241 $this->ui->factory()->legacy(
$tpl->get())
2243 echo $this->
ui->renderer()->render($modal);
2252 if (!$this->lm->isActiveDownloads() || !$this->lm->isActiveLMMenu()) {
2256 $type = $this->requested_type;
2257 $base_type = explode(
"_",
$type);
2258 $base_type = $base_type[0];
2259 $file = $this->lm->getPublicExportFile($base_type);
2260 if ($this->lm->getPublicExportFile($base_type) !=
"") {
2261 $dir = $this->lm->getExportDirectory(
$type);
2262 if (is_file($dir .
"/" . $file)) {
2278 int $a_return_ref_id
2280 return "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $a_ref_id .
"&obj_id=" . $a_obj_id .
"&focus_id=" .
2281 $a_obj_id .
"&focus_return=" . $a_return_ref_id;
2288 $this->setContentStyles();
2290 $tpl =
new ilTemplate(
"tpl.page_message_screen.html",
true,
true,
"Modules/LearningModule");
2291 $tpl->setVariable(
"TXT_PAGE_NO_PUBLIC_ACCESS", $a_content);
2293 $this->tpl->setVariable(
"PAGE_CONTENT",
$tpl->get());
2301 $this->showMessageScreen($this->
lng->txt(
"msg_page_no_public_access"));
2309 $this->showMessageScreen($this->
lng->txt(
"msg_no_page_access"));
2318 $this->showMessageScreen($this->
lng->txt(
"cont_no_page_access_unansw_q"));
2323 if (!$this->offlineMode()) {
2324 return $this->
ctrl->getLinkTarget($this,
"");
2332 return $this->offline_directory;
2345 $directory = $this->getOfflineDirectory() .
"/codefiles/" . $page_id .
"/" . $paragraph_id;
2347 $file = $directory .
"/" . $title;
2348 if (!($fp = fopen($file,
"w+"))) {
2349 die(
"<b>Error</b>: Could not open \"" . $file .
"\" for writing" .
2350 " in <b>" . __FILE__ .
"</b> on line <b>" . __LINE__ .
"</b><br />");
2360 $this->tpl->setHeaderPageTitle($this->getLMPresentationTitle());
2365 $concrete_lang = $this->service->getPresentationStatus()->getConcreteLang();
2367 return new ilLMPageGUI($a_id, 0,
false, $this->lang, $concrete_lang);
2370 return new ilLMPageGUI($a_id, 0,
false, $this->ot->getFallbackLanguage(), $concrete_lang);
2372 return new ilLMPageGUI($a_id, 0,
false,
"", $concrete_lang);
2379 $type = ($a_type ==
"mep")
2387 $lang = $this->ot->getFallbackLanguage();
2404 $exp = $this->ilTOC();
2406 echo $exp->getHTML() .
2407 "<script>" . $exp->getOnLoadCode() .
"</script>";
2422 $note = $this->notes->getById($a_note_id);
2423 $text = $note->getText();
2433 $notification->send();
2439 int $current_page_id
2442 $menu_editor->
setObjId($this->lm->getId());
2450 $this->getExportFormat(),
2451 $this->export_all_languages,
2453 $this->offlineMode(),
2461 function ($additional_content) {
2462 $this->additional_content[] = $additional_content;
2465 $navigation_renderer->
render();
2473 $this->addResourceFiles();
2474 switch ($pars[
"cmd"]) {
2476 $tpl =
new ilTemplate(
"tpl.embedded_view.html",
true,
true,
"Modules/LearningModule");
2477 $tpl->setVariable(
"HEAD_ACTION", $this->getHeaderAction());
2478 $tpl->setVariable(
"PAGE_RATING", $this->renderRating());
2480 $tpl->
setVariable(
"COMMENTS", $this->ilLMNotes());
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static addJavaScript(ilGlobalTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
static addCss()
Add required css.
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilCtrl provides processing control methods.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static getWebspaceDir(string $mode="filesystem")
get webspace directory
special template class to simplify handling of ITX/PEAR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getDefinitionList(int $a_term_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookGlossaryTerm(int $term_id)
get glossary term
static get(string $a_glyph, string $a_text="")
static _getTargetsOfSource(string $a_source_type, int $a_source_id, string $a_source_lang="-")
Get all targets of a source object (e.g., a page)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(ilObjLearningModule $a_content_obj, int $a_id=0, bool $a_halt=true)
static _exists(int $a_id)
checks wether a lm content object with specified id exists or not
static _isPagePublic(int $a_node_id, bool $a_check_public_mode=false)
static _lookupType(int $a_obj_id, int $a_lm_id=0)
Extension of ilPageObjectGUI for learning modules.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getPresentationTitle(int $a_pg_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
layout(string $a_xml="main.xml", bool $doShow=true)
ilObjLearningModuleGUI $lm_gui
ilJavaScript(string $a_inline="", string $a_file="", string $a_location="")
getUnsafeGetCommands()
This method must return a list of unsafe GET commands.
initByRequest(?array $query_params=null, bool $embed_mode=false)
Init services and this class by request params.
offlineMode()
checks whether offline content generation is activated
getLMPage(int $a_id, string $a_type="")
ilLMNotes()
output notes of page
ILIAS Style Content Service $cs
ILIAS LearningModule ReadingTime ReadingTimeManager $reading_time_manager
getCurrentPageId()
Get the current page id.
filterNonAccessibleNode(array $nodes)
initPrintViewSelectionForm()
attrib2arr(?array $a_attributes)
renderTabs(string $active_tab, int $current_page_id)
string $requested_focus_return
ilGlobalTemplateInterface $tpl
ilLMPresentationService $service
getContent(bool $skip_nav=false)
int $requested_notification_switch
showMessageScreen(string $a_content)
nop()
this dummy function is needed for offline package creation
downloadFile()
download file of file lists
ILIAS Style Content Object ObjectFacade $content_style_domain
getSourcecodeDownloadLink()
getSafePostCommands()
This method must return a list of safe POST commands.
string $requested_search_string
ilLMPresentationLinker $linker
getHeaderAction(bool $a_redraw=false)
showNavRestrictionDueToQuestions()
Show message if navigation to page is not allowed due to unanswered questions.
showDownloadList()
show download list
showInfoScreen()
info screen call from inside learning module
getCurrentFrameSet()
get frames of current frame set
showPrintViewSelection()
show selection screen for print view
ILIAS GlobalScreen Services $global_screen
bool $export_all_languages
ilLMSubMenu()
output learning module submenu
setContentStyles()
Set content style.
initScreenHead(string $a_active_tab="info")
setSystemStyle()
Set system style.
string $requested_pg_type
array $additional_content
basicPageGuiInit(\ilPageObjectGUI $a_page_gui)
outputInfoScreen()
info screen
php4DOMDocument $layout_doc
downloadExportFile()
send download file (xml/html)
string $requested_back_pg
handleCodeParagraph(int $page_id, int $paragraph_id, string $title, string $text)
store paragraph into file directory files/codefile_$pg_id_$paragraph_id/downloadtitle
determineLayout()
Determine layout.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
ILIAS Style Content GUIService $content_style_gui
getHTML(array $pars)
Get HTML (called by kiosk mode through ilCtrl)
ilNavigationHistory $nav_history
string $requested_obj_type
getFocusLink(int $a_ref_id, int $a_obj_id, int $a_return_ref_id)
Get focused link (used in learning objectives courses)
bool $chapter_has_no_active_page
refreshToc()
Refresh toc (called if questions have been answered correctly)
showNoPageAccess()
Show info message, if page is not accessible in public area.
__construct(string $a_export_format="", bool $a_all_languages=false, string $a_export_dir="", bool $claim_repo_context=true, array $query_params=null, bool $embed_mode=false)
string $offline_directory
ILIAS Notes DomainService $notes
injectTemplate(ilGlobalTemplateInterface $tpl)
observeNoteAction(int $a_lm_id, int $a_page_id, string $a_type, string $a_action, int $a_note_id)
Generate new ilNote and send Notifications to the users informing that there are new comments in the ...
showNoPublicAccess()
Show info message, if page is not accessible in public area.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Main service init and factory.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
hasPredIncorrectAnswers(int $a_obj_id, bool $a_ignore_unlock=false)
Has predecessing incorrect answers.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const LP_CONTEXT_REPOSITORY
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _parseCopyright(string $a_copyright)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Navigation History of Repository Items.
static hasOptOut(int $obj_id)
Is opt out (disable notification) allowed?
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
static _checkPreconditionsOfPage(int $cont_ref_id, int $cont_obj_id, int $page_id)
checks whether the preconditions of a page are fulfilled or not
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getSyntaxStylePath()
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $obj_id)
setStyleId(int $a_styleid)
setOutputMode(string $a_mode=self::PRESENTATION)
setOfflineDirectory(string $offdir)
setSourcecodeDownloadScript(string $script_name)
setFullscreenLink(string $a_fullscreen_link)
setFileDownloadLink(string $a_download_link)
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
static _lookupActive(int $a_id, string $a_parent_type, bool $a_check_scheduled_activation=false, string $a_lang="-")
lookup activation status
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static resetRatingForUserAndObject(int $a_obj_id, string $a_obj_type, int $a_sub_obj_id, string $a_sub_obj_type, int $a_user_id)
Reset rating for a user and an object.
static writeRatingForUserAndObject(int $a_obj_id, string $a_obj_type, ?int $a_sub_obj_id, ?string $a_sub_obj_type, int $a_user_id, int $a_rating, int $a_category_id=0)
Write rating for a user and an object.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
Session based immediate storage.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getPresentationTitle(int $a_st_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setBackTarget(string $a_title, string $a_target, string $a_frame="")
special template class to simplify handling of ITX/PEAR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static init(ilGlobalTemplateInterface $template=null)
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
domxml_open_mem($str, $mode=0, &$error=null)
xpath_new_context($dom_document)
xpath_eval(php4DOMXPath $xpath_context, string $eval_str, $contextnode=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
Interface ilCtrlSecurityInterface provides ilCtrl security information.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
getService(string &$path)
form( $class_path, string $cmd)