ILIAS  release_8 Revision v8.24
ilLPListOfObjectsGUI Class Reference
+ Inheritance diagram for ilLPListOfObjectsGUI:
+ Collaboration diagram for ilLPListOfObjectsGUI:

Public Member Functions

 __construct (int $a_mode, int $a_ref_id)
 
 executeCommand ()
 
 updateUser ()
 
 editUser ()
 
 details ()
 
 __showUsersList ($a_print_view=false)
 
 userDetails ()
 
 show ()
 
 __listObjects ()
 
 __initDetails (int $a_details_id)
 
 showObjectSummary ()
 Show object-based summarized tracking data. More...
 
 showUserObjectMatrix ()
 Show object user matrix. More...
 
- Public Member Functions inherited from ilLearningProgressBaseGUI
 __construct (int $a_mode, int $a_ref_id=0, int $a_usr_id=0)
 
 isAnonymized ()
 
 getMode ()
 
 getRefId ()
 
 getObjId ()
 
 getUserId ()
 
 __getDefaultCommand ()
 
 __setSubTabs (int $a_active)
 
 __buildFooter ()
 
 __buildHeader ()
 
 __showObjectDetails (ilInfoScreenGUI $info, int $item_id=0, bool $add_section=true)
 show details about current object. More...
 
 __appendLPDetails (ilInfoScreenGUI $info, int $item_id, int $user_id)
 
 __getLegendHTML (int $variant=ilLPStatusIcons::ICON_VARIANT_LONG)
 
 __showEditUser (int $a_user_id, int $a_ref_id, ?string $a_cancel=null, int $a_sub_id=0)
 
 __updateUser (int $user_id, int $obj_id)
 

Protected Member Functions

 initUserDetailsIdFromQuery ()
 
 initUserIdFromRequest ()
 
 initDetailsIdFromRequest (int $default_id)
 
- Protected Member Functions inherited from ilLearningProgressBaseGUI
 initUserIdFromQuery ()
 
 initEditUserForm (int $a_user_id, int $a_obj_id, ?string $a_cancel=null)
 

Protected Attributes

int $details_id = 0
 
int $details_obj_id = 0
 
string $details_type = ''
 
int $details_mode = 0
 
- Protected Attributes inherited from ilLearningProgressBaseGUI
RefineryFactory $refinery
 
HttpServices $http
 
ilGlobalTemplateInterface $tpl
 
ilHelpGUI $help
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
ilLogger $logger
 
ilTabsGUI $tabs_gui
 
ilToolbarGUI $toolbar
 
ilObjectDataCache $ilObjectDataCache
 
ilObjUser $user
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ilTree $tree
 
bool $anonymized
 
int $usr_id = 0
 
int $ref_id = 0
 
int $obj_id = 0
 
string $obj_type = ''
 
int $mode = 0
 
const LP_ACTIVE_SETTINGS = 1
 
const LP_ACTIVE_OBJECTS = 2
 
const LP_ACTIVE_PROGRESS = 3
 
const LP_ACTIVE_USERS = 5
 
const LP_ACTIVE_SUMMARY = 6
 
const LP_ACTIVE_OBJSTATACCESS = 7
 
const LP_ACTIVE_OBJSTATTYPES = 8
 
const LP_ACTIVE_OBJSTATDAILY = 9
 
const LP_ACTIVE_OBJSTATADMIN = 10
 
const LP_ACTIVE_MATRIX = 11
 

Additional Inherited Members

- Static Public Member Functions inherited from ilLearningProgressBaseGUI
static _getStatusText (int $a_status, ?ilLanguage $a_lng=null)
 Get status alt text. More...
 
static __readStatus (int $a_obj_id, int $user_id)
 @noinspection PhpInconsistentReturnPointsInspection More...
 
static isObjectOffline (int $a_obj_id, string $a_type='')
 
- Data Fields inherited from ilLearningProgressBaseGUI
const LP_CONTEXT_PERSONAL_DESKTOP = 1
 
const LP_CONTEXT_ADMINISTRATION = 2
 
const LP_CONTEXT_REPOSITORY = 3
 
const LP_CONTEXT_USER_FOLDER = 4
 
const LP_CONTEXT_ORG_UNIT = 5
 

Detailed Description

Definition at line 27 of file class.ilLPListOfObjectsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLPListOfObjectsGUI::__construct ( int  $a_mode,
int  $a_ref_id 
)

Definition at line 34 of file class.ilLPListOfObjectsGUI.php.

35 {
36 parent::__construct($a_mode, $a_ref_id);
37 $this->__initDetails(
38 $this->initDetailsIdFromRequest($this->getRefId())
39 );
40 }
initDetailsIdFromRequest(int $default_id)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), __initDetails(), ilLearningProgressBaseGUI\getRefId(), and initDetailsIdFromRequest().

+ Here is the call graph for this function:

Member Function Documentation

◆ __initDetails()

ilLPListOfObjectsGUI::__initDetails ( int  $a_details_id)

Definition at line 379 of file class.ilLPListOfObjectsGUI.php.

379 : void
380 {
381 if (!$a_details_id) {
382 $a_details_id = $this->getRefId();
383 }
384 if ($a_details_id) {
385 $this->details_id = $a_details_id;
386 $this->details_obj_id = $this->ilObjectDataCache->lookupObjId(
387 $this->details_id
388 );
389 $this->details_type = $this->ilObjectDataCache->lookupType(
390 $this->details_obj_id
391 );
392
393 $olp = ilObjectLP::getInstance($this->details_obj_id);
394 $this->details_mode = $olp->getCurrentMode();
395 }
396 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $obj_id)

References ilObjectLP\getInstance(), ilLearningProgressBaseGUI\getRefId(), ilObjectDataCache\lookupObjId(), and ilObjectDataCache\lookupType().

Referenced by __construct(), editUser(), show(), and updateUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __listObjects()

ilLPListOfObjectsGUI::__listObjects ( )

Definition at line 362 of file class.ilLPListOfObjectsGUI.php.

362 : void
363 {
364 $this->tpl->addBlockFile(
365 'ADM_CONTENT',
366 'adm_content',
367 'tpl.lp_list_objects.html',
368 'Services/Tracking'
369 );
370
371 $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
372
373 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
374 if ($lp_table->isStatusShown()) {
375 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML(ilLPStatusIcons::ICON_VARIANT_SHORT));
376 }
377 }
__getLegendHTML(int $variant=ilLPStatusIcons::ICON_VARIANT_LONG)
const ROOT_FOLDER_ID
Definition: constants.php:32

References ilLearningProgressBaseGUI\__getLegendHTML(), ilLPStatusIcons\ICON_VARIANT_SHORT, and ROOT_FOLDER_ID.

Referenced by show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showUsersList()

ilLPListOfObjectsGUI::__showUsersList (   $a_print_view = false)

Definition at line 269 of file class.ilLPListOfObjectsGUI.php.

269 : void
270 {
271 if ($this->isAnonymized()) {
272 $this->tpl->setOnScreenMessage(
273 'failure',
274 $this->lng->txt('permission_denied')
275 );
276 return;
277 }
278 $this->ctrl->setParameter($this, "details_id", $this->details_id);
280 $this,
281 "details",
282 $this->details_obj_id,
283 $this->details_id,
284 $a_print_view
285 );
286
287 $this->tpl->setVariable("LP_OBJECTS", $gui->getHTML());
288 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
289 }
Learning progress table: One object, rows: users, columns: properties Example: A course,...

References ilLearningProgressBaseGUI\__getLegendHTML(), ILIAS\Repository\ctrl(), ilLearningProgressBaseGUI\isAnonymized(), and ILIAS\Repository\lng().

Referenced by details().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ details()

ilLPListOfObjectsGUI::details ( )

Definition at line 241 of file class.ilLPListOfObjectsGUI.php.

241 : void
242 {
243 $this->tpl->addBlockFile(
244 'ADM_CONTENT',
245 'adm_content',
246 'tpl.lp_loo.html',
247 'Services/Tracking'
248 );
249
250 // Show back button
251 if ($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or
252 $this->getMode() == self::LP_CONTEXT_ADMINISTRATION) {
253 $this->toolbar->addButton(
254 $this->lng->txt('trac_view_list'),
255 $this->ctrl->getLinkTarget($this, 'show')
256 );
257 }
258
259 $info = new ilInfoScreenGUI($this);
260 $info->setFormAction($this->ctrl->getFormAction($this));
261 if ($this->__showObjectDetails($info, $this->details_obj_id)) {
262 $this->tpl->setCurrentBlock("info");
263 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
264 $this->tpl->parseCurrentBlock();
265 }
266 $this->__showUsersList();
267 }
Class ilInfoScreenGUI.
__showUsersList($a_print_view=false)
__showObjectDetails(ilInfoScreenGUI $info, int $item_id=0, bool $add_section=true)
show details about current object.

References ilLearningProgressBaseGUI\__showObjectDetails(), __showUsersList(), ILIAS\Repository\ctrl(), ilLearningProgressBaseGUI\getMode(), ILIAS\Repository\lng(), and ILIAS\Repository\toolbar().

Referenced by show().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editUser()

ilLPListOfObjectsGUI::editUser ( )

Definition at line 199 of file class.ilLPListOfObjectsGUI.php.

199 : void
200 {
201 $cancel = '';
202 $parent_id = $this->details_id;
204 if ($details_id) {
206 $sub_id = $this->details_id;
207 $cancel = "userdetails";
208 } else {
209 $sub_id = null;
210 $cancel = "details";
211 }
212
214 'edit_learning_progress',
215 $this->details_id
216 )) {
217 $this->tpl->setOnScreenMessage(
218 'failure',
219 $this->lng->txt("permission_denied"),
220 true
221 );
222 $this->ctrl->returnToParent($this);
223 }
224
225 $info = new ilInfoScreenGUI($this);
226 $info->setFormAction($this->ctrl->getFormAction($this));
227 $this->__showObjectDetails($info, $this->details_obj_id);
228
229 $user_id = $this->initUserIdFromQuery();
230 $this->tpl->setVariable(
231 "ADM_CONTENT",
232 $this->__showEditUser(
233 $user_id,
234 $parent_id,
235 strlen($cancel) > 0 ? $cancel : null,
236 $sub_id ?? 0
237 ) . "<br />" . $info->getHTML()
238 );
239 }
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
__showEditUser(int $a_user_id, int $a_ref_id, ?string $a_cancel=null, int $a_sub_id=0)

References $details_id, __initDetails(), ilLearningProgressBaseGUI\__showEditUser(), ilLearningProgressBaseGUI\__showObjectDetails(), ilLearningProgressAccess\checkPermission(), ILIAS\Repository\ctrl(), initUserDetailsIdFromQuery(), ilLearningProgressBaseGUI\initUserIdFromQuery(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ executeCommand()

ilLPListOfObjectsGUI::executeCommand ( )

Definition at line 84 of file class.ilLPListOfObjectsGUI.php.

84 : void
85 {
86 $this->ctrl->setReturn($this, "");
87
88 switch ($this->ctrl->getNextClass()) {
89 case 'iltruserobjectspropstablegui':
90 $user_id = $this->initUserIdFromQuery();
91 $this->ctrl->setParameter($this, "user_id", $user_id);
92
93 $this->ctrl->setParameter(
94 $this,
95 "details_id",
96 $this->details_id
97 );
98
99 $table_gui = new ilTrUserObjectsPropsTableGUI(
100 $this,
101 "userDetails",
102 $user_id,
103 $this->details_obj_id,
104 $this->details_id
105 );
106 $this->ctrl->forwardCommand($table_gui);
107 break;
108
109 case 'iltrsummarytablegui':
110 $cmd = "showObjectSummary";
111 if (!$this->details_id) {
112 $this->details_id = ROOT_FOLDER_ID;
113 $cmd = "show";
114 }
115 $table_gui = new ilTrSummaryTableGUI(
116 $this,
117 $cmd,
118 $this->details_id
119 );
120 $this->ctrl->forwardCommand($table_gui);
121 break;
122
123 case 'iltrmatrixtablegui':
124 $table_gui = new ilTrMatrixTableGUI(
125 $this,
126 "showUserObjectMatrix",
127 $this->details_id
128 );
129 $this->ctrl->forwardCommand($table_gui);
130 break;
131
132 case 'iltrobjectuserspropstablegui':
133 $this->ctrl->setParameter(
134 $this,
135 "details_id",
136 $this->details_id
137 );
138
139 $table_gui = new ilTrObjectUsersPropsTableGUI(
140 $this,
141 "details",
142 $this->details_obj_id,
143 $this->details_id
144 );
145 $this->ctrl->forwardCommand($table_gui);
146 break;
147
148 default:
149 $cmd = $this->__getDefaultCommand();
150 $this->$cmd();
151 }
152 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilLearningProgressBaseGUI\__getDefaultCommand(), ILIAS\Repository\ctrl(), ilLearningProgressBaseGUI\initUserIdFromQuery(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ initDetailsIdFromRequest()

ilLPListOfObjectsGUI::initDetailsIdFromRequest ( int  $default_id)
protected

Definition at line 67 of file class.ilLPListOfObjectsGUI.php.

67 : int
68 {
69 if ($this->http->wrapper()->query()->has('details_id')) {
70 return $this->http->wrapper()->query()->retrieve(
71 'details_id',
72 $this->refinery->kindlyTo()->int()
73 );
74 }
75 if ($this->http->wrapper()->post()->has('details_id')) {
76 return $this->http->wrapper()->post()->retrieve(
77 'details_id',
78 $this->refinery->kindlyTo()->int()
79 );
80 }
81 return $default_id;
82 }
static http()
Fetches the global http state from ILIAS.

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserDetailsIdFromQuery()

ilLPListOfObjectsGUI::initUserDetailsIdFromQuery ( )
protected

Definition at line 42 of file class.ilLPListOfObjectsGUI.php.

42 : int
43 {
44 if ($this->http->wrapper()->query()->has('userdetails_id')) {
45 return $this->http->wrapper()->query()->retrieve(
46 'userdetails_id',
47 $this->refinery->kindlyTo()->int()
48 );
49 }
50 return 0;
51 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by editUser(), and updateUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserIdFromRequest()

ilLPListOfObjectsGUI::initUserIdFromRequest ( )
protected

Definition at line 53 of file class.ilLPListOfObjectsGUI.php.

53 : int
54 {
55 if ($this->initUserIdFromQuery()) {
56 return $this->initUserIdFromQuery();
57 }
58 if ($this->http->wrapper()->post()->has('user_id')) {
59 return $this->http->wrapper()->post()->retrieve(
60 'user_id',
61 $this->refinery->kindlyTo()->int()
62 );
63 }
64 return 0;
65 }

References ILIAS\FileDelivery\http(), ilLearningProgressBaseGUI\initUserIdFromQuery(), and ILIAS\Repository\refinery().

Referenced by updateUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ show()

ilLPListOfObjectsGUI::show ( )

Definition at line 348 of file class.ilLPListOfObjectsGUI.php.

348 : void
349 {
350 $this->ctrl->setParameter($this, 'offset', 0);
351
352 // Show only detail of current repository item if called from repository
353 switch ($this->getMode()) {
355 $this->__initDetails($this->getRefId());
356 $this->details();
357 return;
358 }
359 $this->__listObjects();
360 }

References __initDetails(), __listObjects(), ILIAS\Repository\ctrl(), details(), ilLearningProgressBaseGUI\getMode(), ilLearningProgressBaseGUI\getRefId(), and ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY.

+ Here is the call graph for this function:

◆ showObjectSummary()

ilLPListOfObjectsGUI::showObjectSummary ( )

Show object-based summarized tracking data.

Definition at line 401 of file class.ilLPListOfObjectsGUI.php.

401 : void
402 {
403 $table = new ilTrSummaryTableGUI(
404 $this,
405 "showObjectSummary",
406 $this->getRefId(),
407 false
408 );
409 $content = $table->getHTML();
410 if ($table->isStatusShown()) {
412 }
413 $this->tpl->setContent($content);
414 }

References ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\getRefId(), and ilLPStatusIcons\ICON_VARIANT_SHORT.

+ Here is the call graph for this function:

◆ showUserObjectMatrix()

ilLPListOfObjectsGUI::showUserObjectMatrix ( )

Show object user matrix.

Definition at line 419 of file class.ilLPListOfObjectsGUI.php.

419 : void
420 {
421 if ($this->isAnonymized()) {
422 $this->tpl->setOnScreenMessage(
423 'failure',
424 $this->lng->txt('permission_denied')
425 );
426 return;
427 }
428 $this->tpl->addBlockFile(
429 'ADM_CONTENT',
430 'adm_content',
431 'tpl.lp_loo.html',
432 'Services/Tracking'
433 );
434 $info = new ilInfoScreenGUI($this);
435 $info->setFormAction($this->ctrl->getFormAction($this));
436 if ($this->__showObjectDetails($info, $this->details_obj_id)) {
437 $this->tpl->setCurrentBlock("info");
438 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
439 $this->tpl->parseCurrentBlock();
440 }
441
442 $table = new ilTrMatrixTableGUI(
443 $this,
444 "showUserObjectMatrix",
445 $this->getRefId()
446 );
447 $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
448 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
449 }

References ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__showObjectDetails(), ILIAS\Repository\ctrl(), ilLearningProgressBaseGUI\getRefId(), ilLearningProgressBaseGUI\isAnonymized(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ updateUser()

ilLPListOfObjectsGUI::updateUser ( )

Definition at line 154 of file class.ilLPListOfObjectsGUI.php.

155 {
157 if ($details_id) {
158 $parent = $this->details_id;
160 }
161
163 'edit_learning_progress',
164 $this->details_id
165 )) {
166 $this->tpl->setOnScreenMessage(
167 'failure',
168 $this->lng->txt("permission_denied"),
169 true
170 );
171 $this->ctrl->returnToParent($this);
172 }
173
174 $this->__updateUser(
175 $this->initUserIdFromRequest(),
176 $this->details_obj_id
177 );
178 $this->tpl->setOnScreenMessage(
179 'success',
180 $this->lng->txt('trac_update_edit_user'),
181 true
182 );
183
184 $this->ctrl->setParameter(
185 $this,
186 "details_id",
187 $this->details_id
188 ); // #15043
189
190 // #14993
191 if (!$details_id) {
192 $this->ctrl->redirect($this, "details");
193 } else {
194 $this->ctrl->setParameter($this, "userdetails_id", $details_id);
195 $this->ctrl->redirect($this, "userdetails");
196 }
197 }

References $details_id, __initDetails(), ilLearningProgressBaseGUI\__updateUser(), ilLearningProgressAccess\checkPermission(), ILIAS\Repository\ctrl(), initUserDetailsIdFromQuery(), initUserIdFromRequest(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ userDetails()

ilLPListOfObjectsGUI::userDetails ( )

Definition at line 291 of file class.ilLPListOfObjectsGUI.php.

291 : void
292 {
293 if ($this->isAnonymized()) {
294 $this->tpl->setOnScreenMessage(
295 'failure',
296 $this->lng->txt('permission_denied')
297 );
298 return;
299 }
300
301 $this->ctrl->setParameter($this, "details_id", $this->details_id);
302
303 $print_view = false;
304 if ($this->http->wrapper()->query()->has('prt')) {
305 $print_view = $this->http->wrapper()->query()->retrieve(
306 'prt',
307 $this->refinery->kindlyTo()->bool()
308 );
309 }
310 if (!$print_view) {
311 // Show back button
312 $this->toolbar->addButton(
313 $this->lng->txt('trac_view_list'),
314 $this->ctrl->getLinkTarget(
315 $this,
316 'details'
317 )
318 );
319 }
320
321 $user_id = $this->initUserIdFromQuery();
322 $this->ctrl->setParameter($this, "user_id", $user_id);
323 $this->tpl->addBlockFile(
324 'ADM_CONTENT',
325 'adm_content',
326 'tpl.lp_loo.html',
327 'Services/Tracking'
328 );
329
330 $info = new ilInfoScreenGUI($this);
331 $info->setFormAction($this->ctrl->getFormAction($this));
332 $this->__showObjectDetails($info, $this->details_obj_id);
333 // $this->__appendLPDetails($info,$this->details_obj_id,$user_id);
334 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
335
336 $table = new ilTrUserObjectsPropsTableGUI(
337 $this,
338 "userDetails",
339 $user_id,
340 $this->details_obj_id,
341 $this->details_id,
342 $print_view
343 );
344 $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
345 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
346 }

References ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__showObjectDetails(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ilLearningProgressBaseGUI\initUserIdFromQuery(), ilLearningProgressBaseGUI\isAnonymized(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Field Documentation

◆ $details_id

int ilLPListOfObjectsGUI::$details_id = 0
protected

Definition at line 29 of file class.ilLPListOfObjectsGUI.php.

Referenced by editUser(), and updateUser().

◆ $details_mode

int ilLPListOfObjectsGUI::$details_mode = 0
protected

Definition at line 32 of file class.ilLPListOfObjectsGUI.php.

◆ $details_obj_id

int ilLPListOfObjectsGUI::$details_obj_id = 0
protected

Definition at line 30 of file class.ilLPListOfObjectsGUI.php.

◆ $details_type

string ilLPListOfObjectsGUI::$details_type = ''
protected

Definition at line 31 of file class.ilLPListOfObjectsGUI.php.


The documentation for this class was generated from the following file: