90 : string
91 {
92 $this->
toolbar->setStickyItems([]);
93
95
96 $tpl =
new ilTemplate(
"tpl.lm_navigation.html",
true,
true,
"components/ILIAS/LearningModule/Presentation");
97
98 if (empty($page_id)) {
99 return "";
100 }
101
102
103 $back_pg = $this->navigation_status->getBackPageId();
104 if ($back_pg > 0) {
105 $back_href =
106 $this->linker->getLink(
107 "layout",
108 $back_pg,
109 "",
110 "",
111 "reduce"
112 );
113 $back_img =
115 $tpl->setCurrentBlock("ilLMNavigation_Prev");
116 $tpl->setVariable("IMG_PREV", $back_img);
117 $tpl->setVariable("HREF_PREV", $back_href);
118 $tpl->setVariable(
"TXT_PREV", $this->
lng->txt(
"back"));
119 $tpl->setVariable(
"ALT_PREV", $this->
lng->txt(
"back"));
120 $tpl->setVariable("SPACER_PREV", $this->offline
121 ? "images/media/spacer.png"
123 $tpl->parseCurrentBlock();
124 if ($top) {
125 $b = $this->
ui->factory()->button()->standard(
126 "<span class=\"glyphicon glyphicon-chevron-left \" aria-hidden=\"true\"></span>",
127 $back_href
128 );
130 }
131 } else {
132 $pre_id = $this->navigation_status->getPredecessorPageId();
133 if ($pre_id > 0) {
134
136 $pre_id,
137 $this->lm->getPageHeader(),
138 $this->lm->isActiveNumbering(),
139 (bool) $this->lm_set->get("time_scheduled_page_activation"),
140 false,
141 0,
142 $this->lang,
143 true
144 );
146 $prev_img =
148
149 if (!$this->lm->cleanFrames()) {
150 $prev_href =
151 $this->linker->getLink(
152 "layout",
153 $pre_id,
154 $this->requested_frame
155 );
156 $prev_target = "";
157 } else {
158 if (!$this->offline) {
159 $prev_href =
160 $this->linker->getLink("layout", $pre_id);
161 } else {
162 $prev_href =
163 $this->linker->getLink("layout", $pre_id);
164 }
165 }
166
167 $tpl->setCurrentBlock("ilLMNavigation_Prev");
168 $tpl->setVariable("IMG_PREV", $prev_img);
169 $tpl->setVariable("HREF_PREV", $prev_href);
170 $tpl->setVariable("TXT_PREV", $prev_title);
171 $tpl->setVariable(
"ALT_PREV", $this->
lng->txt(
"previous"));
172 $tpl->setVariable("SPACER_PREV", $this->offline
173 ? "images/media/spacer.png"
175
176 if ($top) {
177 $b = $this->
ui->factory()->button()->standard(
178 "<span class=\"glyphicon glyphicon-chevron-left \" aria-hidden=\"true\"></span>",
179 $prev_href
180 );
182 }
183 } else {
184 if ($top) {
185 $b = $this->
ui->factory()->button()->standard(
186 "<span class=\"glyphicon glyphicon-chevron-left \" aria-hidden=\"true\"></span>",
187 "#"
188 )->withUnavailableAction();
190 }
191 }
192
194
195 $succ_id = $this->navigation_status->getSuccessorPageId();
196 if ($succ_id > 0) {
197
199 $succ_id,
200 $this->lm->getPageHeader(),
201 $this->lm->isActiveNumbering(),
202 (bool) $this->lm_set->get("time_scheduled_page_activation"),
203 false,
204 0,
205 $this->lang,
206 true
207 );
209 $succ_img =
211 if (!$this->lm->cleanFrames()) {
212 $succ_href =
213 $this->linker->getLink(
214 "layout",
215 $succ_id,
216 $this->requested_frame
217 );
218 $succ_target = "";
219 } else {
220 if (!$this->offline) {
221 $succ_href =
222 $this->linker->getLink("layout", $succ_id);
223 } else {
224 $succ_href =
225 $this->linker->getLink("layout", $succ_id);
226 }
227 }
228
229 $tpl->setCurrentBlock("ilLMNavigation_Next");
230 $tpl->setVariable("IMG_SUCC", $succ_img);
231 $tpl->setVariable("HREF_SUCC", $succ_href);
232 $tpl->setVariable("TXT_SUCC", $succ_title);
233 $tpl->setVariable(
"ALT_SUCC", $this->
lng->txt(
"next"));
234 $tpl->setVariable("SPACER_SUCC", $this->offline
235 ? "images/media/spacer.png"
237 $tpl->parseCurrentBlock();
238
239
240 if (!$this->offline) {
241 if ($this->lm->getRestrictForwardNavigation()) {
242 if ($this->tracker->hasPredIncorrectAnswers($succ_id)) {
243 $this->main_tpl->addOnLoadCode("il.LearningModule.hideNextNavigation();");
244 }
245 }
246 }
247 if ($top) {
248 $b = $this->
ui->factory()->button()->standard(
249 "<span class=\"glyphicon glyphicon-chevron-right \" aria-hidden=\"true\"></span>",
250 $succ_href
251 );
253 }
254 } else {
255 if ($top) {
256 $b = $this->
ui->factory()->button()->standard(
257 "<span class=\"glyphicon glyphicon-chevron-right \" aria-hidden=\"true\"></span>",
258 "#"
259 )->withUnavailableAction();
261 }
262 }
263 }
264 $tpl->setVariable("CLASS", ($top) ? "tnav_Top" : "bnav_Bottom");
265
266 return $tpl->get();
267 }
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
special template class to simplify handling of ITX/PEAR
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)