43 : void {
45
46 $current_user =
$dic[
'ilUser'];
47 $current_user_id = (
int) $current_user->getId();
48
49 $this[
"obj.ref_id"] =
function (
$c) use ($object):
int {
51 if (!$ref) {
53 $ref = array_shift($refs);
54 }
55 return (int) $ref;
56 };
57
58 $this["obj.obj_id"] = $obj_id;
59
60 $this["usr.id"] = $current_user_id;
61
64 };
65
71 $lsdic["db.postconditions"],
72 $online_status
73 );
74 };
75
80 $dic[
'ilObjDataCache']
81 );
82 };
83
87 $lsdic["db.states"],
90 );
91 };
92
93
95 return $dic[
"http"]->wrapper()->query();
96 };
97
98
102
113 $lsdic[
"db.settings"]->getSettingsFor(
$c[
"obj.obj_id"]),
114 $c[
"player.launchlinksbuilder"],
117 $intro,
118 $extro,
120 );
121 };
122
123 $this[
"player.urlbuilder.lp"] =
function (
$c) use (
$dic, $data_factory):
LSUrlBuilder {
124 $player_base_url =
$dic[
'ilCtrl']->getLinkTargetByClass(
125 'ilObjLearningSequenceLPPollingGUI',
127 '',
128 false,
129 false
130 );
131 $player_base_url = $data_factory->uri(ILIAS_HTTP_PATH . '/' . $player_base_url);
132
134 };
139 $dic[
'ilObjDataCache'],
141 $dic->http()->wrapper()->query()
142 );
143 };
144
147 $c[
"player.urlbuilder"],
149 );
150 };
151
154 $c[
"player.urlbuilder"],
156 );
157 };
158
161 $dic[
'service.kiosk_mode'],
164 $dic[
'learning_object_metadata']
165 );
166 };
167
169 $player_base_url =
$dic[
'ilCtrl']->getLinkTargetByClass(
170 'ilObjLearningSequenceLearnerGUI',
172 '',
173 false,
174 false
175 );
176 $player_base_url = $data_factory->uri(ILIAS_HTTP_PATH . '/' . $player_base_url);
177
179 };
180
183 return $db->getSettings();
184 };
185
189 $c[
"player.urlbuilder"],
191 $c[
"globalsetttings"],
192 $c[
"player.urlbuilder.lp"]
193 );
194 };
195
197 $kiosk_template =
new ilTemplate(
"tpl.kioskpage.html",
true,
true,
'components/ILIAS/LearningSequence');
198 $window_title =
$dic[
'ilSetting']->get(
'short_inst_name',
'ILIAS');
199
201 $dic[
"global_screen"]->layout()->meta(),
205 $kiosk_template,
208 $window_title
209 );
210 };
211
212
214 $first_access =
$c[
"learneritems"]->getFirstAccess();
215
223 $first_access,
226 );
227 };
228
230 $mode = $lsdic[
"db.settings"]->getSettingsFor(
$c[
"obj.obj_id"])->getMode();
234
235 $item_path = $lsdic["db.item_path"];
236 $boundaries = $lsdic["db.boundaries"];
237
238
239
240
242 $navigator,
243 $item_path,
244 $boundaries,
248 );
252 $dic[
"ilObjDataCache"],
253 $c[
"player.urlbuilder"],
255 );
256
257
258
259
260 $learning_map_data_builder =
$c[
"learning_map.data_builder"];
261 $learning_map = static fn(): string
262 => $object->renderLearningMap($learning_map_data_builder, false);
263
266 $c[
"player.controlbuilder"],
267 $c[
"player.urlbuilder"],
268 $c[
"player.viewfactory"],
269 $c[
"player.kioskrenderer"],
271 $lsdic["gs.current_context"],
275 $navigator,
276 $mode,
277 $item_path,
278 $boundaries,
281 $position,
282 $choice_page_builder,
283 $learning_map
284 );
285 };
286
287
288
289
290
291
292
294 $is_adaptive = $lsdic[
"db.settings"]->getSettingsFor(
$c[
"obj.obj_id"])->getMode()
296
297 $navigator = $is_adaptive
300 $item_path = $lsdic["db.item_path"];
301 $boundaries = $lsdic["db.boundaries"];
302
303 $lso_obj_id =
$c[
"obj.obj_id"];
304 $ref_id =
$c[
"obj.ref_id"];
306 $progress_db =
$c[
"db.progress"];
307
308
309
310
311
312
313 $position_factory =
static function (
int $usr_id) use ($is_adaptive, $navigator, $item_path, $boundaries, $lso_obj_id, $db):
LSOLearningMapPosition {
314
315
316
317 if (!$is_adaptive) {
319 $navigator,
320 $item_path,
321 $boundaries,
322 $lso_obj_id,
323 $usr_id,
324 $db
325 );
326 }
328 $navigator,
329 $item_path,
330 $boundaries,
331 $lso_obj_id,
332 $usr_id,
333 $db
334 );
335 };
336
337
338 $items_factory = static function (int $usr_id) use ($is_adaptive, $progress_db, $ref_id): array {
339 $items = $progress_db->getLearnerItems($usr_id, $ref_id);
340 if (!$is_adaptive) {
341 usort(
342 $items,
344 =>
$a->getOrderNumber() <=>
$b->getOrderNumber()
345 );
346 }
347 return $items;
348 };
349
351 $navigator,
352 $c[
"player.urlbuilder"],
353
354
356 $lso_obj_id,
358 $position_factory,
359 $items_factory,
360 !$is_adaptive
361 );
362 };
363
367 $dic[
"ilLoggerFactory"]->getComponentLogger(
'lso'),
368 $dic[
"ilAppEventHandler"],
370 );
371 };
372
382 $current_user,
384 );
385 };
386
388 return $dic[
'ui.renderer'];
389 };
390 }
Class ArrayBasedRequestWrapper.
Builds learning map data for a user and view mode.
Tracks a user's position and visit history in a learning map.
Provides navigation rules for sequential learning maps.
Tracks the position in a sequential learning map.
Provides condition-based navigation through an adaptive learning sequence.
Reusable "template" for the adaptive branch-selection page.
Provides index-based navigation through the items of a learning sequence.
const CMD_CHECK_CURRENT_ITEM_LP
Global Settings of the Learning Sequence.
Add learning progress and availability information to the LSItem.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstance(int $a_obj_id)
Repository for LSGlobalSettings over ILIAS global settings.
Builds the links to join/(re-)start the LearningSequence.
This combines calls to ProgressDB and StateDB to handle learner-items in the context of a specific LS...
Implementation of KioskMode Player.
Get LearningProgress and availability of items in sequence.
@ilCtrl_Calls ilObjLearningSequenceLearnerGUI: ilCommonActionDispatcherGUI
getContentPageHTML(LSOPageType $page_type)
static _getAllReferences(int $id)
get all reference ids for object ID
special template class to simplify handling of ITX/PEAR
An entity that renders components to a string output.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples