84 : string
85 {
87
88 $tpl =
new ilTemplate(
"tpl.lm_navigation.html",
true,
true,
"Modules/LearningModule/Presentation");
89
90 if (empty($page_id)) {
91 return "";
92 }
93
94
95 $back_pg = $this->navigation_status->getBackPageId();
96 if ($back_pg > 0) {
97 $back_href =
98 $this->linker->getLink(
99 "layout",
100 $back_pg,
101 "",
102 "",
103 "reduce"
104 );
105 $back_img =
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();
116 } else {
117 $pre_id = $this->navigation_status->getPredecessorPageId();
118 if ($pre_id > 0) {
119
121 $pre_id,
122 $this->lm->getPageHeader(),
123 $this->lm->isActiveNumbering(),
124 (bool) $this->lm_set->get("time_scheduled_page_activation"),
125 false,
126 0,
127 $this->lang,
128 true
129 );
131 $prev_img =
133
134 if (!$this->lm->cleanFrames()) {
135 $prev_href =
136 $this->linker->getLink(
137 "layout",
138 $pre_id,
139 $this->requested_frame
140 );
141 $prev_target = "";
142 } else {
143 if (!$this->offline) {
144 $prev_href =
145 $this->linker->getLink("layout", $pre_id);
147 } else {
148 $prev_href =
149 $this->linker->getLink("layout", $pre_id);
150 $prev_target = 'target="_top" ';
151 }
152 }
153
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"
163 }
164
165 $succ_id = $this->navigation_status->getSuccessorPageId();
166 if ($succ_id > 0) {
167
169 $succ_id,
170 $this->lm->getPageHeader(),
171 $this->lm->isActiveNumbering(),
172 (bool) $this->lm_set->get("time_scheduled_page_activation"),
173 false,
174 0,
175 $this->lang,
176 true
177 );
179 $succ_img =
181 if (!$this->lm->cleanFrames()) {
182 $succ_href =
183 $this->linker->getLink(
184 "layout",
185 $succ_id,
186 $this->requested_frame
187 );
188 $succ_target = "";
189 } else {
190 if (!$this->offline) {
191 $succ_href =
192 $this->linker->getLink("layout", $succ_id);
194 } else {
195 $succ_href =
196 $this->linker->getLink("layout", $succ_id);
197 $succ_target = ' target="_top" ';
198 }
199 }
200
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();
211
212
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');");
217 }
218 }
219 }
220 }
221 }
222
223 $tpl->setVariable(
"CLASS", ($top) ?
"tnav_Top" :
"bnav_Bottom");
224
226 }
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...
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 $img, string $module_path="", string $mode="output", bool $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