93 : string
94 {
98 $actions = [];
99
100 $getcmd = "getHTML";
101
102 $content_active = ($this->active_tab === "content");
103
104 if (!$this->lm->isActiveLMMenu()) {
105 return "";
106 }
107
108 $tabs_gui = $ilTabs;
109
110
111 if ($this->offline) {
113 }
114
115
116 if (!$this->offline && $ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
117 $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $this->requested_obj_id);
118 if (!$content_active) {
120 $this->ui_factory->button()->standard($this->
lng->txt(
"content"), $ilCtrl->getLinkTargetByClass(
"illmpresentationgui",
"layout"))
121 );
122 }
123 } elseif ($this->offline) {
124 $tabs_gui->setForcePresentationOfSingleTab(true);
125 }
126
127 if (!$content_active) {
128 return "";
129 }
130
131
132 if ($this->lm->isInfoEnabled()) {
133 if (!$this->offline) {
134 $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $this->requested_obj_id);
135 $link = $this->
ctrl->getLinkTargetByClass(
136 array("illmpresentationgui", "ilinfoscreengui"),
137 "showSummary"
138 );
139
140
141
142
143 $actions[] =
144 $this->ui_factory->button()->shy($this->
lng->txt(
"info_short"), $link);
145 }
146 }
147 if (!$this->offline &&
148 $ilAccess->checkAccess("read", "", $this->requested_ref_id) &&
150 $ilCtrl->setParameterByClass("illmpresentationgui", "obj_id", $this->requested_obj_id);
154 $this->ui_factory->button()->standard(
155 $this->lng->txt("learning_progress"),
156 $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "")
157 )
158 );
159 } else {
161 $this->ui_factory->button()->standard(
162 $this->lng->txt("learning_progress"),
163 $this->ctrl->getLinkTargetByClass(array("illmpresentationgui", "illearningprogressgui"), "editManual")
164 )
165 );
166 }
167
168
169
170
171
172
173
174 }
175
176
177 $menu = new \ILIAS\LearningModule\Menu\ilLMMenuGUI($this->lm_pres_service);
178 foreach ($menu->getEntries() as $entry) {
179 if (is_object($entry["signal"])) {
180 if ($this->lm_pres_service->getPresentationStatus()->getEmbedMode()) {
182 $this->ui_factory->button()->standard($entry["label"], '')
183 ->withOnClick($entry["signal"])
184 );
185 } else {
186 $actions[] = $this->ui_factory->button()->shy($entry["label"], '')
187 ->withOnClick($entry["signal"]);
188 }
189 }
190 if (is_object($entry["modal"])) {
192 }
193 if ($entry["on_load"] != "") {
194 $this->main_tpl->addOnLoadCode($entry["on_load"]);
195 }
196 }
197
198
199 if (!$this->offline) {
200 if ($ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
201
202 if ($this->current_page > 0) {
203 $actions[] = $this->ui_factory->button()->shy(
204 $this->
lng->txt(
"edit_page"),
205 ILIAS_HTTP_PATH . "/ilias.php?baseClass=ilLMEditorGUI&ref_id=" . $this->requested_ref_id .
206 "&obj_id=" . $this->current_page . "&to_page=1"
207 );
208 }
209 $actions[] = $this->ui_factory->button()->shy(
210 $this->
lng->txt(
"lm_edit_chapters"),
211 $this->
ctrl->getLinkTargetByClass([
"ilLMEditorGUI",
"ilobjlearningmodulegui"],
"chapters")
212 );
213 $actions[] = $this->ui_factory->button()->shy(
214 $this->
lng->txt(
"lm_edit_lm_settings"),
215 $this->
ctrl->getLinkTargetByClass([
"ilLMEditorGUI",
"ilobjlearningmodulegui"],
"properties")
216 );
217 }
218 }
219 if (count($actions) > 0) {
221 $this->ui_factory->dropdown()->standard($actions)
222 );
223 }
224
225 return $tabs_gui->$getcmd();
226 }
const int LP_MODE_COLLECTION_MANUAL
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static getInstance(int $obj_id)
setSetupMode(bool $a_val)