ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLPListOfObjectsGUI Class Reference
+ Inheritance diagram for ilLPListOfObjectsGUI:
+ Collaboration diagram for ilLPListOfObjectsGUI:

Public Member Functions

 __construct ($a_mode, $a_ref_id)
 
 executeCommand ()
 execute command More...
 
 updateUser ()
 
 editUser ()
 
 details ()
 
 __showUsersList ($a_print_view=false)
 
 userDetails ()
 
 show ()
 
 __listObjects ()
 
 __initDetails ($a_details_id)
 
 showObjectSummary ()
 Show object-based summarized tracking data. More...
 
 showUserObjectMatrix ()
 Show object user matrix. More...
 
- Public Member Functions inherited from ilLearningProgressBaseGUI
 __construct ($a_mode, $a_ref_id=0, $a_usr_id=0)
 
 isAnonymized ()
 
 getMode ()
 
 getRefId ()
 
 getObjId ()
 
 getUserId ()
 
 __getDefaultCommand ()
 
 __setSubTabs ($a_active)
 
 __buildFooter ()
 
 __buildHeader ()
 
 __insertPath (&$a_tpl, $a_ref_id)
 insert path More...
 
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
__initTableGUI ()
 
 __showObjectDetails (&$info, $item_id=0, $add_section=true)
 show details about current object. More...
 
 __appendUserInfo (&$info, $a_user)
 
 __appendLPDetails (&$info, $item_id, $user_id)
 
 __sort ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. More...
 
 __getPercent ($max, $reached)
 
 __readItemStatusInfo ($a_items)
 
 __getLegendHTML ()
 
 __showEditUser ($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
 
 __updateUser ($user_id, $obj_id)
 

Data Fields

 $details_id = 0
 
 $details_type = ''
 
 $details_mode = 0
 
- Data Fields inherited from ilLearningProgressBaseGUI
 $tpl = null
 
 $ctrl = null
 
 $lng = null
 
 $ref_id = 0
 
 $mode = 0
 
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
 
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 _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
static _getImagePathForStatus ($a_status)
 Get image path for status. More...
 
static _getStatusText ($a_status, $a_lng=null)
 Get status alt text. More...
 
static __readStatus ($a_obj_id, $user_id)
 
static isObjectOffline ($a_obj_id, $a_type=null)
 
- Protected Member Functions inherited from ilLearningProgressBaseGUI
 initEditUserForm ($a_user_id, $a_obj_id, $a_cancel=null)
 
- Protected Attributes inherited from ilLearningProgressBaseGUI
 $anonymized
 
 $logger
 
 $tabs_gui
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilLPListOfObjectsGUI::__construct (   $a_mode,
  $a_ref_id 
)

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

29 {
30 parent::__construct($a_mode, $a_ref_id);
31
32 // Set item id for details
33 $this->__initDetails((int) $_REQUEST['details_id']);
34 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ __initDetails()

ilLPListOfObjectsGUI::__initDetails (   $a_details_id)

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

323 {
324 global $DIC;
325
326 $ilObjDataCache = $DIC['ilObjDataCache'];
327
328 if (!$a_details_id) {
329 $a_details_id = $this->getRefId();
330 }
331 if ($a_details_id) {
332 $_GET['details_id'] = $a_details_id;
333 $this->details_id = $a_details_id;
334 $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
335 $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
336
337 include_once 'Services/Object/classes/class.ilObjectLP.php';
338 $olp = ilObjectLP::getInstance($this->details_obj_id);
339 $this->details_mode = $olp->getCurrentMode();
340 }
341 }
$_GET["client_id"]
static getInstance($a_obj_id)
$DIC
Definition: xapitoken.php:46

References $_GET, $DIC, ilObjectLP\getInstance(), and ilLearningProgressBaseGUI\getRefId().

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

307 {
308 global $DIC;
309
310 $ilUser = $DIC['ilUser'];
311 $ilObjDataCache = $DIC['ilObjDataCache'];
312
313 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_list_objects.html', 'Services/Tracking');
314
315 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
316 $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
317
318 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
319 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
320 }
$ilUser
Definition: imgupload.php:18

References $DIC, $ilUser, and ilLearningProgressBaseGUI\__getLegendHTML().

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

204 {
205 if ($this->isAnonymized()) {
206 ilUtil::sendFailure($this->lng->txt('permission_denied'));
207 return;
208 }
209
210 $this->ctrl->setParameter($this, "details_id", $this->details_id);
211
212 include_once "Services/Tracking/classes/repository_statistics/class.ilTrObjectUsersPropsTableGUI.php";
213 $gui = new ilTrObjectUsersPropsTableGUI($this, "details", $this->details_obj_id, $this->details_id, $a_print_view);
214
215 $this->tpl->setVariable("LP_OBJECTS", $gui->getHTML());
216 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
217
218 /*
219 if($a_print_view)
220 {
221 echo $this->tpl->getSpecial("DEFAULT", false, false, false, false, false, false);
222 exit();
223 }
224 */
225 }
Learning progress table: One object, rows: users, columns: properties Example: A course,...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\isAnonymized(), and ilUtil\sendFailure().

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

162 {
163 global $DIC;
164
165 $ilToolbar = $DIC['ilToolbar'];
166
167 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_loo.html', 'Services/Tracking');
168
169 // Show back button
170 if ($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or
171 $this->getMode() == self::LP_CONTEXT_ADMINISTRATION) {
172 $print_view = false;
173
174 $ilToolbar->addButton(
175 $this->lng->txt('trac_view_list'),
176 $this->ctrl->getLinkTarget($this, 'show')
177 );
178 } else {
179 /*
180 $print_view = (bool)$_GET['prt'];
181 if(!$print_view)
182 {
183 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
184 $this->ctrl->setParameter($this, 'prt', 1);
185 $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'details'), '_blank');
186 $this->ctrl->setParameter($this, 'prt', '');
187 }
188 */
189 }
190
191 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
192 $info = new ilInfoScreenGUI($this);
193 $info->setFormAction($this->ctrl->getFormAction($this));
194 if ($this->__showObjectDetails($info, $this->details_obj_id)) {
195 $this->tpl->setCurrentBlock("info");
196 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
197 $this->tpl->parseCurrentBlock();
198 }
199
200 $this->__showUsersList($print_view);
201 }
Class ilInfoScreenGUI.
__showUsersList($a_print_view=false)
__showObjectDetails(&$info, $item_id=0, $add_section=true)
show details about current object.

References $DIC, ilLearningProgressBaseGUI\__showObjectDetails(), __showUsersList(), and ilLearningProgressBaseGUI\getMode().

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

129 {
130 global $DIC;
131
132 $ilObjDataCache = $DIC['ilObjDataCache'];
133 $rbacsystem = $DIC['rbacsystem'];
134
135 $parent_id = $this->details_id;
136 if (isset($_GET["userdetails_id"])) {
137 $this->__initDetails((int) $_GET["userdetails_id"]);
138 $sub_id = $this->details_id;
139 $cancel = "userdetails";
140 } else {
141 $sub_id = null;
142 $cancel = "details";
143 }
144
145 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
146 if (!ilLearningProgressAccess::checkPermission('edit_learning_progress', $this->details_id)) {
147 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
148 $this->ctrl->returnToParent($this);
149 }
150
151 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
152 $info = new ilInfoScreenGUI($this);
153 $info->setFormAction($this->ctrl->getFormAction($this));
154 $this->__showObjectDetails($info, $this->details_obj_id);
155 $this->__appendUserInfo($info, (int) $_GET['user_id']);
156 // $this->__appendLPDetails($info,$this->details_obj_id,(int)$_GET['user_id']);
157
158 $this->tpl->setVariable("ADM_CONTENT", $this->__showEditUser((int) $_GET['user_id'], $parent_id, $cancel, $sub_id) . "<br />" . $info->getHTML());
159 }
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
__showEditUser($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)

References $_GET, $details_id, $DIC, ilLearningProgressBaseGUI\__appendUserInfo(), __initDetails(), ilLearningProgressBaseGUI\__showEditUser(), ilLearningProgressBaseGUI\__showObjectDetails(), ilLearningProgressAccess\checkPermission(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ executeCommand()

ilLPListOfObjectsGUI::executeCommand ( )

execute command

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

39 {
40 global $DIC;
41
42 $ilUser = $DIC['ilUser'];
43
44 $this->ctrl->setReturn($this, "");
45
46 switch ($this->ctrl->getNextClass()) {
47 case 'iltruserobjectspropstablegui':
48 $user_id = (int) $_GET["user_id"];
49 $this->ctrl->setParameter($this, "user_id", $user_id);
50
51 $this->ctrl->setParameter($this, "details_id", $this->details_id);
52
53 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrUserObjectsPropsTableGUI.php");
54 $table_gui = new ilTrUserObjectsPropsTableGUI(
55 $this,
56 "userDetails",
57 $user_id,
58 $this->details_obj_id,
59 $this->details_id
60 );
61 $this->ctrl->forwardCommand($table_gui);
62 break;
63
64 case 'iltrsummarytablegui':
65 $cmd = "showObjectSummary";
66 if (!$this->details_id) {
67 $this->details_id = ROOT_FOLDER_ID;
68 $cmd = "show";
69 }
70 include_once './Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php';
71 $table_gui = new ilTrSummaryTableGUI($this, $cmd, $this->details_id);
72 $this->ctrl->forwardCommand($table_gui);
73 break;
74
75 case 'iltrmatrixtablegui':
76 include_once './Services/Tracking/classes/repository_statistics/class.ilTrMatrixTableGUI.php';
77 $table_gui = new ilTrMatrixTableGUI($this, "showUserObjectMatrix", $this->details_id);
78 $this->ctrl->forwardCommand($table_gui);
79 break;
80
81 case 'iltrobjectuserspropstablegui':
82 $this->ctrl->setParameter($this, "details_id", $this->details_id);
83
84 include_once './Services/Tracking/classes/repository_statistics/class.ilTrObjectUsersPropsTableGUI.php';
85 $table_gui = new ilTrObjectUsersPropsTableGUI($this, "details", $this->details_obj_id, $this->details_id);
86 $this->ctrl->forwardCommand($table_gui);
87 break;
88
89 default:
90 $cmd = $this->__getDefaultCommand();
91 $this->$cmd();
92 }
93
94 return true;
95 }
Build table list for objects of given user.

References $_GET, $DIC, $ilUser, and ilLearningProgressBaseGUI\__getDefaultCommand().

+ Here is the call graph for this function:

◆ show()

ilLPListOfObjectsGUI::show ( )

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

291 {
292 // Clear table offset
293 $this->ctrl->saveParameter($this, 'offset', 0);
294
295 // Show only detail of current repository item if called from repository
296 switch ($this->getMode()) {
298 $this->__initDetails($this->getRefId());
299 $this->details();
300 return true;
301 }
302
303 $this->__listObjects();
304 }

References __initDetails(), __listObjects(), 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 346 of file class.ilLPListOfObjectsGUI.php.

347 {
348 global $DIC;
349
350 $tpl = $DIC['tpl'];
351 $ilToolbar = $DIC['ilToolbar'];
352
353 /*
354 $print_view = (bool)$_GET['prt'];
355 if(!$print_view)
356 {
357 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
358 $this->ctrl->setParameter($this, 'prt', 1);
359 $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'showObjectSummary'), '_blank');
360 $this->ctrl->setParameter($this, 'prt', '');
361 }
362 */
363
364 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
365 $table = new ilTrSummaryTableGUI($this, "showObjectSummary", $this->getRefId(), $print_view);
366 if (!$print_view) {
367 $tpl->setContent($table->getHTML());
368 } else {
369 $tpl->setVariable("ADM_CONTENT", $table->getHTML());
370 echo $tpl->getSpecial("DEFAULT", false, false, false, false, false, false);
371 exit();
372 }
373 }
exit
Definition: login.php:29

References $DIC, ilLearningProgressBaseGUI\$tpl, exit, and ilLearningProgressBaseGUI\getRefId().

+ Here is the call graph for this function:

◆ showUserObjectMatrix()

ilLPListOfObjectsGUI::showUserObjectMatrix ( )

Show object user matrix.

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

379 {
380 global $DIC;
381
382 $tpl = $DIC['tpl'];
383
384 if ($this->isAnonymized()) {
385 ilUtil::sendFailure($this->lng->txt('permission_denied'));
386 return;
387 }
388
389
390 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_loo.html', 'Services/Tracking');
391
392 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
393 $info = new ilInfoScreenGUI($this);
394 $info->setFormAction($this->ctrl->getFormAction($this));
395 if ($this->__showObjectDetails($info, $this->details_obj_id)) {
396 $this->tpl->setCurrentBlock("info");
397 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
398 $this->tpl->parseCurrentBlock();
399 }
400
401 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrMatrixTableGUI.php");
402 $table = new ilTrMatrixTableGUI($this, "showUserObjectMatrix", $this->getRefId());
403 $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
404 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
405 }

References $DIC, ilLearningProgressBaseGUI\$tpl, ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__showObjectDetails(), ilLearningProgressBaseGUI\getRefId(), ilLearningProgressBaseGUI\isAnonymized(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ updateUser()

ilLPListOfObjectsGUI::updateUser ( )

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

98 {
99 global $DIC;
100
101 $rbacsystem = $DIC['rbacsystem'];
102
103 if (isset($_GET["userdetails_id"])) {
104 $parent = $this->details_id;
105 $this->__initDetails((int) $_GET["userdetails_id"]);
106 }
107
108 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
109 if (!ilLearningProgressAccess::checkPermission('edit_learning_progress', $this->details_id)) {
110 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
111 $this->ctrl->returnToParent($this);
112 }
113
114 $this->__updateUser($_REQUEST['user_id'], $this->details_obj_id);
115 ilUtil::sendSuccess($this->lng->txt('trac_update_edit_user'), true);
116
117 $this->ctrl->setParameter($this, "details_id", $this->details_id); // #15043
118
119 // #14993
120 if (!isset($_GET["userdetails_id"])) {
121 $this->ctrl->redirect($this, "details");
122 } else {
123 $this->ctrl->setParameter($this, "userdetails_id", (int) $_GET["userdetails_id"]);
124 $this->ctrl->redirect($this, "userdetails");
125 }
126 }

References $_GET, $details_id, $DIC, __initDetails(), ilLearningProgressBaseGUI\__updateUser(), ilLearningProgressAccess\checkPermission(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ userDetails()

ilLPListOfObjectsGUI::userDetails ( )

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

228 {
229 global $DIC;
230
231 $ilObjDataCache = $DIC['ilObjDataCache'];
232 $ilToolbar = $DIC['ilToolbar'];
233
234 if ($this->isAnonymized()) {
235 ilUtil::sendFailure($this->lng->txt('permission_denied'));
236 return;
237 }
238
239 $this->ctrl->setParameter($this, "details_id", $this->details_id);
240
241 $print_view = (bool) $_GET['prt'];
242 if (!$print_view) {
243 // Show back button
244 $ilToolbar->addButton($this->lng->txt('trac_view_list'), $this->ctrl->getLinkTarget($this, 'details'));
245 }
246
247 $user_id = (int) $_GET["user_id"];
248 $this->ctrl->setParameter($this, "user_id", $user_id);
249
250 /*
251 if(!$print_view)
252 {
253 $this->ctrl->setParameter($this, 'prt', 1);
254 $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'userDetails'), '_blank');
255 $this->ctrl->setParameter($this, 'prt', '');
256 };
257 */
258
259 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_loo.html', 'Services/Tracking');
260
261 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
262 $info = new ilInfoScreenGUI($this);
263 $info->setFormAction($this->ctrl->getFormAction($this));
264 $this->__showObjectDetails($info, $this->details_obj_id);
265 $this->__appendUserInfo($info, $user_id);
266 // $this->__appendLPDetails($info,$this->details_obj_id,$user_id);
267 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
268
269 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrUserObjectsPropsTableGUI.php");
270 $table = new ilTrUserObjectsPropsTableGUI(
271 $this,
272 "userDetails",
273 $user_id,
274 $this->details_obj_id,
275 $this->details_id,
276 $print_view
277 );
278 $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
279 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
280
281 /*
282 if($print_view)
283 {
284 echo $this->tpl->get("DEFAULT", false, false, false, false, false, false);
285 exit();
286 }
287 */
288 }

References $_GET, $DIC, ilLearningProgressBaseGUI\__appendUserInfo(), ilLearningProgressBaseGUI\__getLegendHTML(), ilLearningProgressBaseGUI\__showObjectDetails(), ilLearningProgressBaseGUI\isAnonymized(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

Field Documentation

◆ $details_id

ilLPListOfObjectsGUI::$details_id = 0

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

Referenced by editUser(), and updateUser().

◆ $details_mode

ilLPListOfObjectsGUI::$details_mode = 0

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

◆ $details_type

ilLPListOfObjectsGUI::$details_type = ''

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


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