ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilTrMatrixTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Tracking/classes/class.ilLPTableBaseGUI.php");
5 
15 {
16  protected $obj_ids = null;
17  protected $objective_ids = [];
18  protected $sco_ids = [];
19  protected $subitem_ids = [];
20  protected $in_course; // int
21  protected $in_group; // int
22  protected $privacy_fields = [];
23  protected $privacy_cols = [];
24  protected $has_multi; // bool
25 
29  public function __construct($a_parent_obj, $a_parent_cmd, $ref_id)
30  {
31  global $DIC;
32 
33  $ilCtrl = $DIC['ilCtrl'];
34  $lng = $DIC['lng'];
35  $tree = $DIC['tree'];
36  $ilUser = $DIC['ilUser'];
37  $rbacsystem = $DIC['rbacsystem'];
38 
39  $this->setId("trsmtx_" . $ref_id);
40  $this->ref_id = $ref_id;
41  $this->obj_id = ilObject::_lookupObjId($ref_id);
42  $this->type = ilObject::_lookupType($this->obj_id); // #17188
43 
44  $this->in_group = $tree->checkForParentType($this->ref_id, "grp");
45  if ($this->in_group) {
46  $this->in_group = ilObject::_lookupObjId($this->in_group);
47  } else {
48  $this->in_course = $tree->checkForParentType($this->ref_id, "crs");
49  if ($this->in_course) {
50  $this->in_course = ilObject::_lookupObjId($this->in_course);
51  }
52  }
53 
54  // has to be before constructor to work
55  $this->initFilter();
56 
57  parent::__construct($a_parent_obj, $a_parent_cmd);
58 
59  $this->parseTitle($this->obj_id, "trac_matrix");
60 
61  $this->setEnableHeader(true);
62  $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this)));
63  $this->setRowTemplate("tpl.user_object_matrix_row.html", "Services/Tracking");
64  $this->setDefaultOrderField("login");
65  $this->setDefaultOrderDirection("asc");
66  $this->setShowTemplates(true);
67 
68  // see ilObjCourseGUI::addMailToMemberButton()
69  include_once "Services/Mail/classes/class.ilMail.php";
70  $mail = new ilMail($ilUser->getId());
71  if ($rbacsystem->checkAccess("internal_mail", $mail->getMailObjectReferenceId())) {
72  $this->addMultiCommand("mailselectedusers", $this->lng->txt("send_mail"));
73  }
74 
75  $this->lng->loadLanguageModule('user');
76  $this->addMultiCommand(
77  'addToClipboard',
78  $this->lng->txt('clipboard_add_btn')
79  );
80  $this->addColumn("", "", 1);
81  $this->has_multi = true;
82 
83  $this->addColumn($this->lng->txt("login"), "login");
84 
85  $labels = $this->getSelectableColumns();
86  $selected = $this->getSelectedColumns();
87  foreach ($selected as $c) {
88  $title = $labels[$c]["txt"];
89 
90  if (isset($labels[$c]["no_permission"]) && (bool) $labels[$c]["no_permission"]) {
91  $title .= " (" . $lng->txt("status_no_permission") . ")";
92  }
93 
94  $tooltip = array();
95  if (isset($labels[$c]["icon"])) {
96  $alt = $lng->txt($labels[$c]["type"]);
97  $icon = '<img class="ilListItemIcon" src="' . $labels[$c]["icon"] . '" alt="' . $alt . '" />';
98  if (sizeof($selected) > 5) {
99  $tooltip[] = $title;
100  $title = $icon;
101  } else {
102  $title = $icon . ' ' . $title;
103  }
104  if ($labels[$c]["path"]) {
105  $tooltip[] = $labels[$c]["path"];
106  }
107  }
108 
109  if (isset($labels[$c]["id"])) {
110  $sort_id = $labels[$c]["id"];
111  } else {
112  // list cannot be sorted by udf fields (separate query)
113  $sort_id = (substr($c, 0, 4) == "udf_") ? "" : $c;
114  }
115 
116  $this->addColumn($title, $sort_id, "", false, "", implode(" - ", $tooltip));
117  }
118 
119  $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
120  }
121 
122  public function initFilter()
123  {
124  global $DIC;
125 
126  $lng = $DIC['lng'];
127 
128  $item = $this->addFilterItemByMetaType("name", ilTable2GUI::FILTER_TEXT, false, $lng->txt('login'));
129  $this->filter["name"] = $item->getValue();
130 
131  // #14949 - is called before constructor, so we have to do it ourselves
132  if (isset($_GET[$this->prefix . "_tpl"])) {
133  $this->filter["name"] = null;
134  $this->SetFilterValue($item, null);
135  }
136  }
137 
138  public function numericOrdering($a_field) : bool
139  {
140  if ($a_field === 'read_count') {
141  return true;
142  }
143  return false;
144  }
145 
146  public function getSelectableColumns()
147  {
148  global $DIC;
149 
150  $ilObjDataCache = $DIC['ilObjDataCache'];
151  $rbacsystem = $DIC['rbacsystem'];
152 
153  $user_cols = $this->getSelectableUserColumns($this->in_course, $this->in_group);
154 
155  if ($this->obj_ids === null) {
156  // we cannot use the selected columns because they are not ready yet
157  // so we use all available columns, should be ok anyways
158  $this->obj_ids = $this->getItems(array_keys($user_cols[0]), $user_cols[1]);
159  }
160  if (is_array($this->obj_ids)) {
161  $tmp_cols = array();
162  foreach ($this->obj_ids as $obj_id) {
163  if ($obj_id == $this->obj_id) {
164  $parent = array("txt" => $this->lng->txt("status"),
165  "default" => true);
166  } else {
167  $no_perm = false;
168 
169  $ref_id = $this->ref_ids[$obj_id];
170  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
171  if ($ref_id &&
172  !ilLearningProgressAccess::checkPermission('read_learning_progress', $ref_id)) {
173  $no_perm = true;
174  $this->privacy_cols[] = $obj_id;
175  }
176 
177  $title = $ilObjDataCache->lookupTitle($obj_id);
178  $type = $ilObjDataCache->lookupType($obj_id);
179  $icon = ilObject::_getIcon($obj_id, "tiny", $type);
180  if ($type == "sess") {
181  include_once "Modules/Session/classes/class.ilObjSession.php";
182  $sess = new ilObjSession($obj_id, false);
183  $title = $sess->getPresentationTitle();
184  }
185 
186  // #16453
187  $relpath = null;
188  include_once './Services/Tree/classes/class.ilPathGUI.php';
189  $path = new ilPathGUI();
190  $path = $path->getPath($this->ref_id, $ref_id);
191  if ($path) {
192  $relpath = $this->lng->txt('path') . ': ' . $path;
193  }
194 
195  $tmp_cols[strtolower($title) . "#~#obj_" . $obj_id] = array(
196  "txt" => $title,
197  "icon" => $icon,
198  "type" => $type,
199  "default" => true,
200  "no_permission" => $no_perm,
201  "path" => $relpath);
202  }
203  }
204  if (sizeof($this->objective_ids)) {
205  foreach ($this->objective_ids as $obj_id => $title) {
206  $tmp_cols[strtolower($title) . "#~#objtv_" . $obj_id] = array("txt" => $title, "default" => true);
207  }
208  }
209  if (sizeof($this->sco_ids)) {
210  foreach ($this->sco_ids as $obj_id => $title) {
211  $icon = ilUtil::getTypeIconPath("sco", $obj_id, "tiny");
212  $tmp_cols[strtolower($title) . "#~#objsco_" . $obj_id] = array("txt" => $title, "icon" => $icon, "default" => true);
213  }
214  }
215  if (sizeof($this->subitem_ids)) {
216  foreach ($this->subitem_ids as $obj_id => $title) {
217  include_once("./Services/Tracking/classes/class.ilTrQuery.php");
218  $icon = ilUtil::getTypeIconPath(ilTrQuery::getSubItemType($this->obj_id), $obj_id, "tiny");
219  $tmp_cols[strtolower($title) . "#~#objsub_" . $obj_id] = array("txt" => $title, "icon" => $icon, "default" => true);
220  }
221  }
222 
223  // alex, 5 Nov 2011: Do not sort SCORM items or "chapters"
224  if (!sizeof($this->sco_ids) && !sizeof($this->subitem_ids)) {
225  ksort($tmp_cols);
226  }
227  foreach ($tmp_cols as $id => $def) {
228  $id = explode('#~#', $id);
229  $columns[$id[1]] = $def;
230  }
231  unset($tmp_cols);
232 
233  if ($parent) {
234  $columns["obj_" . $this->obj_id] = $parent;
235  }
236  }
237 
238  unset($user_cols[0]["status"]);
239  unset($user_cols[0]["login"]);
240  foreach ($user_cols[0] as $col_id => $col_def) {
241  if (!isset($columns[$col_id])) {
242  // these are all additional fields, no default
243  $col_def["default"] = false;
244  $columns[$col_id] = $col_def;
245  }
246  }
247 
248  return $columns;
249  }
250 
251  public function getItems(array $a_user_fields, array $a_privary_fields = null)
252  {
253  // #17081
254  if ($this->restore_filter) {
255  $name = $this->restore_filter_values["name"];
256  $this->SetFilterValue($this->filters[0], $name);
257  $this->filter["name"] = $name;
258  }
259 
260  include_once("./Services/Tracking/classes/class.ilTrQuery.php");
261  $collection = ilTrQuery::getObjectIds($this->obj_id, $this->ref_id, true);
262  if ($collection["object_ids"]) {
263  // we need these for the timing warnings
264  $this->ref_ids = $collection["ref_ids"];
265 
266  // only if object is [part of] course/group
267  $check_agreement = false;
268  if ($this->in_course) {
269  // privacy (if course agreement is activated)
270  include_once "Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
271  $privacy = ilPrivacySettings::_getInstance();
272  if ($privacy->courseConfirmationRequired()) {
273  $check_agreement = $this->in_course;
274  }
275  } elseif ($this->in_group) {
276  // privacy (if group agreement is activated)
277  include_once "Services/PrivacySecurity/classes/class.ilPrivacySettings.php";
278  $privacy = ilPrivacySettings::_getInstance();
279  if ($privacy->groupConfirmationRequired()) {
280  $check_agreement = $this->in_group;
281  }
282  }
283 
284  $data = ilTrQuery::getUserObjectMatrix($this->ref_id, $collection["object_ids"], $this->filter["name"], $a_user_fields, $a_privary_fields, $check_agreement);
285  if ($collection["objectives_parent_id"] && $data["users"]) {
286  // sub-items: learning objectives
287  $objectives = ilTrQuery::getUserObjectiveMatrix($collection["objectives_parent_id"], $data["users"]);
288 
289  $this->objective_ids = array();
290 
291  foreach ($objectives as $user_id => $objectives) {
292  if (isset($data["set"][$user_id])) {
293  foreach ($objectives as $objective_id => $status) {
294  $obj_id = "objtv_" . $objective_id;
295  $data["set"][$user_id][$obj_id] = $status;
296 
297  if (!in_array($obj_id, $this->objective_ids)) {
298  $this->objective_ids[$objective_id] = ilCourseObjective::lookupObjectiveTitle($objective_id);
299  }
300  }
301  }
302  }
303  }
304 
305  // sub-items: SCOs
306  if ($collection["scorm"] && $data["set"]) {
307  $this->sco_ids = array();
308  foreach (array_keys($data["set"]) as $user_id) {
309  foreach ($collection["scorm"]["scos"] as $sco) {
310  if (!in_array($sco, $this->sco_ids)) {
311  $this->sco_ids[$sco] = $collection["scorm"]["scos_title"][$sco];
312  }
313 
314  // alex, 5 Nov 2011: we got users being in failed and in
315  // completed status, I changed the setting in: first check failed
316  // then check completed since failed should superseed completed
317  // (before completed has been checked before failed)
319  if (in_array($user_id, $collection["scorm"]["failed"][$sco])) {
321  } elseif (in_array($user_id, $collection["scorm"]["completed"][$sco])) {
323  } elseif (in_array($user_id, $collection["scorm"]["in_progress"][$sco])) {
325  }
326 
327  $obj_id = "objsco_" . $sco;
328  $data["set"][$user_id][$obj_id] = $status;
329  }
330  }
331  }
332 
333  // sub-items: generic, e.g. lm chapter
334  if ($collection["subitems"] && $data["set"]) {
335  foreach (array_keys($data["set"]) as $user_id) {
336  foreach ($collection["subitems"]["items"] as $item_id) {
337  $this->subitem_ids[$item_id] = $collection["subitems"]["item_titles"][$item_id];
338 
340  if (in_array($user_id, $collection["subitems"]["completed"][$item_id])) {
342  } elseif (is_array($collection["subitems"]["in_progress"]) &&
343  in_array($user_id, $collection["subitems"]["in_progress"][$item_id])) {
345  }
346 
347  $obj_id = "objsub_" . $item_id;
348  $data["set"][$user_id][$obj_id] = $status;
349  }
350  }
351  }
352 
353  // percentage export
354  if ($data["set"]) {
355  $this->perc_map = array();
356  foreach ($data["set"] as $row_idx => $row) {
357  foreach ($row as $column => $value) {
358  if (substr($column, -5) == "_perc") {
359  $obj_id = explode("_", $column);
360  $obj_id = (int) $obj_id[1];
361 
362  // #18673
363  if (!$this->isPercentageAvailable($obj_id) ||
364  !(int) $value) {
365  unset($data["set"][$row_idx][$column]);
366  } else {
367  $this->perc_map[$obj_id] = true;
368  }
369  }
370  }
371  }
372  }
373 
374  $this->setMaxCount($data["cnt"]);
375  $this->setData($data["set"]);
376 
377  return $collection["object_ids"];
378  }
379  return false;
380  }
381 
382  public function fillRow($a_set)
383  {
384  global $DIC;
385 
386  $lng = $DIC['lng'];
387 
388  if ($this->has_multi) {
389  $this->tpl->setVariable("USER_ID", $a_set["usr_id"]);
390  }
391 
392  foreach ($this->getSelectedColumns() as $c) {
393  switch ($c) {
394  case (substr($c, 0, 4) == "obj_"):
395  $obj_id = substr($c, 4);
396 
397  // object without read-lp-permission
398  if (in_array($obj_id, $this->privacy_cols) ||
399  $a_set["privacy_conflict"]) {
400  $this->tpl->setCurrentBlock("objects");
401  $this->tpl->setVariable("VAL_STATUS", "&nbsp;");
402  $this->tpl->parseCurrentBlock();
403  break;
404  }
405 
406  $status = isset($a_set[$c])
407  ? (int) $a_set[$c]
409  $percentage = isset($a_set[$c . "_perc"])
410  ? (int) $a_set[$c . "_perc"]
411  : null;
412 
413  if ($status != ilLPStatus::LP_STATUS_COMPLETED_NUM) {
414  $timing = $this->showTimingsWarning($this->ref_ids[$obj_id], $a_set["usr_id"]);
415  if ($timing) {
416  if ($timing !== true) {
417  $timing = ": " . ilDatePresentation::formatDate(new ilDate($timing, IL_CAL_UNIX));
418  } else {
419  $timing = "";
420  }
421  $this->tpl->setCurrentBlock('warning_img');
422  $this->tpl->setVariable('WARNING_IMG', ilUtil::getImagePath('time_warn.svg'));
423  $this->tpl->setVariable('WARNING_ALT', $this->lng->txt('trac_time_passed') . $timing);
424  $this->tpl->parseCurrentBlock();
425  }
426  }
427 
428  $this->tpl->setCurrentBlock("objects");
429  $this->tpl->setVariable("VAL_STATUS", $this->parseValue("status", $status, ""));
430  $this->tpl->setVariable("VAL_PERCENTAGE", $this->parseValue("percentage", $percentage, ""));
431  $this->tpl->parseCurrentBlock();
432  break;
433 
434 
435  case (substr($c, 0, 6) == "objtv_"):
436  case (substr($c, 0, 7) == "objsco_"):
437  case (substr($c, 0, 7) == "objsub_"):
438  $status = isset($a_set[$c])
439  ? (int) $a_set[$c]
441 
442  $this->tpl->setCurrentBlock("objects");
443  if (!$a_set["privacy_conflict"]) {
444  $this->tpl->setVariable("VAL_STATUS", $this->parseValue("status", $status, ""));
445  } else {
446  $this->tpl->setVariable("VAL_STATUS", "&nbsp;");
447  }
448  $this->tpl->parseCurrentBlock();
449  break;
450 
451  default:
452  $this->tpl->setCurrentBlock("user_field");
453  if (!$a_set["privacy_conflict"]) {
454  $this->tpl->setVariable("VAL_UF", $this->parseValue($c, $a_set[$c], ""));
455  } else {
456  $this->tpl->setVariable("VAL_UF", "&nbsp;");
457  }
458  $this->tpl->parseCurrentBlock();
459  break;
460  }
461  }
462 
463  // #7694
464  if (!$a_set["active"] || $a_set["privacy_conflict"]) {
465  $mess = array();
466  if ($a_set["privacy_conflict"]) {
467  $mess[] = $lng->txt("status_no_permission");
468  } elseif (!$a_set["active"]) {
469  $mess[] = $lng->txt("inactive");
470  }
471  $this->tpl->setCurrentBlock('inactive_bl');
472  $this->tpl->setVariable('TXT_INACTIVE', implode(", ", $mess));
473  $this->tpl->parseCurrentBlock();
474  }
475 
476  $login = !$a_set["privacy_conflict"]
477  ? $a_set["login"]
478  : "&nbsp;";
479  $this->tpl->setVariable("VAL_LOGIN", $login);
480  }
481 
482  protected function fillHeaderExcel(ilExcel $a_excel, &$a_row)
483  {
484  global $DIC;
485 
486  $ilObjDataCache = $DIC['ilObjDataCache'];
487 
488  $a_excel->setCell($a_row, 0, $this->lng->txt("login"));
489 
490  $labels = $this->getSelectableColumns();
491  $cnt = 1;
492  foreach ($this->getSelectedColumns() as $c) {
493  if (substr($c, 0, 4) == "obj_") {
494  $obj_id = substr($c, 4);
495 
496  $type = $ilObjDataCache->lookupType($obj_id);
497  if ($DIC['objDefinition']->isPlugin($type)) {
498  $type_text = ilObjectPlugin::lookupTxtById($type, 'obj_' . $type);
499  } else {
500  $type_text = $this->lng->txt($type);
501  }
502 
503  $a_excel->setCell($a_row, $cnt, "(" . $type_text . ") " . $labels[$c]["txt"]);
504 
505  if (is_array($this->perc_map) && $this->perc_map[$obj_id]) {
506  $cnt++;
507  $a_excel->setCell($a_row, $cnt, $this->lng->txt("trac_percentage") . " (%)");
508  }
509  } else {
510  $a_excel->setCell($a_row, $cnt, $labels[$c]["txt"]);
511  }
512  $cnt++;
513  }
514 
515  $a_excel->setBold("A" . $a_row . ":" . $a_excel->getColumnCoord($cnt) . $a_row);
516  }
517 
518  protected function fillRowExcel(ilExcel $a_excel, &$a_row, $a_set)
519  {
520  $a_excel->setCell($a_row, 0, $a_set["login"]);
521 
522  $cnt = 1;
523  foreach ($this->getSelectedColumns() as $c) {
524  switch ($c) {
525  case (substr($c, 0, 4) == "obj_"):
526  $obj_id = substr($c, 4);
527  $val = ilLearningProgressBaseGUI::_getStatusText((int) $a_set[$c]);
528  $a_excel->setCell($a_row, $cnt, $val);
529 
530  if (is_array($this->perc_map) && $this->perc_map[$obj_id]) {
531  $cnt++;
532  $perc = (int) $a_set[$c . "_perc"];
533  $perc = !$perc
534  ? null
535  : $perc . "%";
536  $a_excel->setCell($a_row, $cnt, $perc);
537  }
538  break;
539 
540  case (substr($c, 0, 6) == "objtv_"):
541  case (substr($c, 0, 7) == "objsco_"):
542  case (substr($c, 0, 7) == "objsub_"):
543  $val = ilLearningProgressBaseGUI::_getStatusText((int) $a_set[$c]);
544  $a_excel->setCell($a_row, $cnt, $val);
545  break;
546 
547  /* #14142
548  case "last_access":
549  case "spent_seconds":
550  case "status_changed":
551  */
552  default:
553  $val = $this->parseValue($c, $a_set[$c], "user");
554  $a_excel->setCell($a_row, $cnt, $val);
555  break;
556 
557  }
558  $cnt++;
559  }
560  }
561 
562  protected function fillHeaderCSV($a_csv)
563  {
564  global $DIC;
565 
566  $ilObjDataCache = $DIC['ilObjDataCache'];
567 
568  $a_csv->addColumn($this->lng->txt("login"));
569 
570  $labels = $this->getSelectableColumns();
571  foreach ($this->getSelectedColumns() as $c) {
572  if (substr($c, 0, 4) == "obj_") {
573  $obj_id = substr($c, 4);
574 
575  $type = $ilObjDataCache->lookupType($obj_id);
576  if ($DIC['objDefinition']->isPlugin($type)) {
577  $type_text = ilObjectPlugin::lookupTxtById($type, 'obj_' . $type);
578  } else {
579  $type_text = $this->lng->txt($type);
580  }
581 
582  $a_csv->addColumn("(" . $type_text . ") " . $labels[$c]["txt"]);
583 
584  if (is_array($this->perc_map) && $this->perc_map[$obj_id]) {
585  $a_csv->addColumn($this->lng->txt("trac_percentage") . " (%)");
586  }
587  } else {
588  $a_csv->addColumn($labels[$c]["txt"]);
589  }
590  }
591 
592  $a_csv->addRow();
593  }
594 
595  protected function fillRowCSV($a_csv, $a_set)
596  {
597  $a_csv->addColumn($a_set["login"]);
598 
599  foreach ($this->getSelectedColumns() as $c) {
600  switch ($c) {
601  case (substr($c, 0, 4) == "obj_"):
602  $obj_id = substr($c, 4);
603  $val = ilLearningProgressBaseGUI::_getStatusText((int) $a_set[$c]);
604  $a_csv->addColumn($val);
605 
606  if (is_array($this->perc_map) && $this->perc_map[$obj_id]) {
607  $perc = (int) $a_set[$c . "_perc"];
608  if (!$perc) {
609  $perc = null;
610  }
611  $a_csv->addColumn($perc);
612  }
613  break;
614 
615  case (substr($c, 0, 6) == "objtv_"):
616  case (substr($c, 0, 7) == "objsco_"):
617  case (substr($c, 0, 7) == "objsub_"):
618  $val = ilLearningProgressBaseGUI::_getStatusText((int) $a_set[$c]);
619  $a_csv->addColumn($val);
620  break;
621 
622  /* #14142
623  case "last_access":
624  case "spent_seconds":
625  case "status_changed":
626  */
627  default:
628  $val = $this->parseValue($c, $a_set[$c], "user");
629  $a_csv->addColumn($val);
630  break;
631 
632  }
633  }
634 
635  $a_csv->addRow();
636  }
637 }
const LP_STATUS_COMPLETED_NUM
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
fillRowExcel(ilExcel $a_excel, &$a_row, $a_set)
Creates a path for a start and endnode.
getSelectableUserColumns($a_in_course=false, $a_in_group=false)
$login
Definition: cron.php:13
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
$c
Definition: cli.php:37
static lookupTxtById($plugin_id, $lang_var)
fillHeaderExcel(ilExcel $a_excel, &$a_row)
$type
$_GET["client_id"]
setShowTemplates($a_value)
Toggle templates.
__construct($a_parent_obj, $a_parent_cmd, $ref_id)
Constructor.
static _getStatusText($a_status, $a_lng=null)
Get status alt text.
static getSubItemType($a_parent_obj_id)
Get sub-item object type for parent.
const LP_STATUS_IN_PROGRESS_NUM
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
parseTitle($a_obj_id, $action, $a_user_id=false)
const IL_CAL_UNIX
parseValue($id, $value, $type)
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
setId($a_val)
Set id.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
if($format !==null) $name
Definition: metadata.php:230
getItems(array $a_user_fields, array $a_privary_fields=null)
Class for single dates.
getColumnCoord($a_col)
Get column "name" from number.
TableGUI class for learning progress.
setBold($a_coords)
Set cell(s) to bold.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _lookupObjId($a_id)
global $DIC
Definition: goto.php:24
addMultiCommand($a_cmd, $a_text)
Add Command button.
getSelectedColumns()
Get selected columns.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
SetFilterValue(ilFormPropertyGUI $a_item, $a_value)
Set current filter value.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _lookupType($a_id, $a_reference=false)
lookup object type
static getObjectIds($a_parent_obj_id, $a_parent_ref_id=false, $use_collection=true, $a_refresh_status=true, $a_user_ids=null)
Get (sub)objects for given object, also handles learning objectives (course only) ...
static getUserObjectiveMatrix($a_parent_obj_id, $a_users)
const LP_STATUS_NOT_ATTEMPTED_NUM
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
showTimingsWarning($a_ref_id, $a_user_id)
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setEnableHeader($a_enableheader)
Set Enable Header.
static _getInstance()
Get instance of ilPrivacySettings.
static getUserObjectMatrix( $a_parent_ref_id, $a_obj_ids, $a_user_filter=null, array $a_additional_fields=null, array $a_privacy_fields=null, $a_check_agreement=null)
Get status matrix for users on objects.
$ilUser
Definition: imgupload.php:18
filter()
Definition: filter.php:2
setMaxCount($a_max_count)
set max.
if(! $in) $columns
Definition: Utf8Test.php:45
const LP_STATUS_FAILED_NUM