ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLPListOfObjectsGUI Class Reference
+ Inheritance diagram for ilLPListOfObjectsGUI:
+ Collaboration diagram for ilLPListOfObjectsGUI:

Public Member Functions

 ilLPListOfObjectsGUI ($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
 ilLearningProgressBaseGUI ($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="")
 
 _getImagePathForStatus ($a_status)
 Get image path for status. More...
 
 _getStatusText ($a_status, $a_lng=null)
 Get status alt text. More...
 
__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)
 
 __readStatus ($a_obj_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 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
 

Detailed Description

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

Member Function Documentation

◆ __initDetails()

ilLPListOfObjectsGUI::__initDetails (   $a_details_id)

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

316 {
317 global $ilObjDataCache;
318
319 if(!$a_details_id)
320 {
321 $a_details_id = $this->getRefId();
322 }
323 if($a_details_id)
324 {
325 $_GET['details_id'] = $a_details_id;
326 $this->details_id = $a_details_id;
327 $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
328 $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
329
330 include_once 'Services/Object/classes/class.ilObjectLP.php';
331 $olp = ilObjectLP::getInstance($this->details_obj_id);
332 $this->details_mode = $olp->getCurrentMode();
333 }
334 }
$_GET["client_id"]
static getInstance($a_obj_id)

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

Referenced by editUser(), ilLPListOfObjectsGUI(), 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 302 of file class.ilLPListOfObjectsGUI.php.

303 {
304 global $ilUser,$ilObjDataCache;
305
306 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_list_objects.html','Services/Tracking');
307
308 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
309 $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
310
311 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
312 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
313 }
global $ilUser
Definition: imgupload.php:15

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

205 {
206 if($this->isAnonymized())
207 {
208 ilUtil::sendFailure($this->lng->txt('permission_denied'));
209 return;
210 }
211
212 $this->ctrl->setParameter($this, "details_id", $this->details_id);
213
214 include_once "Services/Tracking/classes/repository_statistics/class.ilTrObjectUsersPropsTableGUI.php";
215 $gui = new ilTrObjectUsersPropsTableGUI($this, "details", $this->details_obj_id, $this->details_id, $a_print_view);
216
217 $this->tpl->setVariable("LP_OBJECTS", $gui->getHTML());
218 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
219
220 /*
221 if($a_print_view)
222 {
223 echo $this->tpl->get("DEFAULT", false, false, false, false, false, false);
224 exit();
225 }
226 */
227 }
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 162 of file class.ilLPListOfObjectsGUI.php.

163 {
164 global $ilToolbar;
165
166 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
167
168 // Show back button
169 if($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or
170 $this->getMode() == self::LP_CONTEXT_ADMINISTRATION)
171 {
172 $print_view = false;
173
174 $ilToolbar->addButton($this->lng->txt('trac_view_list'),
175 $this->ctrl->getLinkTarget($this,'show'));
176 }
177 else
178 {
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 {
196 $this->tpl->setCurrentBlock("info");
197 $this->tpl->setVariable("INFO_TABLE",$info->getHTML());
198 $this->tpl->parseCurrentBlock();
199 }
200
201 $this->__showUsersList($print_view);
202 }
Class ilInfoScreenGUI.
__showUsersList($a_print_view=false)
__showObjectDetails(&$info, $item_id=0, $add_section=true)
show details about current object.
$info
Definition: example_052.php:80

References $info, 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 $ilObjDataCache, $rbacsystem;
131
132 $parent_id = $this->details_id;
133 if(isset($_GET["userdetails_id"]))
134 {
135 $this->__initDetails((int)$_GET["userdetails_id"]);
136 $sub_id = $this->details_id;
137 $cancel = "userdetails";
138 }
139 else
140 {
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 {
148 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
149 $this->ctrl->returnToParent($this);
150 }
151
152 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
153 $info = new ilInfoScreenGUI($this);
154 $info->setFormAction($this->ctrl->getFormAction($this));
155 $this->__showObjectDetails($info, $this->details_obj_id);
156 $this->__appendUserInfo($info, (int)$_GET['user_id']);
157 // $this->__appendLPDetails($info,$this->details_obj_id,(int)$_GET['user_id']);
158
159 $this->tpl->setVariable("ADM_CONTENT", $this->__showEditUser((int)$_GET['user_id'], $parent_id, $cancel, $sub_id)."<br />".$info->getHTML());
160 }
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, $info, 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 40 of file class.ilLPListOfObjectsGUI.php.

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

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

+ Here is the call graph for this function:

◆ ilLPListOfObjectsGUI()

ilLPListOfObjectsGUI::ilLPListOfObjectsGUI (   $a_mode,
  $a_ref_id 
)

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

29 {
30 global $ilUser,$ilObjDataCache;
31
32 parent::ilLearningProgressBaseGUI($a_mode,$a_ref_id);
33
34 // Set item id for details
35 $this->__initDetails((int) $_REQUEST['details_id']);
36 }
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_REQUEST, $ilUser, and __initDetails().

+ Here is the call graph for this function:

◆ show()

ilLPListOfObjectsGUI::show ( )

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

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

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

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

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

+ Here is the call graph for this function:

◆ showUserObjectMatrix()

ilLPListOfObjectsGUI::showUserObjectMatrix ( )

Show object user matrix.

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

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

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

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

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

+ Here is the call graph for this function:

◆ userDetails()

ilLPListOfObjectsGUI::userDetails ( )

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

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

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