Render.
149 {
153
154 $getcmd = "getHTML";
155
157
158 if (!$this->lm->isActiveLMMenu()) {
159 return "";
160 }
161
162 $tabs_gui = $ilTabs;
163
164
165 if ($this->offline) {
166 $tabs_gui->setSetupMode(true);
167 }
168
169
170 if (!$this->offline && $ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
171 $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $this->requested_obj_id);
172 if (!$active["content"]) {
173 $this->toolbar->addComponent(
174 $this->ui_factory->button()->standard($this->lng->txt("content"), $ilCtrl->getLinkTargetByClass("illmpresentationgui", "layout"))
175 );
176 }
177 } elseif ($this->offline) {
178 $tabs_gui->setForcePresentationOfSingleTab(true);
179 }
180
181 if (!$active["content"]) {
182 return;
183 }
184
185
186 if ($this->export_format != "scorm" && !$this->offline) {
187 if (!$this->offline) {
188 $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $this->requested_obj_id);
189 $link = $this->ctrl->getLinkTargetByClass(
190 array("illmpresentationgui", "ilinfoscreengui"),
191 "showSummary"
192 );
193 } else {
194 $link = "./info.html";
195 }
196 $this->toolbar->addComponent(
197 $this->ui_factory->button()->standard($this->lng->txt("info_short"), $link)
198 );
199 }
200
201 if (!$this->offline &&
202 $ilAccess->checkAccess("read", "", $this->requested_ref_id) &&
204
206
208 $this->toolbar->addComponent(
209 $this->ui_factory->button()->standard($this->lng->txt("learning_progress"),
210 $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "editManual"))
211 );
212
214 $this->toolbar->addComponent(
215 $this->ui_factory->button()->standard($this->lng->txt("learning_progress"),
216 $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "showtlt")
217 ));
218 }
219 }
220
221
222 $menu = new \ILIAS\LearningModule\Menu\ilLMMenuGUI($this->lm_pres_service);
223 foreach ($menu->getEntries() as $entry) {
224 if (is_object($entry["signal"])) {
225 $this->toolbar->addComponent(
226 $this->ui_factory->button()->standard($entry["label"], '')
227 ->withOnClick($entry["signal"]));
228 }
229 if (is_object($entry["modal"])) {
231 }
232 if ($entry["on_load"] != "") {
233 $this->main_tpl->addOnLoadCode($entry["on_load"]);
234 }
235 }
236
237
238 if (!$this->offline) {
239 if ($ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
240 if ($this->current_page <= 0) {
241 $link = $this->ctrl->getLinkTargetByClass(["ilLMEditorGUI", "ilobjlearningmodulegui"], "chapters");
242 } else {
243 $link = ILIAS_HTTP_PATH . "/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
244 "&obj_id=" . $this->current_page . "&to_page=1";
245 }
246 $this->toolbar->addComponent(
247 $this->ui_factory->button()->standard($this->lng->txt("edit_page"),
248 $link
249 ));
250
251 }
252 }
253
254 return $tabs_gui->$getcmd();
255 }
const LP_MODE_COLLECTION_TLT
const LP_MODE_COLLECTION_MANUAL
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
static getInstance($a_obj_id)