ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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, string $item_type='', 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 ()
 
 readTypicalLearningTimeInSeconds (int $obj_id, int $sub_id, string $type)
 
 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
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
LOMServices $lom_services
 
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 370 of file class.ilLPListOfObjectsGUI.php.

370 : void
371 {
372 if (!$a_details_id) {
373 $a_details_id = $this->getRefId();
374 }
375 if ($a_details_id) {
376 $this->details_id = $a_details_id;
377 $this->details_obj_id = $this->ilObjectDataCache->lookupObjId(
378 $this->details_id
379 );
380 $this->details_type = $this->ilObjectDataCache->lookupType(
381 $this->details_obj_id
382 );
383
384 $olp = ilObjectLP::getInstance($this->details_obj_id);
385 $this->details_mode = $olp->getCurrentMode();
386 }
387 }
class ilObjectDataCache
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 353 of file class.ilLPListOfObjectsGUI.php.

353 : void
354 {
355 $this->tpl->addBlockFile(
356 'ADM_CONTENT',
357 'adm_content',
358 'tpl.lp_list_objects.html',
359 'components/ILIAS/Tracking'
360 );
361
362 $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
363
364 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
365 if ($lp_table->isStatusShown()) {
366 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML(ilLPStatusIcons::ICON_VARIANT_SHORT));
367 }
368 }
__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 260 of file class.ilLPListOfObjectsGUI.php.

260 : void
261 {
262 if ($this->isAnonymized()) {
263 $this->tpl->setOnScreenMessage(
264 'failure',
265 $this->lng->txt('permission_denied')
266 );
267 return;
268 }
269 $this->ctrl->setParameter($this, "details_id", $this->details_id);
271 $this,
272 "details",
273 $this->details_obj_id,
274 $this->details_id,
275 $a_print_view
276 );
277
278 $this->tpl->setVariable("LP_OBJECTS", $gui->getHTML());
279 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
280 }
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 'components/ILIAS/Tracking'
248 );
249
250 $info = new ilInfoScreenGUI($this);
251 $info->setFormAction($this->ctrl->getFormAction($this));
252 if ($this->__showObjectDetails($info, $this->details_obj_id, $this->details_type)) {
253 $this->tpl->setCurrentBlock("info");
254 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
255 $this->tpl->parseCurrentBlock();
256 }
257 $this->__showUsersList();
258 }
Class ilInfoScreenGUI.
__showUsersList($a_print_view=false)
__showObjectDetails(ilInfoScreenGUI $info, int $item_id=0, string $item_type='', bool $add_section=true)
show details about current object.
$info
Definition: entry_point.php:21

References $info, ilLearningProgressBaseGUI\__showObjectDetails(), __showUsersList(), and ILIAS\Repository\ctrl().

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, $this->details_type);
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, $info, $user_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':
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 $user_id, 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 339 of file class.ilLPListOfObjectsGUI.php.

339 : void
340 {
341 $this->ctrl->setParameter($this, 'offset', 0);
342
343 // Show only detail of current repository item if called from repository
344 switch ($this->getMode()) {
346 $this->__initDetails($this->getRefId());
347 $this->details();
348 return;
349 }
350 $this->__listObjects();
351 }

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 392 of file class.ilLPListOfObjectsGUI.php.

392 : void
393 {
394 $table = new ilTrSummaryTableGUI(
395 $this,
396 "showObjectSummary",
397 $this->getRefId(),
398 false
399 );
400 $content = $table->getHTML();
401 if ($table->isStatusShown()) {
403 }
404 $this->tpl->setContent($content);
405 }

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 410 of file class.ilLPListOfObjectsGUI.php.

410 : void
411 {
412 if ($this->isAnonymized()) {
413 $this->tpl->setOnScreenMessage(
414 'failure',
415 $this->lng->txt('permission_denied')
416 );
417 return;
418 }
419 $this->tpl->addBlockFile(
420 'ADM_CONTENT',
421 'adm_content',
422 'tpl.lp_loo.html',
423 'components/ILIAS/Tracking'
424 );
425 $info = new ilInfoScreenGUI($this);
426 $info->setFormAction($this->ctrl->getFormAction($this));
427 if ($this->__showObjectDetails($info, $this->details_obj_id, $this->details_type)) {
428 $this->tpl->setCurrentBlock("info");
429 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
430 $this->tpl->parseCurrentBlock();
431 }
432
433 $table = new ilTrMatrixTableGUI(
434 $this,
435 "showUserObjectMatrix",
436 $this->getRefId()
437 );
438 $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
439 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
440 }

References $info, 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 282 of file class.ilLPListOfObjectsGUI.php.

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

References $info, $user_id, 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: