ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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.

References __initDetails().

29  {
30  parent::__construct($a_mode,$a_ref_id);
31 
32  // Set item id for details
33  $this->__initDetails((int) $_REQUEST['details_id']);
34  }
+ Here is the call graph for this function:

Member Function Documentation

◆ __initDetails()

ilLPListOfObjectsGUI::__initDetails (   $a_details_id)

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

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

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

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

◆ __listObjects()

ilLPListOfObjectsGUI::__listObjects ( )

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

References $ilUser, and ilLearningProgressBaseGUI\__getLegendHTML().

Referenced by show().

301  {
302  global $ilUser,$ilObjDataCache;
303 
304  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_list_objects.html','Services/Tracking');
305 
306  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
307  $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
308 
309  $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
310  $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
311  }
$ilUser
Definition: imgupload.php:18
+ 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 202 of file class.ilLPListOfObjectsGUI.php.

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

Referenced by details().

203  {
204  if($this->isAnonymized())
205  {
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->get("DEFAULT", false, false, false, false, false, false);
222  exit();
223  }
224  */
225  }
Learning progress table: One object, rows: users, columns: properties Example: A course, rows: members, columns: name, status, mark, ...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ details()

ilLPListOfObjectsGUI::details ( )

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

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

Referenced by show().

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

◆ editUser()

ilLPListOfObjectsGUI::editUser ( )

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

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

127  {
128  global $ilObjDataCache, $rbacsystem;
129 
130  $parent_id = $this->details_id;
131  if(isset($_GET["userdetails_id"]))
132  {
133  $this->__initDetails((int)$_GET["userdetails_id"]);
134  $sub_id = $this->details_id;
135  $cancel = "userdetails";
136  }
137  else
138  {
139  $sub_id = NULL;
140  $cancel = "details";
141  }
142 
143  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
144  if(!ilLearningProgressAccess::checkPermission('edit_learning_progress', $this->details_id))
145  {
146  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
147  $this->ctrl->returnToParent($this);
148  }
149 
150  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
151  $info = new ilInfoScreenGUI($this);
152  $info->setFormAction($this->ctrl->getFormAction($this));
153  $this->__showObjectDetails($info, $this->details_obj_id);
154  $this->__appendUserInfo($info, (int)$_GET['user_id']);
155  // $this->__appendLPDetails($info,$this->details_obj_id,(int)$_GET['user_id']);
156 
157  $this->tpl->setVariable("ADM_CONTENT", $this->__showEditUser((int)$_GET['user_id'], $parent_id, $cancel, $sub_id)."<br />".$info->getHTML());
158  }
__showEditUser($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
Class ilInfoScreenGUI.
$_GET["client_id"]
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
__showObjectDetails(&$info, $item_id=0, $add_section=true)
show details about current object.
$info
Definition: example_052.php:80
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ executeCommand()

ilLPListOfObjectsGUI::executeCommand ( )

execute command

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

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

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

◆ show()

ilLPListOfObjectsGUI::show ( )

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

References __initDetails(), __listObjects(), details(), ilLearningProgressBaseGUI\getMode(), and ilLearningProgressBaseGUI\getRefId().

284  {
285  // Clear table offset
286  $this->ctrl->saveParameter($this,'offset',0);
287 
288  // Show only detail of current repository item if called from repository
289  switch($this->getMode())
290  {
291  case self::LP_CONTEXT_REPOSITORY:
292  $this->__initDetails($this->getRefId());
293  $this->details();
294  return true;
295  }
296 
297  $this->__listObjects();
298  }
+ Here is the call graph for this function:

◆ showObjectSummary()

ilLPListOfObjectsGUI::showObjectSummary ( )

Show object-based summarized tracking data.

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

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

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

◆ showUserObjectMatrix()

ilLPListOfObjectsGUI::showUserObjectMatrix ( )

Show object user matrix.

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

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

370  {
371  global $tpl;
372 
373  if($this->isAnonymized())
374  {
375  ilUtil::sendFailure($this->lng->txt('permission_denied'));
376  return;
377  }
378 
379 
380  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
381 
382  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
383  $info = new ilInfoScreenGUI($this);
384  $info->setFormAction($this->ctrl->getFormAction($this));
385  if($this->__showObjectDetails($info, $this->details_obj_id))
386  {
387  $this->tpl->setCurrentBlock("info");
388  $this->tpl->setVariable("INFO_TABLE",$info->getHTML());
389  $this->tpl->parseCurrentBlock();
390  }
391 
392  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrMatrixTableGUI.php");
393  $table = new ilTrMatrixTableGUI($this, "showUserObjectMatrix", $this->getRefId());
394  $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
395  $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
396  }
Class ilInfoScreenGUI.
__showObjectDetails(&$info, $item_id=0, $add_section=true)
show details about current object.
$info
Definition: example_052.php:80
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ updateUser()

ilLPListOfObjectsGUI::updateUser ( )

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

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

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

◆ userDetails()

ilLPListOfObjectsGUI::userDetails ( )

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

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

228  {
229  global $ilObjDataCache, $ilToolbar;
230 
231  if($this->isAnonymized())
232  {
233  ilUtil::sendFailure($this->lng->txt('permission_denied'));
234  return;
235  }
236 
237  $this->ctrl->setParameter($this, "details_id", $this->details_id);
238 
239  $print_view = (bool)$_GET['prt'];
240  if(!$print_view)
241  {
242  // Show back button
243  $ilToolbar->addButton($this->lng->txt('trac_view_list'), $this->ctrl->getLinkTarget($this,'details'));
244  }
245 
246  $user_id = (int)$_GET["user_id"];
247  $this->ctrl->setParameter($this, "user_id", $user_id);
248 
249  /*
250  if(!$print_view)
251  {
252  $this->ctrl->setParameter($this, 'prt', 1);
253  $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'userDetails'), '_blank');
254  $this->ctrl->setParameter($this, 'prt', '');
255  };
256  */
257 
258  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
259 
260  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
261  $info = new ilInfoScreenGUI($this);
262  $info->setFormAction($this->ctrl->getFormAction($this));
263  $this->__showObjectDetails($info, $this->details_obj_id);
264  $this->__appendUserInfo($info, $user_id);
265  // $this->__appendLPDetails($info,$this->details_obj_id,$user_id);
266  $this->tpl->setVariable("INFO_TABLE",$info->getHTML());
267 
268  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrUserObjectsPropsTableGUI.php");
269  $table = new ilTrUserObjectsPropsTableGUI($this, "userDetails", $user_id,
270  $this->details_obj_id, $this->details_id, $print_view);
271  $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
272  $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
273 
274  /*
275  if($print_view)
276  {
277  echo $this->tpl->get("DEFAULT", false, false, false, false, false, false);
278  exit();
279  }
280  */
281  }
Class ilInfoScreenGUI.
$_GET["client_id"]
__showObjectDetails(&$info, $item_id=0, $add_section=true)
show details about current object.
$info
Definition: example_052.php:80
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Build table list for objects of given user.
+ 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: