ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
 

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 }

References __initDetails().

+ Here is the call graph for this function:

Member Function Documentation

◆ __initDetails()

ilLPListOfObjectsGUI::__initDetails (   $a_details_id)

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

308 {
309 global $ilObjDataCache;
310
311 if (!$a_details_id) {
312 $a_details_id = $this->getRefId();
313 }
314 if ($a_details_id) {
315 $_GET['details_id'] = $a_details_id;
316 $this->details_id = $a_details_id;
317 $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
318 $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
319
320 include_once 'Services/Object/classes/class.ilObjectLP.php';
321 $olp = ilObjectLP::getInstance($this->details_obj_id);
322 $this->details_mode = $olp->getCurrentMode();
323 }
324 }
$_GET["client_id"]
static getInstance($a_obj_id)

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

295 {
296 global $ilUser,$ilObjDataCache;
297
298 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_list_objects.html', 'Services/Tracking');
299
300 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
301 $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
302
303 $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
304 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
305 }
$ilUser
Definition: imgupload.php:18

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

195 {
196 if ($this->isAnonymized()) {
197 ilUtil::sendFailure($this->lng->txt('permission_denied'));
198 return;
199 }
200
201 $this->ctrl->setParameter($this, "details_id", $this->details_id);
202
203 include_once "Services/Tracking/classes/repository_statistics/class.ilTrObjectUsersPropsTableGUI.php";
204 $gui = new ilTrObjectUsersPropsTableGUI($this, "details", $this->details_obj_id, $this->details_id, $a_print_view);
205
206 $this->tpl->setVariable("LP_OBJECTS", $gui->getHTML());
207 $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
208
209 /*
210 if($a_print_view)
211 {
212 echo $this->tpl->get("DEFAULT", false, false, false, false, false, false);
213 exit();
214 }
215 */
216 }
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 154 of file class.ilLPListOfObjectsGUI.php.

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

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

125 {
126 global $ilObjDataCache, $rbacsystem;
127
128 $parent_id = $this->details_id;
129 if (isset($_GET["userdetails_id"])) {
130 $this->__initDetails((int) $_GET["userdetails_id"]);
131 $sub_id = $this->details_id;
132 $cancel = "userdetails";
133 } else {
134 $sub_id = null;
135 $cancel = "details";
136 }
137
138 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
139 if (!ilLearningProgressAccess::checkPermission('edit_learning_progress', $this->details_id)) {
140 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
141 $this->ctrl->returnToParent($this);
142 }
143
144 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
145 $info = new ilInfoScreenGUI($this);
146 $info->setFormAction($this->ctrl->getFormAction($this));
147 $this->__showObjectDetails($info, $this->details_obj_id);
148 $this->__appendUserInfo($info, (int) $_GET['user_id']);
149 // $this->__appendLPDetails($info,$this->details_obj_id,(int)$_GET['user_id']);
150
151 $this->tpl->setVariable("ADM_CONTENT", $this->__showEditUser((int) $_GET['user_id'], $parent_id, $cancel, $sub_id) . "<br />" . $info->getHTML());
152 }
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 38 of file class.ilLPListOfObjectsGUI.php.

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

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

+ Here is the call graph for this function:

◆ show()

ilLPListOfObjectsGUI::show ( )

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

279 {
280 // Clear table offset
281 $this->ctrl->saveParameter($this, 'offset', 0);
282
283 // Show only detail of current repository item if called from repository
284 switch ($this->getMode()) {
286 $this->__initDetails($this->getRefId());
287 $this->details();
288 return true;
289 }
290
291 $this->__listObjects();
292 }

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

330 {
331 global $tpl, $ilToolbar;
332
333 /*
334 $print_view = (bool)$_GET['prt'];
335 if(!$print_view)
336 {
337 $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
338 $this->ctrl->setParameter($this, 'prt', 1);
339 $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'showObjectSummary'), '_blank');
340 $this->ctrl->setParameter($this, 'prt', '');
341 }
342 */
343
344 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
345 $table = new ilTrSummaryTableGUI($this, "showObjectSummary", $this->getRefId(), $print_view);
346 if (!$print_view) {
347 $tpl->setContent($table->getHTML());
348 } else {
349 $tpl->setVariable("ADM_CONTENT", $table->getHTML());
350 echo $tpl->get("DEFAULT", false, false, false, false, false, false);
351 exit();
352 }
353 }
if(empty($password)) $table
Definition: pwgen.php:24

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

+ Here is the call graph for this function:

◆ showUserObjectMatrix()

ilLPListOfObjectsGUI::showUserObjectMatrix ( )

Show object user matrix.

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

359 {
360 global $tpl;
361
362 if ($this->isAnonymized()) {
363 ilUtil::sendFailure($this->lng->txt('permission_denied'));
364 return;
365 }
366
367
368 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_loo.html', 'Services/Tracking');
369
370 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
371 $info = new ilInfoScreenGUI($this);
372 $info->setFormAction($this->ctrl->getFormAction($this));
373 if ($this->__showObjectDetails($info, $this->details_obj_id)) {
374 $this->tpl->setCurrentBlock("info");
375 $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
376 $this->tpl->parseCurrentBlock();
377 }
378
379 include_once("./Services/Tracking/classes/repository_statistics/class.ilTrMatrixTableGUI.php");
380 $table = new ilTrMatrixTableGUI($this, "showUserObjectMatrix", $this->getRefId());
381 $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
382 $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
383 }

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

96 {
97 global $rbacsystem;
98
99 if (isset($_GET["userdetails_id"])) {
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 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
107 $this->ctrl->returnToParent($this);
108 }
109
110 $this->__updateUser($_REQUEST['user_id'], $this->details_obj_id);
111 ilUtil::sendSuccess($this->lng->txt('trac_update_edit_user'), true);
112
113 $this->ctrl->setParameter($this, "details_id", $this->details_id); // #15043
114
115 // #14993
116 if (!isset($_GET["userdetails_id"])) {
117 $this->ctrl->redirect($this, "details");
118 } else {
119 $this->ctrl->setParameter($this, "userdetails_id", (int) $_GET["userdetails_id"]);
120 $this->ctrl->redirect($this, "userdetails");
121 }
122 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

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

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

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