ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilStudyProgrammeMembersTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2015 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
9{
10 const COLUMNS = [
11 //column, langvar, optional, if_lp_children, if_no_lp_children
12 ['name', 'name', false, true, true],
13 ['login', 'login', false, true, true],
14 ['prg_orgus', 'prg_orgus', true, true, true],
15 ['prg_status', 'prg_status', false, true, true],
16 ['prg_completion_date', 'prg_completion_date', true, true, true],
17 ['prg_completion_by', 'prg_completion_by', true, true, true],
18 ['points', 'prg_points_reachable', false, true, false],
19 ['points', 'prg_points_required', false, false, true],
20 ['points_current', 'prg_points_current', false, false, true],
21 ['prg_custom_plan', 'prg_custom_plan', true, true, true],
22 ['prg_belongs_to', 'prg_belongs_to', true, true, true],
23 ['prg_assign_date', 'prg_assign_date', false, true, true],
24 ['prg_assigned_by', 'prg_assigned_by', true, true, true],
25 ['prg_deadline', 'prg_deadline', true, true, true],
26 ['prg_expiry_date', 'prg_expiry_date', true, true, true],
27 ['prg_validity', 'prg_validity', true, true, true],
28 [null, 'action', false, true, true]
29 ];
30
31 const OPTION_ALL = -1;
34
38 protected $prg_obj_id;
39
43 protected $prg_ref_id;
44
49
53 protected $db;
54
58 protected $ui_factory;
59
63 protected $ui_renderer;
64
69
73 protected $prg;
74
75 public function __construct(
76 int $prg_obj_id,
77 int $prg_ref_id,
79 string $parent_cmd = '',
80 string $template_context = '',
82 ilStudyProgrammePositionBasedAccess $position_based_access
83 ) {
84 $this->setId("sp_member_list");
85 parent::__construct($parent_obj, $parent_cmd, $template_context);
86
87 $this->prg_obj_id = $prg_obj_id;
88 $this->prg_ref_id = $prg_ref_id;
89 $this->position_based_access = $position_based_access;
90
92 $this->prg_has_lp_children = $parent_obj->getStudyProgramme()->hasLPChildren();
93
94 global $DIC;
95 $this->db = $DIC['ilDB'];
96 $this->ui_factory = $DIC['ui.factory'];
97 $this->ui_renderer = $DIC['ui.renderer'];
98
99 $this->setEnableTitle(true);
100 $this->setTopCommands(false);
101 $this->setEnableHeader(true);
102 // TODO: switch this to internal sorting/segmentation
103 $this->setExternalSorting(false);
104 $this->setExternalSegmentation(true);
105 $this->setRowTemplate("tpl.members_table_row.html", "Modules/StudyProgramme");
106 $this->setShowRowsSelector(false);
107 $this->setFormAction($this->ctrl->getFormAction($parent_obj, "view"));
108 $this->addColumn("", "", "1", true);
109 $this->setSelectAllCheckbox("prgs_ids[]");
110 $this->setEnableAllCommand(true);
111 $this->addMultiCommands();
112
113 $selected = $this->getSelectedColumns();
114 foreach (self::COLUMNS as $column) {
115 list($col, $lng_var, $optional, $lp, $no_lp) = $column;
116
117 $show_by_lp = ($this->prg_has_lp_children && $lp) || (!$this->prg_has_lp_children && $no_lp);
118 $show_optional = !$optional || ($optional && array_key_exists($col, $selected));
119
120 if ($show_by_lp && $show_optional) {
121 $this->addColumn($this->lng->txt($lng_var), $col);
122 }
123 }
124
125 $this->sp_user_progress_db = $sp_user_progress_db;
126
127 $this->initFilter();
128 $filter_values = $this->getFilterValues();
129
131 $this->determineLimit();
132
133 $members_list = $this->fetchData(
134 $prg_obj_id,
135 $this->getLimit(),
136 $this->getOffset(),
137 $this->getOrderField(),
138 $this->getOrderDirection(),
139 $filter_values
140 );
141
142 $this->setMaxCount($this->countFetchData($prg_obj_id, $filter_values));
143 $this->setData($members_list);
144 }
145
146
147 protected function fillRow($a_set) : void
148 {
149 $usr_id = (int) $a_set['usr_id'];
150
151 $may_read_learning_progress =
152 !$this->prg->getAccessControlByOrguPositionsGlobal() ||
153 in_array($usr_id, $this->getParentObject()->readLearningProgress())
154 ;
155
156 $this->tpl->setCurrentBlock("checkb");
157 $this->tpl->setVariable("ID", $a_set["prgrs_id"]);
158 $this->tpl->parseCurrentBlock();
159 $this->tpl->setVariable("FIRSTNAME", $a_set["firstname"]);
160 $this->tpl->setVariable("LASTNAME", $a_set["lastname"]);
161 $this->tpl->setVariable("LOGIN", $a_set["login"]);
162 $this->tpl->setVariable(
163 "STATUS",
165 $may_read_learning_progress,
166 $this->sp_user_progress_db->statusToRepr($a_set["status"])
167 )
168 );
169 $this->tpl->setVariable("POINTS_REQUIRED", $a_set["points"]);
170 $this->tpl->setVariable("ASSIGN_DATE", $a_set["prg_assign_date"]);
171
172 if (!$this->prg_has_lp_children) {
173 $this->tpl->setCurrentBlock("points_current");
174 $this->tpl->setVariable(
175 "POINTS_CURRENT",
176 $this->getValueOrEmptyString($may_read_learning_progress, $a_set['points_current'])
177 );
178 $this->tpl->parseCurrentBlock();
179 }
180
181 foreach ($this->getSelectedColumns() as $column) {
182 switch ($column) {
183 case "prg_orgus":
184 $this->tpl->setVariable("ORGUS", $a_set["orgus"]);
185 break;
186 case "prg_completion_date":
187 $completion_date = '';
188 if ($may_read_learning_progress) {
189 $completion_date = $a_set["completion_date"];
190 }
191 $this->tpl->setVariable("COMPLETION_DATE", $completion_date);
192 break;
193 case "prg_completion_by":
194 if (is_null($a_set["completion_by"])) {
195 $this->tpl->touchBlock("comp_by");
196 } else {
197 $this->tpl->setVariable(
198 "COMPLETION_BY",
200 $may_read_learning_progress,
201 $a_set["completion_by"]
202 )
203 );
204 }
205
206 break;
207 case "prg_custom_plan":
208 $has_changers = $this->lng->txt("no");
209 if ($a_set["last_change_by"]) {
210 $has_changers = $this->lng->txt("yes");
211 }
212
213 $this->tpl->setVariable(
214 "CUSTOM_PLAN",
215 $this->getValueOrEmptyString($may_read_learning_progress, $has_changers)
216 );
217 break;
218 case "prg_belongs_to":
219 $this->tpl->setVariable("BELONGS_TO", $a_set["belongs_to"]);
220 break;
221 case "prg_expiry_date":
222 $this->tpl->setVariable(
223 "EXPIRY_DATE",
224 $this->getValueOrEmptyString($may_read_learning_progress, $a_set["vq_date"])
225 );
226 break;
227 case "prg_assigned_by":
228 $assigned_by = $a_set["prg_assigned_by"];
229 if (is_null($assigned_by)) {
231 $assignment_src = (int) $a_set['prg_assignment_origin'];
232 $assigned_by = $this->lng->txt('prg_autoassignment')
233 . ' ' . $this->lng->txt($srcs[$assignment_src]);
234 }
235 $this->tpl->setVariable("ASSIGNED_BY", $assigned_by);
236 break;
237 case "prg_deadline":
238 if (is_null($a_set["prg_deadline"])) {
239 $this->tpl->touchBlock("deadline");
240 } else {
241 $this->tpl->setVariable(
242 "DEADLINE",
244 $may_read_learning_progress,
245 $a_set["prg_deadline"]
246 )
247 );
248 }
249 break;
250 case "prg_validity":
251 $this->tpl->setVariable(
252 "VALIDITY",
254 $may_read_learning_progress,
255 $a_set['prg_validity']
256 )
257 );
258 break;
259
260 }
261 }
262 $this->tpl->setVariable(
263 "ACTIONS",
264 $this->buildActionDropDown(
265 $a_set["actions"],
266 $a_set["prgrs_id"],
267 $a_set["assignment_id"],
268 $usr_id
269 )
270 );
271 }
272
273 protected function getValueOrEmptyString(string $condition, string $value) : string
274 {
275 if ($condition) {
276 return $value;
277 }
278
279 return '';
280 }
281
285 protected function buildActionDropDown(
286 array $actions,
287 int $prgrs_id,
288 int $ass_id,
289 int $usr_id
290 ) : string {
292
293 $access_by_position = $this->isPermissionControlledByOrguPosition();
294 $parent = $this->getParentObject();
295
296 $view_individual_plan = $parent->isOperationAllowedForUser(
297 $usr_id,
299 );
300
301 $edit_individual_plan = $parent->isOperationAllowedForUser(
302 $usr_id,
304 );
305
306
307 foreach ($actions as $action) {
308 switch ($action) {
311 if (!$edit_individual_plan) {
312 continue 2;
313 }
314 break;
316 if (!$view_individual_plan) {
317 continue 2;
318 }
319 break;
321 $manage_members =
322 $parent->isOperationAllowedForUser($usr_id, ilOrgUnitOperation::OP_MANAGE_MEMBERS)
323 && in_array($usr_id, $this->getParentObject()->getLocalMembers());
324
325 if (!$manage_members) {
326 continue 2;
327 }
328 break;
329 }
330 $target = $this->getLinkTargetForAction($action, $prgrs_id, $ass_id);
331 $l->addItem($this->lng->txt("prg_$action"), $action, $target);
332 }
333
334 return $l->getHTML();
335 }
336
340 protected function getLinkTargetForAction(string $action, int $prgrs_id, int $ass_id) : string
341 {
342 return $this->getParentObject()->getLinkTargetForAction($action, $prgrs_id, $ass_id);
343 }
344
348 protected function fetchData(
349 int $prg_id,
350 int $limit = null,
351 int $offset = null,
352 string $order_column = null,
353 string $order_direction = null,
354 array $filter = []
355 ) : array {
356 // TODO: Reimplement this in terms of ActiveRecord when innerjoin
357 // supports the required rename functionality
358
359 $accredited = $this->db->quote(ilStudyProgrammeProgress::STATUS_ACCREDITED, 'integer');
360
361 $sql =
362 "SELECT" . PHP_EOL
363 . "prgrs.id AS prgrs_id," . PHP_EOL
364 . "pcp.firstname," . PHP_EOL
365 . "pcp.lastname," . PHP_EOL
366 . "pcp.login," . PHP_EOL
367 . "pcp.usr_id," . PHP_EOL
368 . "prgrs.usr_id," . PHP_EOL
369 . "prgrs.points," . PHP_EOL
370 . "prgrs.points_cur * ABS(prgrs.status - $accredited) /" . PHP_EOL
371 . " (GREATEST(ABS(prgrs.status - $accredited),1))" . PHP_EOL
372 . "+ prgrs.points * (1 - ABS(prgrs.status - $accredited) /" . PHP_EOL
373 . " (GREATEST(ABS(prgrs.status - $accredited),1))) AS points_current," . PHP_EOL
374 . "prgrs.last_change_by," . PHP_EOL
375 . "prgrs.status," . PHP_EOL
376 . "blngs.title AS belongs_to," . PHP_EOL
377 . "cmpl_usr.login AS accredited_by," . PHP_EOL
378 . "cmpl_obj.title AS completion_by," . PHP_EOL
379 . "cmpl_obj.type AS completion_by_type," . PHP_EOL
380 . "prgrs.completion_by AS completion_by_id," . PHP_EOL
381 . "prgrs.assignment_id AS assignment_id," . PHP_EOL
382 . "prgrs.completion_date," . PHP_EOL
383 . "prgrs.vq_date," . PHP_EOL
384 . "prgrs.deadline AS prg_deadline," . PHP_EOL
385 . "ass.root_prg_id AS root_prg_id," . PHP_EOL
386 . "ass.last_change AS prg_assign_date," . PHP_EOL
387 . "ass.last_change_by AS prg_assingment_origin," . PHP_EOL
388 . "ass_usr.login AS prg_assigned_by," . PHP_EOL
389 . "CONCAT(pcp.firstname, pcp.lastname) AS name," . PHP_EOL
390 . "(prgrs.last_change_by IS NOT NULL) AS custom_plan" . PHP_EOL
391 ;
392
393 $sql .= $this->getFrom();
394 $sql .= $this->getWhere($prg_id);
395 $sql .= $this->getFilterWhere($filter);
396 $sql .= $this->getOrguValidUsersFilter();
397
398 if ($limit !== null) {
399 $this->db->setLimit($limit, $offset !== null ? $offset : 0);
400 }
401
402 $res = $this->db->query($sql);
403 $now = (new DateTime())->format('Y-m-d H:i:s');
404 $members_list = array();
405
406
407 while ($rec = $this->db->fetchAssoc($res)) {
409 $prg_id,
410 $rec["root_prg_id"],
411 $rec["status"]
412 );
413
414 $rec['points_current'] = number_format($rec['points_current']);
415 if ($rec["status"] == ilStudyProgrammeProgress::STATUS_COMPLETED) {
416 //If the status completed is set by crs reference
417 //use crs title
418 if ($rec["completion_by_type"] == "crsr") {
419 $completion_id = $rec["completion_by_id"];
420 $title = ilContainerReference::_lookupTitle($completion_id);
421 $ref_id = ilContainerReference::_lookupTargetRefId($completion_id);
422 if (
423 ilObject::_exists($ref_id, true) &&
424 is_null(ilObject::_lookupDeletedDate($ref_id))
425 ) {
426 $url = ilLink::_getStaticLink($ref_id, "crs");
427 $link = $this->ui_factory->link()->standard($title, $url);
428 $rec["completion_by"] = $this->ui_renderer->render($link);
429 } else {
430 $rec["completion_by"] = $title;
431 }
432 }
433
434 // If the status completed and there is a non-null completion_by field
435 // in the set, this means the completion was achieved by some leaf in
436 // the program tree.
437 if (!$rec["completion_by"]) {
438 $prgrs = $this->sp_user_progress_db->getInstanceForAssignment(
439 $this->prg_obj_id,
440 $rec["assignment_id"]
441 );
442
443 $rec["completion_by"] = implode(
444 ", ",
445 $prgrs->getNamesOfCompletedOrAccreditedChildren()
446 );
447 }
448 // This case should only occur if the status completed is set
449 // by an already deleted crs.
450 if (!$rec["completion_by"]) {
451 $title = ilObjectDataDeletionLog::get($rec["completion_by_id"]);
452 if (!is_null($title["title"])) {
453 $rec["completion_by"] = $title["title"];
454 }
455 }
456 } elseif ($rec["status"] == ilStudyProgrammeProgress::STATUS_ACCREDITED) {
457 $rec["completion_by"] = $rec["accredited_by"];
458 }
459
460 if (!$rec['completion_date']) {
461 $rec['completion_date'] = '';
462 }
463
464 if ($rec['vq_date']) {
465 $rec['prg_validity'] = $this->lng->txt('prg_not_valid');
466 if ($rec["vq_date"] > $now) {
467 $rec['prg_validity'] = $this->lng->txt('prg_still_valid');
468 }
469 } else {
470 $rec['prg_validity'] = '';
471 $rec['vq_date'] = '';
472 }
473
474 $usr_id = (int) $rec['usr_id'];
475 $rec["orgus"] = ilObjUser::lookupOrgUnitsRepresentation($usr_id);
476 $members_list[] = $rec;
477 }
478
479 return $members_list;
480 }
481
485 protected function countFetchData(int $prg_id, array $filter = []) : int
486 {
487 // TODO: Reimplement this in terms of ActiveRecord when innerjoin
488 // supports the required rename functionality
489 $query = "SELECT count(prgrs.id) as cnt" . PHP_EOL;
490 $query .= $this->getFrom();
491 $query .= $this->getWhere($prg_id);
492 $query .= $this->getFilterWhere($filter);
493
494 $res = $this->db->query($query);
495 $rec = $this->db->fetchAssoc($res);
496
497 return $rec["cnt"];
498 }
499
500 protected function getFrom() : string
501 {
502 return
503 "FROM " . ilStudyProgrammeProgressDBRepository::TABLE . " prgrs" . PHP_EOL
504 . "JOIN usr_data pcp ON pcp.usr_id = prgrs.usr_id" . PHP_EOL
505 . "JOIN " . ilStudyProgrammeAssignmentDBRepository::TABLE . " ass" . PHP_EOL
506 . " ON ass.id = prgrs.assignment_id" . PHP_EOL
507 . "JOIN object_data blngs ON blngs.obj_id = ass.root_prg_id" . PHP_EOL
508 . "LEFT JOIN usr_data ass_usr ON ass_usr.usr_id = ass.last_change_by" . PHP_EOL
509 . "LEFT JOIN usr_data cmpl_usr ON cmpl_usr.usr_id = prgrs.completion_by" . PHP_EOL
510 . "LEFT JOIN object_data cmpl_obj ON cmpl_obj.obj_id = prgrs.completion_by" . PHP_EOL
511 ;
512 }
513
517 protected function getWhere(int $prg_id) : string
518 {
519 $q = "WHERE prgrs.prg_id = " . $this->db->quote($prg_id, "integer") . PHP_EOL;
520
521 if ($this->prg->getAccessControlByOrguPositionsGlobal() && !$this->parent_obj->mayManageMembers()) {
522 $visible = $this->getParentObject()->visibleUsers();
523 if (count($visible) > 0) {
524 $q .= " AND " . $this->db->in("prgrs.usr_id", $visible, false, "integer") . PHP_EOL;
525 } else {
526 $q .= " AND FALSE" . PHP_EOL;
527 }
528 }
529
530 return $q;
531 }
532
536 public function getSelectableColumns() : array
537 {
538 $cols = [];
539 foreach (self::COLUMNS as $column) {
540 list($col, $lng_var, $optional, $lp, $no_lp) = $column;
541 if ($optional) {
542 $cols[$col] = ["txt" => $this->lng->txt($lng_var)];
543 }
544 }
545
546 return $cols;
547 }
548
552 protected function addMultiCommands() : void
553 {
554 foreach ($this->getMultiCommands() as $cmd => $caption) {
555 $this->addMultiCommand($cmd, $caption);
556 }
557 }
558
564 protected function getMultiCommands() : array
565 {
566 $access_by_position = $this->isPermissionControlledByOrguPosition();
567 if ($access_by_position) {
568 $edit_individual_plan = count($this->getParentObject()->editIndividualPlan()) > 0;
569 $manage_members = count($this->getParentObject()->manageMembers()) > 0;
570 } else {
571 $edit_individual_plan = true;
572 $manage_members = true;
573 }
574
575 $perms = [];
576 if ($edit_individual_plan) {
577 $perms['markAccreditedMulti'] = $this->lng->txt('prg_multi_mark_accredited');
578 $perms['unmarkAccreditedMulti'] = $this->lng->txt('prg_multi_unmark_accredited');
579 }
580
581 if ($manage_members) {
582 $perms['removeUserMulti'] = $this->lng->txt('prg_multi_remove_user');
583 }
584 $perms = array_merge(
585 $perms,
586 [
587 'markRelevantMulti' => $this->lng->txt('prg_multi_mark_relevant'),
588 'markNotRelevantMulti' => $this->lng->txt('prg_multi_unmark_relevant'),
589 'updateFromCurrentPlanMulti' => $this->lng->txt('prg_multi_update_from_current_plan'),
590 'changeDeadlineMulti' => $this->lng->txt('prg_multi_change_deadline'),
591 'changeExpireDateMulti' => $this->lng->txt('prg_multi_change_expire_date')
592 ]
593 );
594
595 return $perms;
596 }
597
601 protected function getValidityOptions() : array
602 {
603 return [
604 self::VALIDITY_OPTION_VALID => $this->lng->txt("prg_still_valid"),
605 self::VALIDITY_OPTION_RENEWAL_REQUIRED => $this->lng->txt("prg_not_valid")
606 ];
607 }
608
612 protected function getStatusOptions() : array
613 {
614 return [
615 ilStudyProgrammeProgress::STATUS_IN_PROGRESS => $this->lng->txt("prg_status_in_progress"),
616 ilStudyProgrammeProgress::STATUS_COMPLETED => $this->lng->txt("prg_status_completed"),
617 ilStudyProgrammeProgress::STATUS_ACCREDITED => $this->lng->txt("prg_status_accredited"),
618 ilStudyProgrammeProgress::STATUS_NOT_RELEVANT => $this->lng->txt("prg_status_not_relevant"),
619 ilStudyProgrammeProgress::STATUS_FAILED => $this->lng->txt("prg_status_failed")
620 ];
621 }
622
626 public function initFilter() : void
627 {
628 $item = $this->addFilterItemByMetaType('prg_validity', self::FILTER_SELECT);
629 $item->setOptions(
630 [self::OPTION_ALL => $this->lng->txt("all")] + $this->getValidityOptions()
631 );
632
633 $item = $this->addFilterItemByMetaType('prg_status', self::FILTER_SELECT);
634 $item->setOptions(
635 [self::OPTION_ALL => $this->lng->txt("all")] + $this->getStatusOptions()
636 );
637
638 $this->addFilterItemByMetaType('name', self::FILTER_TEXT);
639 $this->addFilterItemByMetaType('prg_expiry_date', self::FILTER_DATE_RANGE);
640 }
641
645 protected function getFilterValues() : array
646 {
647 $f = [];
648 foreach ($this->filters as $item) {
649 $f[$item->getFieldId()] = $this->getFilterValue($item);
650 }
651 return $f;
652 }
653
657 protected function getFilterWhere(array $filter) : string
658 {
659 $buf = [''];
660
661 if (strlen($filter['name']) > 0) {
662 $name = substr($this->db->quote($filter['name'], "text"), 1, -1);
663 $name_filter =
664 'AND (' . PHP_EOL
665 . 'pcp.firstname LIKE \'%' . $name . '%\' OR' . PHP_EOL
666 . 'pcp.lastname LIKE \'%' . $name . '%\' OR' . PHP_EOL
667 . 'pcp.login LIKE \'%' . $name . '%\'' . PHP_EOL
668 . ')' . PHP_EOL
669 ;
670
671 $buf[] = $name_filter;
672 }
673
674 if ($filter['prg_status'] && (int) $filter['prg_status'] !== self::OPTION_ALL) {
675 $buf[] = 'AND prgrs.status = ' . $this->db->quote($filter['prg_status'], "integer");
676 }
677
678 if ($filter['prg_validity'] && (int) $filter['prg_validity'] !== self::OPTION_ALL) {
679 $operator = '<='; //self::VALIDITY_OPTION_RENEWAL_REQUIRED
680 if ((int) $filter['prg_validity'] === self::VALIDITY_OPTION_VALID) {
681 $operator = '>';
682 }
683 $buf[] = 'AND prgrs.vq_date ' . $operator . ' NOW()';
684 }
685
686 $exp_from = $filter['prg_expiry_date']['from'];
687 if (!is_null($exp_from)) {
688 $dat = $exp_from->get(IL_CAL_DATE);
689 $buf[] = 'AND prgrs.vq_date >= \'' . $dat . ' 00:00:00\'';
690 }
691
692 $exp_to = $filter['prg_expiry_date']['to'];
693 if (!is_null($exp_to)) {
694 $dat = $exp_to->get(IL_CAL_DATE);
695 $buf[] = 'AND prgrs.vq_date <= \'' . $dat . ' 23:59:59\'';
696 }
697
698 $conditions = implode(PHP_EOL, $buf);
699
700 return $conditions;
701 }
702
703
705 {
706 return (
707 $this->prg->getAccessControlByOrguPositionsGlobal()
708 ||
709 $this->prg->getPositionSettingsIsActiveForPrg()
710 );
711 }
712
713 protected function getOrguValidUsersFilter() : string
714 {
715 if ($this->getParentObject()->mayManageMembers()) {
716 return '';
717 }
718
719 $valid_user_ids = $this->position_based_access->getUsersInPrgAccessibleForOperation(
720 $this->getParentObject()->object,
722 );
723 if (count($valid_user_ids) < 1) {
724 return ' AND false';
725 }
726 return ' AND pcp.usr_id in ('
727 . implode(',', $valid_user_ids)
728 . ')';
729 }
730}
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_DATE
User interface class for advanced drop-down selection lists.
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
static _lookupTitle($a_obj_id)
Overwitten from base class.
@ilCtrl_Calls ilObjStudyProgrammeMembersGUI: ilStudyProgrammeRepositorySearchGUI @ilCtrl_Calls ilObjS...
static getInstanceByRefId($a_ref_id)
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupDeletedDate($a_ref_id)
only called in ilObjectGUI::insertSavedNodes
Class ilObjStudyProgrammeMembersTableGUI.
buildActionDropDown(array $actions, int $prgrs_id, int $ass_id, int $usr_id)
Builds the action menu for each row of the table.
getLinkTargetForAction(string $action, int $prgrs_id, int $ass_id)
Get ilias link for action.
fillRow($a_set)
Standard Version of Fill Row.
getFilterWhere(array $filter)
Get the additional sql WHERE-part for filters.
initFilter()
Init filter.Overwrite this to initialize all filter input property objects.
__construct(int $prg_obj_id, int $prg_ref_id, ilObjStudyProgrammeMembersGUI $parent_obj, string $parent_cmd='', string $template_context='', ilStudyProgrammeUserProgressDB $sp_user_progress_db, ilStudyProgrammePositionBasedAccess $position_based_access)
fetchData(int $prg_id, int $limit=null, int $offset=null, string $order_column=null, string $order_direction=null, array $filter=[])
Get data for table.
getValueOrEmptyString(string $condition, string $value)
getValidityOptions()
Get options of filter "validity".
countFetchData(int $prg_id, array $filter=[])
Get maximum number of rows the table could have.
Class ilStudyProgrammeProgress.
Storage implementation for ilStudyProgrammeUserProgress.
static getPossibleActions(int $node_id, int $root_prg_id, int $status)
Get a list with possible actions on a progress record.
Class ilTable2GUI.
getSelectedColumns()
Get selected columns.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setEnableHeader($a_enableheader)
Set Enable Header.
setExternalSorting($a_val)
Set external sorting.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
getParentObject()
Get parent object.
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
getLimit()
Get limit.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
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.
getOffset()
Get offset.
setExternalSegmentation($a_val)
Set external segmentation.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
determineLimit()
Determine the limit.
getOrderDirection()
Get order direction.
setMaxCount($a_max_count)
set max.
if($format !==null) $name
Definition: metadata.php:230
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$query
$url
foreach($_POST as $key=> $value) $res
$DIC
Definition: xapitoken.php:46
$cols
Definition: xhr_table.php:11