Render.
136 {
138
140
141 $tpl =
new ilTemplate(
"tpl.lm_navigation.html",
true,
true,
"Modules/LearningModule/Presentation");
142
143 if (empty($page_id)) {
144 return "";
145 }
146
147
148 $back_pg = $this->navigation_status->getBackPageId();
149 if ($back_pg > 0) {
150 $back_href =
151 $this->linker->getLink(
152 "layout",
153 $back_pg,
154 "",
155 "",
156 "reduce"
157 );
158 $back_img =
160 $tpl->setCurrentBlock(
"ilLMNavigation_Prev");
161 $tpl->setVariable(
"IMG_PREV", $back_img);
162 $tpl->setVariable(
"HREF_PREV", $back_href);
163 $tpl->setVariable(
"TXT_PREV", $this->lng->txt(
"back"));
164 $tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"back"));
166 "PREV_ACC_KEY",
168 );
169 $tpl->setVariable(
"SPACER_PREV", $this->offline
170 ? "images/spacer.png"
172 $tpl->parseCurrentBlock();
173 } else {
174 $pre_id = $this->navigation_status->getPredecessorPageId();
175 if ($pre_id > 0) {
176
178 $pre_id,
179 $this->lm->getPageHeader(),
180 $this->lm->isActiveNumbering(),
181 $this->lm_set->get("time_scheduled_page_activation"),
182 false,
183 0,
184 $this->lang,
185 true
186 );
188 $prev_img =
190
191 if (!$this->lm->cleanFrames()) {
192 $prev_href =
193 $this->linker->getLink(
194 "layout",
195 $pre_id,
196 $this->requested_frame
197 );
198 $prev_target = "";
199 } else {
200 if (!$this->offline) {
201 $prev_href =
202 $this->linker->getLink("layout", $pre_id);
204 } else {
205 $prev_href =
206 $this->linker->getLink("layout", $pre_id);
207 $prev_target = 'target="_top" ';
208 }
209 }
210
211 $tpl->setCurrentBlock(
"ilLMNavigation_Prev");
212 $tpl->setVariable(
"IMG_PREV", $prev_img);
213 $tpl->setVariable(
"HREF_PREV", $prev_href);
214 $tpl->setVariable(
"FRAME_PREV", $prev_target);
215 $tpl->setVariable(
"TXT_PREV", $prev_title);
216 $tpl->setVariable(
"ALT_PREV", $this->lng->txt(
"previous"));
217 $tpl->setVariable(
"SPACER_PREV", $this->offline
218 ? "images/spacer.png"
221 "PREV_ACC_KEY",
223 );
224 }
225
226 $succ_id = $this->navigation_status->getSuccessorPageId();
227 if ($succ_id > 0) {
228
230 $succ_id,
231 $this->lm->getPageHeader(),
232 $this->lm->isActiveNumbering(),
233 $this->lm_set->get("time_scheduled_page_activation"),
234 false,
235 0,
236 $this->lang,
237 true
238 );
240 $succ_img =
242 if (!$this->lm->cleanFrames()) {
243 $succ_href =
244 $this->linker->getLink(
245 "layout",
246 $succ_id,
247 $this->requested_frame
248 );
249 $succ_target = "";
250 } else {
251 if (!$this->offline) {
252 $succ_href =
253 $this->linker->getLink("layout", $succ_id);
255 } else {
256 $succ_href =
257 $this->linker->getLink("layout", $succ_id);
258 $succ_target = ' target="_top" ';
259 }
260 }
261
262 $tpl->setCurrentBlock(
"ilLMNavigation_Next");
263 $tpl->setVariable(
"IMG_SUCC", $succ_img);
264 $tpl->setVariable(
"HREF_SUCC", $succ_href);
265 $tpl->setVariable(
"FRAME_SUCC", $succ_target);
266 $tpl->setVariable(
"TXT_SUCC", $succ_title);
267 $tpl->setVariable(
"ALT_SUCC", $this->lng->txt(
"next"));
268 $tpl->setVariable(
"SPACER_SUCC", $this->offline
269 ? "images/spacer.png"
272 "NEXT_ACC_KEY",
274 );
275 $tpl->parseCurrentBlock();
276
277
278 if (!$this->offline) {
279 if ($this->lm->getRestrictForwardNavigation()) {
280 if ($this->tracker->hasPredIncorrectAnswers($succ_id)) {
281 $this->main_tpl->addOnLoadCode("$('.ilc_page_rnav_RightNavigation').addClass('ilNoDisplay');");
282 }
283 }
284 }
285 }
286 }
287
288 $tpl->setVariable(
"CLASS", ($top) ?
"tnav_Top":
"bnav_Bottom");
289
291 }
static getAttribute($a_func_id)
Get accesskey HTML attribute.
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...
special template class to simplify handling of ITX/PEAR
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl