92 : string
93 {
94 $this->
toolbar->setStickyItems([]);
95
97
98 $tpl =
new ilTemplate(
"tpl.lm_navigation.html",
true,
true,
"components/ILIAS/LearningModule/Presentation");
99
100 if (empty($page_id)) {
101 return "";
102 }
103
104
105 $back_pg = $this->navigation_status->getBackPageId();
106 if ($back_pg > 0) {
107 $back_href =
108 $this->linker->getLink(
109 "layout",
110 $back_pg,
111 "",
112 "",
113 "reduce"
114 );
115 $back_img =
123 ? "images/media/spacer.png"
126 if ($top) {
127 $b = $this->
ui->factory()->button()->standard(
128 "<span class=\"glyphicon glyphicon-chevron-left \" aria-hidden=\"true\"></span>",
129 $back_href
130 )->withAriaLabel($this->
lng->txt(
"back"));
132 }
133 } else {
134 $pre_id = $this->navigation_status->getPredecessorPageId();
135 if ($pre_id > 0) {
136
138 $pre_id,
139 $this->lm->getPageHeader(),
140 $this->lm->isActiveNumbering(),
141 (bool) $this->lm_set->get("time_scheduled_page_activation"),
142 false,
143 0,
144 $this->lang,
145 true
146 );
148 $prev_img =
150
151 if (!$this->lm->cleanFrames()) {
152 $prev_href =
153 $this->linker->getLink(
154 "layout",
155 $pre_id,
156 $this->requested_frame
157 );
158 $prev_target = "";
159 } else {
160 if (!$this->offline) {
161 $prev_href =
162 $this->linker->getLink("layout", $pre_id);
163 } else {
164 $prev_href =
165 $this->linker->getLink("layout", $pre_id);
166 }
167 }
168
175 ? "images/media/spacer.png"
177
178 if ($top) {
179 $b = $this->
ui->factory()->button()->standard(
180 "<span class=\"glyphicon glyphicon-chevron-left \" aria-hidden=\"true\"></span>",
181 $prev_href
182 )->withAriaLabel($this->
lng->txt(
"previous"));
184 }
185 } else {
186 if ($top) {
187 $b = $this->
ui->factory()->button()->standard(
188 "<span class=\"glyphicon glyphicon-chevron-left \" aria-hidden=\"true\"></span>",
189 "#"
190 )->withAriaLabel($this->
lng->txt(
"previous"))
191 ->withUnavailableAction();
193 }
194 }
195
197
198 $succ_id = $this->navigation_status->getSuccessorPageId();
199 if ($succ_id > 0) {
200
202 $succ_id,
203 $this->lm->getPageHeader(),
204 $this->lm->isActiveNumbering(),
205 (bool) $this->lm_set->get("time_scheduled_page_activation"),
206 false,
207 0,
208 $this->lang,
209 true
210 );
212 $succ_img =
214 if (!$this->lm->cleanFrames()) {
215 $succ_href =
216 $this->linker->getLink(
217 "layout",
218 $succ_id,
219 $this->requested_frame
220 );
221 $succ_target = "";
222 } else {
223 if (!$this->offline) {
224 $succ_href =
225 $this->linker->getLink("layout", $succ_id);
226 } else {
227 $succ_href =
228 $this->linker->getLink("layout", $succ_id);
229 }
230 }
231
238 ? "images/media/spacer.png"
241
242
243 if (!$this->offline) {
244 if ($this->lm->getRestrictForwardNavigation()) {
245 if ($this->tracker->hasPredIncorrectAnswers($succ_id)) {
246 $this->main_tpl->addOnLoadCode("il.LearningModule.hideNextNavigation();");
247 }
248 }
249 }
250 if ($top) {
251 $b = $this->
ui->factory()->button()->standard(
252 "<span class=\"glyphicon glyphicon-chevron-right \" aria-hidden=\"true\"></span>",
253 $succ_href
254 )->withAriaLabel($this->
lng->txt(
"next"));
256 }
257 } else {
258 if ($top) {
259 $b = $this->
ui->factory()->button()->standard(
260 "<span class=\"glyphicon glyphicon-chevron-right \" aria-hidden=\"true\"></span>",
261 "#"
262 )->withAriaLabel($this->
lng->txt(
"next"))
263 ->withUnavailableAction();
265 }
266 }
267 }
269
271 }
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)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
readonly ilGlobalTemplateInterface $tpl