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