ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTrMatrixTableGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=0);
20
28{
29 protected int $ref_id;
30 protected array $ref_ids = [];
31 protected string $type;
32 protected int $obj_id;
33 protected ?array $obj_ids = null;
34 protected array $objective_ids = [];
35 protected array $sco_ids = [];
36 protected array $subitem_ids = [];
37 protected int $in_course = 0;
38 protected int $in_group = 0;
39 protected int $in_course_ref_id = 0;
40 protected int $in_group_ref_id = 0;
41 protected array $privacy_fields = [];
42 protected array $privacy_cols = [];
43 protected array $perc_map = [];
44 protected bool $has_multi;
45
46 protected ilTree $tree;
49
53 public function __construct(
54 ?object $a_parent_obj,
55 string $a_parent_cmd,
56 int $ref_id
57 ) {
58 global $DIC;
59
60 $this->tree = $DIC->repositoryTree();
61 $this->rbacsystem = $DIC->rbac()->system();
62 $this->ilObjDataCache = $DIC['ilObjDataCache'];
63
64 $this->setId("trsmtx_" . $ref_id);
65 $this->ref_id = $ref_id;
66 $this->obj_id = ilObject::_lookupObjId($ref_id);
67 $this->type = ilObject::_lookupType($this->obj_id); // #17188
68
69 $this->in_group_ref_id = $this->tree->checkForParentType($this->ref_id, "grp");
70 if ($this->in_group_ref_id) {
71 $this->in_group = ilObject::_lookupObjId($this->in_group_ref_id);
72 } else {
73 $this->in_course_ref_id = $this->tree->checkForParentType(
74 $this->ref_id,
75 "crs"
76 );
77 if ($this->in_course_ref_id) {
78 $this->in_course = ilObject::_lookupObjId($this->in_course_ref_id);
79 }
80 }
81
82 $this->lng = $DIC->language();
83 $this->http = $DIC->http();
84 $this->refinery = $DIC->refinery();
85 $this->initFilter();
86 parent::__construct($a_parent_obj, $a_parent_cmd);
87
88 $this->parseTitle($this->obj_id, "trac_matrix");
89 $this->setEnableHeader(true);
90 $this->setFormAction(
91 $this->ctrl->getFormActionByClass(get_class($this))
92 );
93 $this->setRowTemplate(
94 "tpl.user_object_matrix_row.html",
95 "components/ILIAS/Tracking"
96 );
97 $this->setDefaultOrderField("login");
98 $this->setDefaultOrderDirection("asc");
99
100 // see ilObjCourseGUI::addMailToMemberButton()
101 $mail = new ilMail($DIC->user()->getId());
102 if ($this->rbacsystem->checkAccess(
103 "internal_mail",
104 $mail->getMailObjectReferenceId()
105 )) {
106 $this->addMultiCommand(
107 "mailselectedusers",
108 $this->lng->txt("send_mail")
109 );
110 }
111
112 $this->lng->loadLanguageModule('user');
113 $this->addMultiCommand(
114 'addToClipboard',
115 $this->lng->txt('clipboard_add_btn')
116 );
117 $this->addColumn("", "", '1');
118 $this->has_multi = true;
119
120 $this->addColumn($this->lng->txt("login"), "login");
121
122 $labels = $this->getSelectableColumns();
123 $selected = $this->getSelectedColumns();
124 foreach ($selected as $c) {
125 $title = $labels[$c]["txt"];
126
127 if (isset($labels[$c]["no_permission"]) && $labels[$c]["no_permission"]) {
128 $title .= " (" . $this->lng->txt("status_no_permission") . ")";
129 }
130
131 $tooltip = array();
132 if (isset($labels[$c]["icon"])) {
133 $alt = $this->lng->txt($labels[$c]["type"] ?? "");
134 $icon = '<img class="ilListItemIcon" src="' . $labels[$c]["icon"] . '" alt="' . $alt . '" />';
135 if (sizeof($selected) > 5) {
136 $tooltip[] = $title;
137 $title = $icon;
138 } else {
139 $title = $icon . ' ' . $title;
140 }
141 if ($labels[$c]["path"] ?? false) {
142 $tooltip[] = $labels[$c]["path"];
143 }
144 }
145
146 if (isset($labels[$c]["id"])) {
147 $sort_id = $labels[$c]["id"];
148 } else {
149 // list cannot be sorted by udf fields (separate query)
150 $sort_id = (substr($c, 0, 4) == "udf_") ? "" : $c;
151 }
152
153 $this->addColumn(
154 $title,
155 $sort_id,
156 "",
157 false,
158 "",
159 implode(" - ", $tooltip)
160 );
161 }
162 $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL));
163 $this->setSelectAllCheckbox('uid');
164 }
165
166 public function initFilter(): void
167 {
168 $item = $this->addFilterItemByMetaType(
169 "name",
171 false,
172 $this->lng->txt('login')
173 );
174 $this->filter["name"] = $item->getValue();
175
176 // #14949 - is called before constructor, so we have to do it ourselves
177 if ($this->http->wrapper()->query()->has($this->prefix . '_tpl')) {
178 $this->filter["name"] = null;
179 $this->setFilterValue($item, '');
180 }
181 }
182
183 public function numericOrdering($a_field): bool
184 {
185 if ($a_field === 'read_count' || $a_field === 'spent_seconds') {
186 return true;
187 }
188 return false;
189 }
190
191 public function getSelectableColumns(): array
192 {
193 $user_cols = $this->getSelectableUserColumns(
194 $this->in_course_ref_id,
195 $this->in_group_ref_id
196 );
197 $columns = [];
198 if ($this->obj_ids === null) {
199 // we cannot use the selected columns because they are not ready yet
200 // so we use all available columns, should be ok anyways
201 $this->obj_ids = $this->getItems(
202 array_keys($user_cols[0]),
203 $user_cols[1]
204 );
205 }
206 $parent = [];
207 if (isset($this->obj_ids)) {
208 $tmp_cols = array();
209 foreach ($this->obj_ids as $obj_id) {
210 if ($obj_id == $this->obj_id) {
211 $parent = array("txt" => $this->lng->txt("status"),
212 "default" => true
213 );
214 } else {
215 $no_perm = false;
216
217 $ref_id = $this->ref_ids[$obj_id];
218 if ($ref_id &&
220 'read_learning_progress',
221 $ref_id
222 )) {
223 $no_perm = true;
224 $this->privacy_cols[] = $obj_id;
225 }
226
227 $title = $this->ilObjDataCache->lookupTitle((int) $obj_id);
228 $type = $this->ilObjDataCache->lookupType((int) $obj_id);
229 $icon = ilObject::_getIcon((int) $obj_id, "tiny", $type);
230 if ($type == "sess") {
231 $sess = new ilObjSession($obj_id, false);
232 $title = $sess->getPresentationTitle();
233 }
234
235 // BT 35475: set titles of referenced objects correctly
236 if (
237 $title == '' &&
238 ($type == 'catr' || $type == 'crsr' || $type == 'grpr')
239 ) {
241 }
242
243 // #16453
244 $relpath = null;
245 $path = new ilPathGUI();
246 $path = $path->getPath($this->ref_id, $ref_id);
247 if ($path) {
248 $relpath = $this->lng->txt('path') . ': ' . $path;
249 }
250
251 $tmp_cols[strtolower($title) . "#~#obj_" . $obj_id] = array(
252 "txt" => $title,
253 "icon" => $icon,
254 "type" => $type,
255 "default" => true,
256 "no_permission" => $no_perm,
257 "path" => $relpath
258 );
259 }
260 }
261 if (sizeof($this->objective_ids)) {
262 foreach ($this->objective_ids as $obj_id => $title) {
263 $tmp_cols[strtolower(
264 $title
265 ) . "#~#objtv_" . $obj_id] = array("txt" => $title,
266 "default" => true
267 );
268 }
269 }
270 if (sizeof($this->sco_ids)) {
271 foreach ($this->sco_ids as $obj_id => $title) {
272 $icon = ilObject::_getIcon($obj_id, "tiny", "sco");
273 $tmp_cols[strtolower(
274 $title
275 ) . "#~#objsco_" . $obj_id] = array("txt" => $title,
276 "icon" => $icon,
277 "default" => true
278 );
279 }
280 }
281 if (sizeof($this->subitem_ids)) {
282 foreach ($this->subitem_ids as $obj_id => $title) {
284 $obj_id,
285 "tiny",
287 $this->obj_id
288 )
289 );
290 $tmp_cols[strtolower(
291 $title
292 ) . "#~#objsub_" . $obj_id] = array("txt" => $title,
293 "icon" => $icon,
294 "default" => true
295 );
296 }
297 }
298
299 // alex, 5 Nov 2011: Do not sort SCORM items or "chapters"
300 if (!sizeof($this->sco_ids) && !sizeof($this->subitem_ids)) {
301 ksort($tmp_cols);
302 }
303 foreach ($tmp_cols as $id => $def) {
304 $id = explode('#~#', $id);
305 $columns[$id[1]] = $def;
306 }
307 unset($tmp_cols);
308
309 if ($parent) {
310 $columns["obj_" . $this->obj_id] = $parent;
311 }
312 }
313
314 unset($user_cols[0]["status"]);
315 unset($user_cols[0]["login"]);
316 foreach ($user_cols[0] as $col_id => $col_def) {
317 if (!isset($columns[$col_id])) {
318 // these are all additional fields, no default
319 $col_def["default"] = false;
320 $columns[$col_id] = $col_def;
321 }
322 }
323
324 return $columns;
325 }
326
327 public function getItems(
328 array $a_user_fields,
329 ?array $a_privary_fields = null
330 ): array {
331
332 // #17081
333 if ($this->restore_filter) {
334 $name = $this->restore_filter_values["name"];
335 $this->setFilterValue($this->filters[0], $name);
336 $this->filter["name"] = $name;
337 }
338
339 $collection = ilTrQuery::getObjectIds(
340 $this->obj_id,
341 $this->ref_id,
342 true
343 );
344 if ($collection["object_ids"]) {
345 // we need these for the timing warnings
346 $this->ref_ids = $collection["ref_ids"];
347
348 // only if object is [part of] course/group
349 $check_agreement = false;
350 if ($this->in_course) {
351 // privacy (if course agreement is activated)
353 if ($privacy->courseConfirmationRequired()) {
354 $check_agreement = $this->in_course;
355 }
356 } elseif ($this->in_group) {
357 // privacy (if group agreement is activated)
359 if ($privacy->groupConfirmationRequired()) {
360 $check_agreement = $this->in_group;
361 }
362 }
364 $this->ref_id,
365 $collection["object_ids"],
366 $this->filter["name"] ?? '',
367 $a_user_fields,
368 $a_privary_fields,
369 $check_agreement
370 );
371 if ($collection["objectives_parent_id"] && $data["users"]) {
372 // sub-items: learning objectives
374 $collection["objectives_parent_id"],
375 $data["users"]
376 );
377
378 $this->objective_ids = array();
379
380 foreach ($objectives as $user_id => $inner_objectives) {
381 if (isset($data["set"][$user_id])) {
382 foreach ($inner_objectives as $objective_id => $status) {
383 $obj_id = "objtv_" . $objective_id;
384 $data["set"][$user_id][$obj_id] = $status;
385
386 if (!in_array($obj_id, $this->objective_ids)) {
387 $this->objective_ids[$objective_id] = ilCourseObjective::lookupObjectiveTitle(
388 $objective_id
389 );
390 }
391 }
392 }
393 }
394 }
395
396 // sub-items: SCOs
397 if ($collection["scorm"] && $data["set"]) {
398 $this->sco_ids = array();
399 foreach (array_keys($data["set"]) as $user_id) {
400 foreach ($collection["scorm"]["scos"] as $sco) {
401 if (!in_array($sco, $this->sco_ids)) {
402 $this->sco_ids[$sco] = $collection["scorm"]["scos_title"][$sco];
403 }
404
405 // alex, 5 Nov 2011: we got users being in failed and in
406 // completed status, I changed the setting in: first check failed
407 // then check completed since failed should superseed completed
408 // (before completed has been checked before failed)
410 if (in_array(
411 $user_id,
412 $collection["scorm"]["failed"][$sco]
413 )) {
415 } elseif (in_array(
416 $user_id,
417 $collection["scorm"]["completed"][$sco]
418 )) {
420 } elseif (in_array(
421 $user_id,
422 $collection["scorm"]["in_progress"][$sco]
423 )) {
425 }
426
427 $obj_id = "objsco_" . $sco;
428 $data["set"][$user_id][$obj_id] = $status;
429 }
430 }
431 }
432
433 // sub-items: generic, e.g. lm chapter
434 if ($collection["subitems"] && $data["set"]) {
435 foreach (array_keys($data["set"]) as $user_id) {
436 foreach ($collection["subitems"]["items"] as $item_id) {
437 $this->subitem_ids[$item_id] = $collection["subitems"]["item_titles"][$item_id];
438
440 if (isset(
441 $collection["subitems"]["completed"]
442 ) && in_array(
443 $user_id,
444 $collection["subitems"]["completed"][$item_id]
445 )) {
447 } elseif (isset(
448 $collection["subitems"]["in_progress"]
449 ) &&
450 in_array(
451 $user_id,
452 $collection["subitems"]["in_progress"][$item_id]
453 )) {
455 }
456
457 $obj_id = "objsub_" . $item_id;
458 $data["set"][$user_id][$obj_id] = $status;
459 }
460 }
461 }
462
463 // percentage export
464 if ($data["set"]) {
465 $this->perc_map = array();
466 foreach ($data["set"] as $row_idx => $row) {
467 foreach ($row as $column => $value) {
468 if (substr($column, -5) == "_perc") {
469 $obj_id = explode("_", $column);
470 $obj_id = (int) $obj_id[1];
471
472 // #18673
473 if (!$this->isPercentageAvailable($obj_id) ||
474 !(int) $value) {
475 unset($data["set"][$row_idx][$column]);
476 } else {
477 $this->perc_map[$obj_id] = true;
478 }
479 }
480 }
481 }
482 }
483
484 /*
485 * ilTrQuery does not read out any information about org units
486 * (nor should it), so it needs to be added here.
487 */
488 if (in_array('org_units', $a_user_fields)) {
489 foreach (($data['set'] ?? []) as $key => $usr_data) {
490 if (!isset($usr_data['usr_id'])) {
491 continue;
492 }
493 $usr_id = (int) $usr_data['usr_id'];
494 $org_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($usr_id);
495 $data["set"][$key]['org_units'] = $org_units;
496 }
497 }
498
499 $this->setMaxCount($data["cnt"] ?? 0);
500 $this->setData($data["set"] ?? []);
501 return $collection["object_ids"] ?? [];
502 }
503 return [];
504 }
505
506 protected function fillRow(array $a_set): void
507 {
508 if ($this->has_multi) {
509 $this->tpl->setVariable("USER_ID", $a_set["usr_id"]);
510 }
511
512 foreach ($this->getSelectedColumns() as $c) {
513 switch ($c) {
514 case (substr($c, 0, 4) == "obj_"):
515 $obj_id = substr($c, 4);
516
517 // object without read-lp-permission
518 if (in_array($obj_id, $this->privacy_cols) ||
519 ($a_set["privacy_conflict"] ?? false)) {
520 $this->tpl->setCurrentBlock("objects");
521 $this->tpl->setVariable("VAL_STATUS", "&nbsp;");
522 $this->tpl->parseCurrentBlock();
523 continue 2;
524 }
525
526 $status = isset($a_set[$c])
527 ? (int) $a_set[$c]
529 $percentage = isset($a_set[$c . "_perc"])
530 ? (int) $a_set[$c . "_perc"]
531 : null;
532
534 $timing = $this->showTimingsWarning(
535 $this->ref_ids[$obj_id],
536 $a_set["usr_id"]
537 );
538 if ($timing) {
539 if ($timing !== true) {
540 $timing = ": " . ilDatePresentation::formatDate(
541 new ilDate($timing, IL_CAL_UNIX)
542 );
543 } else {
544 $timing = "";
545 }
546 $this->tpl->setCurrentBlock('warning_img');
547 $this->tpl->setVariable(
548 'WARNING_IMG',
550 'media/time_warn.svg'
551 )
552 );
553 $this->tpl->setVariable(
554 'WARNING_ALT',
555 $this->lng->txt(
556 'trac_time_passed'
557 ) . $timing
558 );
559 $this->tpl->parseCurrentBlock();
560 }
561 }
562
563 $this->tpl->setCurrentBlock("objects");
564 $this->tpl->setVariable(
565 "VAL_STATUS",
566 $this->parseValue(
567 "status",
568 (string) $status,
569 ""
570 )
571 );
572 $this->tpl->setVariable(
573 "VAL_PERCENTAGE",
574 $this->parseValue(
575 "percentage",
576 (string) $percentage,
577 ""
578 )
579 );
580 $this->tpl->parseCurrentBlock();
581 break;
582
583 case (substr($c, 0, 6) == "objtv_"):
584 case (substr($c, 0, 7) == "objsco_"):
585 case (substr($c, 0, 7) == "objsub_"):
586 $status = isset($a_set[$c])
587 ? (int) $a_set[$c]
589
590 $this->tpl->setCurrentBlock("objects");
591 if (!($a_set["privacy_conflict"] ?? false)) {
592 $this->tpl->setVariable(
593 "VAL_STATUS",
594 $this->parseValue(
595 "status",
596 (string) $status,
597 ""
598 )
599 );
600 } else {
601 $this->tpl->setVariable("VAL_STATUS", "&nbsp;");
602 }
603 $this->tpl->parseCurrentBlock();
604 break;
605
606 default:
607 $this->tpl->setCurrentBlock("user_field");
608 if (!($a_set["privacy_conflict"] ?? false)) {
609 $this->tpl->setVariable(
610 "VAL_UF",
611 $this->parseValue(
612 $c,
613 $a_set[$c] ?? "",
614 ""
615 )
616 );
617 } else {
618 $this->tpl->setVariable("VAL_UF", "&nbsp;");
619 }
620 $this->tpl->parseCurrentBlock();
621 break;
622 }
623 }
624
625 // #7694
626 if (!$a_set["active"] || ($a_set["privacy_conflict"] ?? false)) {
627 $mess = array();
628 if ($a_set["privacy_conflict"] ?? false) {
629 $mess[] = $this->lng->txt("status_no_permission");
630 } elseif (!$a_set["active"]) {
631 $mess[] = $this->lng->txt("inactive");
632 }
633 $this->tpl->setCurrentBlock('inactive_bl');
634 $this->tpl->setVariable('TXT_INACTIVE', implode(", ", $mess));
635 $this->tpl->parseCurrentBlock();
636 }
637
638 $login = !($a_set["privacy_conflict"] ?? false)
639 ? $a_set["login"]
640 : "&nbsp;";
641 $this->tpl->setVariable("VAL_LOGIN", $login);
642 }
643
644 protected function fillHeaderExcel(ilExcel $a_excel, int &$a_row): void
645 {
646 global $DIC;
647
648 $ilObjDataCache = $DIC['ilObjDataCache'];
649
650 $a_excel->setCell($a_row, 0, $this->lng->txt("login"));
651
652 $labels = $this->getSelectableColumns();
653 $cnt = 1;
654 foreach ($this->getSelectedColumns() as $c) {
655 if (substr($c, 0, 4) == "obj_") {
656 $obj_id = substr($c, 4);
657
658 $type = $this->ilObjDataCache->lookupType((int) $obj_id);
659 if ($DIC['objDefinition']->isPlugin($type)) {
661 $type,
662 'obj_' . $type
663 );
664 } else {
665 $type_text = $this->lng->txt($type);
666 }
667
668 $a_excel->setCell(
669 $a_row,
670 $cnt,
671 "(" . $type_text . ") " . $labels[$c]["txt"]
672 );
673
674 if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
675 $cnt++;
676 $a_excel->setCell(
677 $a_row,
678 $cnt,
679 $this->lng->txt(
680 "trac_percentage"
681 ) . " (%)"
682 );
683 }
684 } else {
685 $a_excel->setCell($a_row, $cnt, $labels[$c]["txt"]);
686 }
687 $cnt++;
688 }
689
690 $a_excel->setBold(
691 "A" . $a_row . ":" . $a_excel->getColumnCoord($cnt) . $a_row
692 );
693 }
694
695 protected function fillRowExcel(
696 ilExcel $a_excel,
697 int &$a_row,
698 array $a_set
699 ): void {
700 $a_excel->setCell($a_row, 0, $a_set["login"]);
701
702 $cnt = 1;
703 foreach ($this->getSelectedColumns() as $c) {
704 switch ($c) {
705 case (substr($c, 0, 4) == "obj_"):
706 $obj_id = substr($c, 4);
708 (int) $a_set[$c]
709 );
710 $a_excel->setCell($a_row, $cnt, $val);
711
712 if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
713 $cnt++;
714 $perc = (int) ($a_set[$c . "_perc"] ?? 0);
715 $perc = !$perc
716 ? null
717 : $perc . "%";
718 $a_excel->setCell($a_row, $cnt, $perc);
719 }
720 break;
721
722 case (substr($c, 0, 6) == "objtv_"):
723 case (substr($c, 0, 7) == "objsco_"):
724 case (substr($c, 0, 7) == "objsub_"):
726 (int) $a_set[$c]
727 );
728 $a_excel->setCell($a_row, $cnt, $val);
729 break;
730
731 /* #14142
732 case "last_access":
733 case "spent_seconds":
734 case "status_changed":
735 */
736 default:
737 $val = $this->parseValue($c, $a_set[$c] ?? '', "user");
738 $a_excel->setCell($a_row, $cnt, $val);
739 break;
740 }
741 $cnt++;
742 }
743 }
744
745 protected function fillHeaderCSV(ilCSVWriter $a_csv): void
746 {
747 global $DIC;
748
749 $ilObjDataCache = $DIC['ilObjDataCache'];
750
751 $a_csv->addColumn($this->lng->txt("login"));
752
753 $labels = $this->getSelectableColumns();
754 foreach ($this->getSelectedColumns() as $c) {
755 if (substr($c, 0, 4) == "obj_") {
756 $obj_id = substr($c, 4);
757
758 $type = $this->ilObjDataCache->lookupType((int) $obj_id);
759 if ($DIC['objDefinition']->isPlugin($type)) {
761 $type,
762 'obj_' . $type
763 );
764 } else {
765 $type_text = $this->lng->txt($type);
766 }
767
768 $a_csv->addColumn("(" . $type_text . ") " . $labels[$c]["txt"]);
769
770 if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
771 $a_csv->addColumn(
772 $this->lng->txt("trac_percentage") . " (%)"
773 );
774 }
775 } else {
776 $a_csv->addColumn($labels[$c]["txt"]);
777 }
778 }
779
780 $a_csv->addRow();
781 }
782
783 protected function fillRowCSV(ilCSVWriter $a_csv, array $a_set): void
784 {
785 $a_csv->addColumn($a_set["login"]);
786
787 foreach ($this->getSelectedColumns() as $c) {
788 switch ($c) {
789 case (substr($c, 0, 4) == "obj_"):
790 $obj_id = substr($c, 4);
792 (int) $a_set[$c]
793 );
794 $a_csv->addColumn($val);
795
796 if (isset($this->perc_map) && ($this->perc_map[$obj_id] ?? false)) {
797 $perc = null;
798 if (isset($a_set[$c . "_perc"])) {
799 $perc = (int) $a_set[$c . "_perc"];
800 }
801 $a_csv->addColumn((string) $perc);
802 }
803 break;
804
805 case (substr($c, 0, 6) == "objtv_"):
806 case (substr($c, 0, 7) == "objsco_"):
807 case (substr($c, 0, 7) == "objsub_"):
809 (int) $a_set[$c]
810 );
811 $a_csv->addColumn($val);
812 break;
813
814 /* #14142
815 case "last_access":
816 case "spent_seconds":
817 case "status_changed":
818 */
819 default:
820 $val = $this->parseValue($c, $a_set[$c] ?? '', "user");
821 $a_csv->addColumn($val);
822 break;
823 }
824 }
825
826 $a_csv->addRow();
827 }
828}
const IL_CAL_UNIX
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addColumn(string $a_col)
static _lookupTargetTitle(int $a_obj_id)
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
Class for single dates.
setBold(string $a_coords)
Set cell(s) to bold.
setCell(int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false)
Set cell value.
getColumnCoord(int $a_col)
Get column "name" from number.
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM
TableGUI class for learning progress.
isPercentageAvailable(int $a_obj_id)
parseTitle(int $a_obj_id, string $action, int $a_user_id=0)
getSelectableUserColumns(int $a_in_course=0, int $a_in_group=0)
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
static _getStatusText(int $a_status, ?ilLanguage $a_lng=null)
Get status alt text.
class ilObjectDataCache
static lookupTxtById(string $plugin_id, string $lang_var)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupObjId(int $ref_id)
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
setExportFormats(array $formats)
Set available export formats.
addMultiCommand(string $a_cmd, string $a_text)
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setEnableHeader(bool $a_enableheader)
setDefaultOrderField(string $a_defaultorderfield)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setFilterValue(ilTableFilterItem $a_item, $a_value)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
fillRow(array $a_set)
Standard Version of Fill Row.
fillHeaderCSV(ilCSVWriter $a_csv)
CSV Version of Fill Header.
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
Excel Version of Fill Row.
fillHeaderExcel(ilExcel $a_excel, int &$a_row)
Excel Version of Fill Header.
__construct(?object $a_parent_obj, string $a_parent_cmd, int $ref_id)
Constructor.
getItems(array $a_user_fields, ?array $a_privary_fields=null)
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
CSV Version of Fill Row.
ilObjectDataCache $ilObjDataCache
getSelectableColumns()
Get selectable columns.
static getUserObjectiveMatrix(int $a_parent_obj_id, array $a_users)
static getObjectIds(int $a_parent_obj_id, int $a_parent_ref_id, bool $use_collection=true, bool $a_refresh_status=true, ?array $a_user_ids=null)
Get (sub)objects for given object, also handles learning objectives (course only)
static getUserObjectMatrix(int $a_parent_ref_id, array $a_obj_ids, ?string $a_user_filter=null, ?array $a_additional_fields=null, ?array $a_privacy_fields=null, ?int $a_check_agreement=null)
Get status matrix for users on objects.
static getSubItemType(int $a_parent_obj_id)
Get sub-item object type for parent.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$c
Definition: deliver.php:25
$path
Definition: ltiservices.php:30
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
if(!file_exists('../ilias.ini.php'))
global $DIC
Definition: shib_login.php:26
$objectives