49 int $requested_obj_id,
50 string $requested_back_pg,
51 string $requested_frame
62 $this->chapter_has_no_active_page = $service->
getNavigationStatus()->isChapterWithoutActivePage();
67 $back_pg = explode(
":", $requested_back_pg);
68 $this->requested_back_pg = (
int) $back_pg[0];
81 return $this->
render(
false);
84 protected function render(
bool $top =
true): string
88 $tpl =
new ilTemplate(
"tpl.lm_navigation.html",
true,
true,
"Modules/LearningModule/Presentation");
90 if (empty($page_id)) {
95 $back_pg = $this->navigation_status->getBackPageId();
98 $this->linker->getLink(
107 $tpl->setCurrentBlock(
"ilLMNavigation_Prev");
108 $tpl->setVariable(
"IMG_PREV", $back_img);
109 $tpl->setVariable(
"HREF_PREV", $back_href);
110 $tpl->setVariable(
"TXT_PREV", $this->
lng->txt(
"back"));
111 $tpl->setVariable(
"ALT_PREV", $this->
lng->txt(
"back"));
112 $tpl->setVariable(
"SPACER_PREV", $this->offline
113 ?
"images/spacer.png" 115 $tpl->parseCurrentBlock();
117 $pre_id = $this->navigation_status->getPredecessorPageId();
122 $this->lm->getPageHeader(),
123 $this->lm->isActiveNumbering(),
124 (bool) $this->lm_set->get(
"time_scheduled_page_activation"),
134 if (!$this->lm->cleanFrames()) {
136 $this->linker->getLink(
139 $this->requested_frame
143 if (!$this->offline) {
145 $this->linker->getLink(
"layout", $pre_id);
149 $this->linker->getLink(
"layout", $pre_id);
150 $prev_target =
'target="_top" ';
154 $tpl->setCurrentBlock(
"ilLMNavigation_Prev");
155 $tpl->setVariable(
"IMG_PREV", $prev_img);
156 $tpl->setVariable(
"HREF_PREV", $prev_href);
157 $tpl->setVariable(
"FRAME_PREV", $prev_target);
158 $tpl->setVariable(
"TXT_PREV", $prev_title);
159 $tpl->setVariable(
"ALT_PREV", $this->
lng->txt(
"previous"));
160 $tpl->setVariable(
"SPACER_PREV", $this->offline
161 ?
"images/spacer.png" 165 $succ_id = $this->navigation_status->getSuccessorPageId();
170 $this->lm->getPageHeader(),
171 $this->lm->isActiveNumbering(),
172 (bool) $this->lm_set->get(
"time_scheduled_page_activation"),
181 if (!$this->lm->cleanFrames()) {
183 $this->linker->getLink(
186 $this->requested_frame
190 if (!$this->offline) {
192 $this->linker->getLink(
"layout", $succ_id);
196 $this->linker->getLink(
"layout", $succ_id);
197 $succ_target =
' target="_top" ';
201 $tpl->setCurrentBlock(
"ilLMNavigation_Next");
202 $tpl->setVariable(
"IMG_SUCC", $succ_img);
203 $tpl->setVariable(
"HREF_SUCC", $succ_href);
204 $tpl->setVariable(
"FRAME_SUCC", $succ_target);
205 $tpl->setVariable(
"TXT_SUCC", $succ_title);
206 $tpl->setVariable(
"ALT_SUCC", $this->
lng->txt(
"next"));
207 $tpl->setVariable(
"SPACER_SUCC", $this->offline
208 ?
"images/spacer.png" 210 $tpl->parseCurrentBlock();
213 if (!$this->offline) {
214 if ($this->lm->getRestrictForwardNavigation()) {
215 if ($this->tracker->hasPredIncorrectAnswers($succ_id)) {
216 $this->main_tpl->addOnLoadCode(
"$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
223 $tpl->setVariable(
"CLASS", ($top) ?
"tnav_Top" :
"bnav_Bottom");
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 getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ilLMPresentationGUI $parent_gui
ilLMNavigationStatus $navigation_status
__construct(ilLMPresentationService $service, ilLMPresentationGUI $parent_gui, ilLanguage $lng, ilObjUser $user, ilGlobalTemplateInterface $main_tpl, int $requested_obj_id, string $requested_back_pg, string $requested_frame)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
bool $chapter_has_no_active_page
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $main_tpl
getSettings()
Get learning module settings.
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...
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...
ilLMPresentationLinker $linker
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Main service init and factory.