19 declare(strict_types=1);
39 protected int $prg_ref_id,
49 string $template_context =
'' 51 $this->
setId(
"sp_member_list_" . $prg_obj_id);
73 $this->
setRowTemplate(
"tpl.members_table_row.html",
"Modules/StudyProgramme");
82 if ($this->may_edit_anything) {
87 foreach ($this->prg_user_table->getColumns($prg_obj_id,
false, $this->prg->isCertificateActive()) as
$column) {
88 [$col, $lng_var, $optional, $lp, $no_lp] =
$column;
90 $show_by_lp = ($this->prg_has_lp_children && $lp) || (!$this->prg_has_lp_children && $no_lp);
91 $show_optional = !$optional || ($optional && array_key_exists($col, $selected));
93 if ($show_by_lp && $show_optional) {
109 $members_list = $this->prg_user_table->fetchData(
113 $this->custom_filter->withValues($filter_values),
118 $count = $this->prg_user_table->countFetchData(
121 $this->custom_filter->withValues($filter_values)
126 $progress_ids = array_map(
128 return (
string) $row->getId();
133 $parent_obj::F_ALL_PROGRESS_IDS,
134 implode(
',', $progress_ids)
151 return $this->data_factory->order($field, strtoupper($direction));
158 throw new \Exception(
"use ilStudyProgrammeUserTableRow for data output", 1);
161 if ($this->may_edit_anything) {
162 $this->tpl->setCurrentBlock(
"checkb");
163 $this->tpl->setVariable(
"ID", (
string) $row->getId());
164 $this->tpl->parseCurrentBlock();
167 if (!$row->isUserActiveRaw()) {
168 $this->tpl->setCurrentBlock(
'access_warning');
169 $this->tpl->setVariable(
'PARENT_ACCESS', $this->
lng->txt(
'usr_account_inactive'));
170 $this->tpl->parseCurrentBlock();
173 $this->tpl->setVariable(
"FIRSTNAME", $row->getFirstname());
174 $this->tpl->setVariable(
"LASTNAME", $row->getLastname());
175 $this->tpl->setVariable(
"LOGIN", $row->getLogin());
176 $this->tpl->setVariable(
"STATUS", $row->getStatus());
177 $this->tpl->setVariable(
"ASSIGN_DATE", $row->getAssignmentDate());
178 $this->tpl->setVariable(
"POINTS_REQUIRED", $row->getPointsRequired());
180 if (!$this->prg_has_lp_children) {
181 $this->tpl->setCurrentBlock(
"points_current");
182 $this->tpl->setVariable(
"POINTS_CURRENT", $row->getPointsCurrent());
183 $this->tpl->parseCurrentBlock();
189 $this->tpl->setVariable(
"ORGUS", $row->getOrgUs());
191 case "prg_completion_date":
192 $this->tpl->setVariable(
"COMPLETION_DATE", $row->getCompletionDate());
194 case "prg_completion_by":
195 $completion_by = $row->getCompletionBy();
196 if ($completion_by_obj_ids = $row->getCompletionByObjIds()) {
198 foreach ($completion_by_obj_ids as $completion_by_obj_id) {
200 if ($type ===
'crs') {
203 $target_obj_id = $completion_by_obj_id;
210 $completion_by = implode(
', ',
$out);
212 $this->tpl->setVariable(
"COMPLETION_BY", $completion_by);
214 case "prg_custom_plan":
215 $this->tpl->setVariable(
"CUSTOM_PLAN", $row->getCustomPlan());
217 case "prg_belongs_to":
218 $this->tpl->setVariable(
"BELONGS_TO", $row->getBelongsTo());
220 case "prg_expiry_date":
221 $this->tpl->setVariable(
"EXPIRY_DATE", $row->getExpiryDate());
223 case "prg_assigned_by":
224 $this->tpl->setVariable(
"ASSIGNED_BY", $row->getAssignmentBy());
227 $this->tpl->setVariable(
"DEADLINE", $row->getDeadline());
230 $this->tpl->setVariable(
"VALIDITY", $row->getValidity());
233 $this->tpl->setCurrentBlock(
'udf');
234 $this->tpl->setVariable(
"UDF", $row->getOrgUs());
235 $this->tpl->parseCurrentBlock();
238 $this->tpl->setCurrentBlock(
'udf');
239 $this->tpl->setVariable(
"UDF", $row->getGender());
240 $this->tpl->parseCurrentBlock();
242 case 'cert_relevance':
244 if ($row->getCertificateRelevance()) {
247 $this->tpl->setVariable(
"CERT_RELEVANCE", $cert);
250 $value = $row->getUserInformation()->getUserData($column) ??
'';
251 $this->tpl->setCurrentBlock(
'udf');
252 $this->tpl->setVariable(
"UDF", $value);
253 $this->tpl->parseCurrentBlock();
257 $row->isRootProgress(),
261 $this->tpl->setVariable(
265 (
string) $row->getId(),
266 $row->getAssignmentId()
282 foreach ($actions as $action) {
292 if (!$edit_individual_plan) {
297 if (!$view_individual_plan) {
303 if (!$addremove_users) {
310 $l[] = $this->ui_factory->button()->shy($this->
lng->txt(
"prg_$action"), $target);
312 return $this->ui_renderer->render(
313 $this->ui_factory->dropdown()->standard($l)
320 return $this->
getParentObject()->getLinkTargetForAction($action, $prgrs_id, $ass_id);
327 foreach ($this->prg_user_table->getColumns($this->prg_obj_id,
false, $this->prg->isCertificateActive()) as
$column) {
328 [$col, $lng_var, $optional, $lp, $no_lp] =
$column;
330 $cols[$col] = [
"txt" => $lng_var];
351 $permissions_for_edit_individual_plan = [
352 'updateFromCurrentPlanMulti' => $this->
lng->txt(
'prg_multi_update_from_current_plan'),
353 'acknowledgeCoursesMulti' => $this->
lng->txt(
'prg_acknowledge_completed_courses'),
354 'markRelevantMulti' => $this->
lng->txt(
'prg_multi_mark_relevant'),
355 'markNotRelevantMulti' => $this->
lng->txt(
'prg_multi_unmark_relevant'),
356 'changeDeadlineMulti' => $this->
lng->txt(
'prg_multi_change_deadline'),
357 'changeExpireDateMulti' => $this->
lng->txt(
'prg_multi_change_expire_date'),
358 'markAccreditedMulti' => $this->
lng->txt(
'prg_multi_mark_accredited'),
359 'unmarkAccreditedMulti' => $this->
lng->txt(
'prg_multi_unmark_accredited'),
361 if ($this->prg->isCertificateActive()) {
362 $permissions_for_edit_individual_plan[
'updateCertificateMulti'] = $this->
lng->txt(
'prg_multi_update_certificate');
363 $permissions_for_edit_individual_plan[
'removeCertificateMulti'] = $this->
lng->txt(
'prg_multi_remove_certificate');
366 $permissions_for_manage = [
367 'removeUserMulti' => $this->
lng->txt(
'prg_multi_remove_user'),
368 'mailUserMulti' => $this->
lng->txt(
'prg_multi_mail_user')
374 $perms = array_merge($perms, $permissions_for_edit_individual_plan);
378 $perms = array_merge($perms, $permissions_for_manage);
389 foreach ($this->custom_filter->getItemConfig() as $conf) {
390 [
$id, $type, $options, $caption] = $conf;
393 $item->setOptions($options);
405 foreach ($this->filters as $item) {
449 && $this->prg->isCertificateActive()
461 if ($this->permissions->may($this->permissions::ROLEPERM_MANAGE_MEMBERS)) {
466 array_unshift($valid_user_ids, $this->
user->getId());
467 return $valid_user_ids;
474 foreach ($ref_ids as
$ref_id) {
477 $link = $this->ui_renderer->render($this->ui_factory->link()->standard($title,
$url));
485 $this->
ctrl->setParameter($this->parent_obj,
'cert_usr_id', $usr_id);
486 $cert_url = $this->
ctrl->getLinkTarget($this->parent_obj,
'deliverCertificate');
487 $this->
ctrl->setParameter($this->parent_obj,
'cert_usr_id', null);
488 $icon = $this->ui_renderer->render(
489 $this->ui_factory->symbol()->icon()->standard(
'cert',
'relevant',
'small')
491 $link = $this->ui_factory->link()->standard(
$icon, $cert_url);
492 return $this->ui_renderer->render($link);
ilStudyProgrammeUserTable provides a flattened list of progresses at a programme-node.
const OP_VIEW_INDIVIDUAL_PLAN
getStudyProgramme(int $ref_id=null)
Get studyprogramm object for ref_id Use this ref_id if argument is null.
const ACTION_UPDATE_FROM_CURRENT_PLAN
setTopCommands(bool $a_val)
const ACTION_REMOVE_CERTIFICATE
const ACTION_UNMARK_RELEVANT
getLinkTargetForAction(string $action, string $prgrs_id, int $ass_id)
ILIAS UI Renderer $ui_renderer
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
Data Factory $data_factory
Class ChatMainBarProvider .
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
static _getAllReferences(int $id)
get all reference ids for object ID
getPossibleActions(bool $is_root, int $status)
Get a list with possible actions on a progress record.
static getInstanceByRefId($ref_id)
const ACTION_MARK_RELEVANT
static lookupTitle(int $obj_id)
getFilterValue(ilTableFilterItem $a_item)
Get current filter value.
Both the subject and the direction need to be specified when expressing an order. ...
const ACTION_CHANGE_DEADLINE
const OP_EDIT_INDIVIDUAL_PLAN
bool $prg_has_lp_children
const ACTION_CHANGE_EXPIRE_DATE
getDefaultOrderDirection()
setExternalSorting(bool $a_val)
buildActionDropDown(array $actions, string $prgrs_id, int $ass_id)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
addFilterItemByMetaType(string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
Add filter by standard type.
addHiddenInput(string $a_name, string $a_value)
const ACTION_MARK_ACCREDITED
setDefaultOrderField(string $a_defaultorderfield)
const ACTION_ACKNOWLEDGE_COURSES
getFilterValues()
Get filter-values by field id.
ilPRGAssignmentFilter $custom_filter
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
const ACTION_SHOW_INDIVIDUAL_PLAN
mayAnyOf(array $operations)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
static _isInTrash(int $ref_id)
const ACTION_UPDATE_CERTIFICATE
getCertificateLink(int $usr_id)
__construct(int $prg_obj_id, protected int $prg_ref_id, ilObjStudyProgrammeMembersGUI $parent_obj, ilPRGPermissionsHelper $permissions, Data\Factory $data_factory, ILIAS\UI\Factory $ui_factory, ILIAS\UI\Renderer $ui_renderer, ilStudyProgrammeUserTable $prg_user_table, ilPRGAssignmentFilter $custom_filter, ilObjUser $user, string $parent_cmd='', string $template_context='')
setDefaultOrderDirection(string $a_defaultorderdirection)
ilPRGPermissionsHelper $permissions
ilObjStudyProgrammeMembersGUI: ilStudyProgrammeRepositorySearchGUI ilObjStudyProgrammeMembersGUI: il...
setEnableAllCommand(bool $a_value)
ilStudyProgrammeUserTable $prg_user_table
const STATUS_NOT_RELEVANT
const ACTION_UNMARK_ACCREDITED
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilStudyProgrammeUserTable provides a flattened list of progresses at a programme-node.
getCompletionLink(int $target_obj_id, string $title)
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)
getCurrentState()
get current settings for order, limit, columns and filter
ILIAS UI Factory $ui_factory
static _lookupType(int $id, bool $reference=false)
addMultiCommand(string $a_cmd, string $a_text)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMultiCommands()
Get possible multicommands.
setExternalSegmentation(bool $a_val)