ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
 activateStatistics ($a_act=true)
 
 __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)
 Get status alt text. More...
 
__initTableGUI ()
 
 __showObjectDetails (&$info, $item_id=0)
 show details about current object. More...
 
 __appendUserInfo (&$info, $a_user)
 
 __appendLPDetails (&$info, $item_id, $user_id)
 
 __readStatus ($a_obj_id, $user_id)
 
 __showButton ($a_link, $a_text, $a_target='')
 
 __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
 
 $statistics_activated = false
 
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_LM_STATISTICS = 4
 
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 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 286 of file class.ilLPListOfObjectsGUI.php.

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

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

287  {
288  global $ilObjDataCache;
289 
290  if(!$a_details_id)
291  {
292  $a_details_id = $this->getRefId();
293  }
294  if($a_details_id)
295  {
296  $_GET['details_id'] = $a_details_id;
297  $this->details_id = $a_details_id;
298  $this->details_obj_id = $ilObjDataCache->lookupObjId($this->details_id);
299  $this->details_type = $ilObjDataCache->lookupType($this->details_obj_id);
300 
301  include_once 'Services/Object/classes/class.ilObjectLP.php';
302  $olp = ilObjectLP::getInstance($this->details_obj_id);
303  $this->details_mode = $olp->getCurrentMode();
304  }
305  }
$_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 273 of file class.ilLPListOfObjectsGUI.php.

References $ilUser, and ilLearningProgressBaseGUI\__getLegendHTML().

Referenced by show().

274  {
275  global $ilUser,$ilObjDataCache;
276 
277  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_list_objects.html','Services/Tracking');
278 
279  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
280  $lp_table = new ilTrSummaryTableGUI($this, "", ROOT_FOLDER_ID);
281 
282  $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
283  $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
284  }
global $ilUser
Definition: imgupload.php:15
+ 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 181 of file class.ilLPListOfObjectsGUI.php.

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

Referenced by details().

182  {
183  if($this->isAnonymized())
184  {
185  ilUtil::sendFailure($this->lng->txt('permission_denied'));
186  return;
187  }
188 
189  $this->ctrl->setParameter($this, "details_id", $this->details_id);
190 
191  include_once "Services/Tracking/classes/repository_statistics/class.ilTrObjectUsersPropsTableGUI.php";
192  $gui = new ilTrObjectUsersPropsTableGUI($this, "details", $this->details_obj_id, $this->details_id, $a_print_view);
193 
194  $this->tpl->setVariable("LP_OBJECTS", $gui->getHTML());
195  $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
196 
197  if($a_print_view)
198  {
199  echo $this->tpl->get("DEFAULT", false, false, false, false, false, false);
200  exit();
201  }
202  }
exit
Definition: login.php:54
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 143 of file class.ilLPListOfObjectsGUI.php.

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

Referenced by show(), and updateUser().

144  {
145  global $ilToolbar;
146 
147  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
148 
149  // Show back button
150  if($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP or
151  $this->getMode() == self::LP_CONTEXT_ADMINISTRATION)
152  {
153  $print_view = false;
154  $this->__showButton($this->ctrl->getLinkTarget($this,'show'),$this->lng->txt('trac_view_list'));
155  }
156  else
157  {
158  $print_view = (bool)$_GET['prt'];
159  if(!$print_view)
160  {
161  $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
162  $this->ctrl->setParameter($this, 'prt', 1);
163  $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'details'), '_blank');
164  $this->ctrl->setParameter($this, 'prt', '');
165  }
166  }
167 
168  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
169  $info = new ilInfoScreenGUI($this);
170  $info->setFormAction($this->ctrl->getFormAction($this));
171  if($this->__showObjectDetails($info, $this->details_obj_id))
172  {
173  $this->tpl->setCurrentBlock("info");
174  $this->tpl->setVariable("INFO_TABLE",$info->getHTML());
175  $this->tpl->parseCurrentBlock();
176  }
177 
178  $this->__showUsersList($print_view);
179  }
Class ilInfoScreenGUI.
$_GET["client_id"]
__showButton($a_link, $a_text, $a_target='')
__showObjectDetails(&$info, $item_id=0)
show details about current object.
__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 116 of file class.ilLPListOfObjectsGUI.php.

References $_GET, $details_id, ilLearningProgressBaseGUI\__appendUserInfo(), __initDetails(), ilLearningProgressBaseGUI\__showEditUser(), and ilLearningProgressBaseGUI\__showObjectDetails().

117  {
118  global $ilObjDataCache;
119 
120  $parent_id = $this->details_id;
121  if(isset($_GET["userdetails_id"]))
122  {
123  $this->__initDetails((int)$_GET["userdetails_id"]);
124  $sub_id = $this->details_id;
125  $cancel = "userdetails";
126  }
127  else
128  {
129  $sub_id = NULL;
130  $cancel = "details";
131  }
132 
133  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
134  $info = new ilInfoScreenGUI($this);
135  $info->setFormAction($this->ctrl->getFormAction($this));
136  $this->__showObjectDetails($info, $this->details_obj_id);
137  $this->__appendUserInfo($info, (int)$_GET['user_id']);
138  // $this->__appendLPDetails($info,$this->details_obj_id,(int)$_GET['user_id']);
139 
140  $this->tpl->setVariable("ADM_CONTENT", $this->__showEditUser((int)$_GET['user_id'], $parent_id, $cancel, $sub_id)."<br />".$info->getHTML());
141  }
__showEditUser($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
Class ilInfoScreenGUI.
$_GET["client_id"]
__showObjectDetails(&$info, $item_id=0)
show details about current object.
+ Here is the call graph for this function:

◆ executeCommand()

& ilLPListOfObjectsGUI::executeCommand ( )

execute command

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

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

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  }
$_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, ...
Build table list for objects of given user.
global $ilUser
Definition: imgupload.php:15
+ 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.

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

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  }
global $ilUser
Definition: imgupload.php:15
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ show()

ilLPListOfObjectsGUI::show ( )

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

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

257  {
258  // Clear table offset
259  $this->ctrl->saveParameter($this,'offset',0);
260 
261  // Show only detail of current repository item if called from repository
262  switch($this->getMode())
263  {
264  case self::LP_CONTEXT_REPOSITORY:
265  $this->__initDetails($this->getRefId());
266  $this->details();
267  return true;
268  }
269 
270  $this->__listObjects();
271  }
+ Here is the call graph for this function:

◆ showObjectSummary()

ilLPListOfObjectsGUI::showObjectSummary ( )

Show object-based summarized tracking data.

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

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

311  {
312  global $tpl, $ilToolbar;
313 
314  $print_view = (bool)$_GET['prt'];
315  if(!$print_view)
316  {
317  $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
318  $this->ctrl->setParameter($this, 'prt', 1);
319  $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'showObjectSummary'), '_blank');
320  $this->ctrl->setParameter($this, 'prt', '');
321  }
322 
323  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrSummaryTableGUI.php");
324  $table = new ilTrSummaryTableGUI($this, "showObjectSummary", $this->getRefId(), $print_view);
325  if(!$print_view)
326  {
327  $tpl->setContent($table->getHTML());
328  }
329  else
330  {
331  $tpl->setVariable("ADM_CONTENT", $table->getHTML());
332  echo $tpl->get("DEFAULT", false, false, false, false, false, false);
333  exit();
334  }
335  }
exit
Definition: login.php:54
$_GET["client_id"]
+ Here is the call graph for this function:

◆ showUserObjectMatrix()

ilLPListOfObjectsGUI::showUserObjectMatrix ( )

Show object user matrix.

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

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

341  {
342  global $tpl;
343 
344  if($this->isAnonymized())
345  {
346  ilUtil::sendFailure($this->lng->txt('permission_denied'));
347  return;
348  }
349 
350 
351  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
352 
353  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
354  $info = new ilInfoScreenGUI($this);
355  $info->setFormAction($this->ctrl->getFormAction($this));
356  if($this->__showObjectDetails($info, $this->details_obj_id))
357  {
358  $this->tpl->setCurrentBlock("info");
359  $this->tpl->setVariable("INFO_TABLE",$info->getHTML());
360  $this->tpl->parseCurrentBlock();
361  }
362 
363  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrMatrixTableGUI.php");
364  $table = new ilTrMatrixTableGUI($this, "showUserObjectMatrix", $this->getRefId());
365  $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
366  $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
367  }
Class ilInfoScreenGUI.
__showObjectDetails(&$info, $item_id=0)
show details about current object.
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 94 of file class.ilLPListOfObjectsGUI.php.

References $_GET, $_REQUEST, $details_id, __initDetails(), ilLearningProgressBaseGUI\__updateUser(), details(), ilUtil\sendSuccess(), and userDetails().

95  {
96  if(isset($_GET["userdetails_id"]))
97  {
98  $parent = $this->details_id;
99  $this->__initDetails((int)$_GET["userdetails_id"]);
100  }
101 
102  $this->__updateUser($_REQUEST['user_id'], $this->details_obj_id);
103  ilUtil::sendSuccess($this->lng->txt('trac_update_edit_user'));
104 
105  if(!isset($_GET["userdetails_id"]))
106  {
107  $this->details();
108  }
109  else
110  {
111  $this->__initDetails($parent);
112  $this->userDetails();
113  }
114  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_GET["client_id"]
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ userDetails()

ilLPListOfObjectsGUI::userDetails ( )

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

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

Referenced by updateUser().

205  {
206  global $ilObjDataCache, $ilToolbar;
207 
208  if($this->isAnonymized())
209  {
210  ilUtil::sendFailure($this->lng->txt('permission_denied'));
211  return;
212  }
213 
214  $this->ctrl->setParameter($this, "details_id", $this->details_id);
215 
216  $print_view = (bool)$_GET['prt'];
217  if(!$print_view)
218  {
219  // Show back button
220  $ilToolbar->addButton($this->lng->txt('trac_view_list'), $this->ctrl->getLinkTarget($this,'details'));
221  }
222 
223  $user_id = (int)$_GET["user_id"];
224  $this->ctrl->setParameter($this, "user_id", $user_id);
225 
226  if(!$print_view)
227  {
228  $this->ctrl->setParameter($this, 'prt', 1);
229  $ilToolbar->addButton($this->lng->txt('print_view'),$this->ctrl->getLinkTarget($this,'userDetails'), '_blank');
230  $this->ctrl->setParameter($this, 'prt', '');
231  };
232 
233  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_loo.html','Services/Tracking');
234 
235  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
236  $info = new ilInfoScreenGUI($this);
237  $info->setFormAction($this->ctrl->getFormAction($this));
238  $this->__showObjectDetails($info, $this->details_obj_id);
239  $this->__appendUserInfo($info, $user_id);
240  // $this->__appendLPDetails($info,$this->details_obj_id,$user_id);
241  $this->tpl->setVariable("INFO_TABLE",$info->getHTML());
242 
243  include_once("./Services/Tracking/classes/repository_statistics/class.ilTrUserObjectsPropsTableGUI.php");
244  $table = new ilTrUserObjectsPropsTableGUI($this, "userDetails", $user_id,
245  $this->details_obj_id, $this->details_id, $print_view);
246  $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
247  $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
248 
249  if($print_view)
250  {
251  echo $this->tpl->get("DEFAULT", false, false, false, false, false, false);
252  exit();
253  }
254  }
exit
Definition: login.php:54
Class ilInfoScreenGUI.
$_GET["client_id"]
__showObjectDetails(&$info, $item_id=0)
show details about current object.
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:
+ Here is the caller 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: