42 $this->ui_fac = $this->dic->ui()->factory();
43 $this->ui_ren = $this->dic->ui()->renderer();
47 $this->
setId(
'myst_cs');
51 $this->
setRowTemplate(
'tpl.list_skills_row.html',
"Services/MyStaff");
52 $this->
setFormAction($this->dic->ctrl()->getFormAction($parent_obj));
81 'filters' => $this->
filter,
93 $skills_fetcher = new \ilMStListCompetencesSkills($this->dic);
94 $result = $skills_fetcher->getData($options);
96 $this->
setMaxCount($result->getTotalDatasetCount());
97 $data = $result->getDataset();
109 $item = new \ilTextInputGUI($this->dic->language()->txt(
"skmg_skill"),
'skill');
111 $item->readFromSession();
112 $this->
filter[
'skill'] = $item->getValue();
115 $item = new \ilTextInputGUI($this->dic->language()->txt(
"skmg_skill_level"),
'skill_level');
117 $item->readFromSession();
118 $this->
filter[
'skill_level'] = $item->getValue();
121 $item = new \ilTextInputGUI(
122 $this->dic->language()->txt(
"login") .
"/" . $this->dic->language()->txt(
"email") .
"/" . $this->dic->language()
128 $item->readFromSession();
129 $this->
filter[
'user'] = $item->getValue();
134 $options[0] = $this->dic->language()->txt(
'mst_opt_all');
135 foreach ($paths as $org_ref_id =>
$path) {
136 $options[$org_ref_id] =
$path;
138 $item = new \ilSelectInputGUI($this->dic->language()->txt(
'obj_orgu'),
'org_unit');
139 $item->setOptions($options);
141 $item->readFromSession();
142 $this->
filter[
'org_unit'] = $item->getValue();
148 if ($this->selectable_columns_cached) {
161 $cols[
'skill_title'] = array(
162 'txt' => $this->dic->language()->txt(
'skmg_skill'),
165 'sort_field' =>
'skill_title',
167 $cols[
'skill_level'] = array(
168 'txt' => $this->dic->language()->txt(
'skmg_skill_level'),
171 'sort_field' =>
'skill_level',
174 if ($arr_searchable_user_columns[
'login'] ??
false) {
175 $cols[
'login'] = array(
176 'txt' => $this->dic->language()->txt(
'login'),
179 'sort_field' =>
'login',
182 if ($arr_searchable_user_columns[
'firstname'] ??
false) {
183 $cols[
'first_name'] = array(
184 'txt' => $this->dic->language()->txt(
'firstname'),
187 'sort_field' =>
'firstname',
190 if ($arr_searchable_user_columns[
'lastname'] ??
false) {
191 $cols[
'last_name'] = array(
192 'txt' => $this->dic->language()->txt(
'lastname'),
195 'sort_field' =>
'lastname',
198 if ($arr_searchable_user_columns[
'email'] ??
false) {
199 $cols[
'email'] = array(
200 'txt' => $this->dic->language()->txt(
'email'),
203 'sort_field' =>
'email',
206 if ($arr_searchable_user_columns[
'org_units'] ??
false) {
207 $cols[
'usr_assinged_orgus'] = array(
208 'txt' => $this->dic->language()->txt(
'objs_orgu'),
221 $sort = $v[
'sort_field'] ??
"";
228 $this->
addColumn($this->dic->language()->txt(
'actions'));
234 if (isset($this->usr_orgu_names[$user_id])) {
235 return $this->usr_orgu_names[$user_id];
238 return $this->usr_orgu_names[$user_id] = \ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
244 final protected function fillRow(array $a_set): void
246 $set = array_pop($a_set);
248 $propGetter = \Closure::bind(
function ($prop) {
249 return $this->$prop ?? null;
254 case 'usr_assinged_orgus':
255 $this->tpl->setCurrentBlock(
'td');
256 $this->tpl->setVariable(
260 $this->tpl->parseCurrentBlock();
263 if ($propGetter($k) !== null) {
264 $this->tpl->setCurrentBlock(
'td');
265 $this->tpl->setVariable(
267 (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k))
269 $this->tpl->parseCurrentBlock();
271 $this->tpl->setCurrentBlock(
'td');
272 $this->tpl->setVariable(
'VALUE',
' ');
273 $this->tpl->parseCurrentBlock();
279 $mst_lcom_usr_id = $set->getUserId();
281 $this->dic->ctrl()->setParameterByClass(get_class($this->parent_obj),
'mst_lcom_usr_id', $mst_lcom_usr_id);
283 $buttons = \ilMyStaffGUI::extendActionMenuWithUserActions(
285 rawurlencode($this->dic->ctrl()->getLinkTargetByClass(
286 "ilMStListCompetencesSkillsGUI",
291 $dropdown = $this->ui_fac->dropdown()->standard(
$buttons)->withLabel($this->
lng->txt(
"actions"));
292 $this->tpl->setVariable(
"ACTIONS", $this->ui_ren->render($dropdown));
293 $this->tpl->parseCurrentBlock();
298 $set = array_pop($a_set);
302 $a_excel->
setCell($a_row, $col, $v);
309 $set = array_pop($a_set);
319 $propGetter = \Closure::bind(
function ($prop) {
320 return $this->$prop ?? null;
321 }, $selected_skill, $selected_skill);
323 $field_values = array();
326 case 'usr_assinged_orgus':
330 $field_values[$k] = strip_tags($propGetter($k) ??
"");
335 return $field_values;
ILIAS UI Renderer $ui_ren
setExportFormats(array $formats)
Set available export formats.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setEnableTitle(bool $a_enabletitle)
setDisableFilterHiding(bool $a_val=true)
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value.
setFormName(string $a_name="")
Customizing of pimple-DIC for ILIAS.
__construct(\ilMStListCompetencesSkillsGUI $parent_obj, string $parent_cmd, Container $dic)
static getTextRepresentationOfOrgUnits(bool $sort_by_title=true)
Get ref id path array.
setExternalSorting(bool $a_val)
isColumnSelected(string $col)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
getFieldValuesForExport(\ilMStListCompetencesSkill $selected_skill)
setDefaultOrderDirection(string $a_defaultorderdirection)
Class ilMStListCompetencesTableGUI.
getTextRepresentationOfUsersOrgUnits(int $user_id)
static getSelectableColumnInfo(bool $a_admin=false)
Get info of searchable fields for selectable columns in table gui.
setEnableNumInfo(bool $a_val)
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)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
array $selectable_columns_cached
static _isEnabled($a_key)
determineOffsetAndOrder(bool $a_omit_offset=false)
fillRowExcel(\ilExcel $a_excel, int &$a_row, array $a_set)
setMaxCount(int $a_max_count)
set max.
setFilterCols(int $a_val)
fillRowCSV(\ilCSVWriter $a_csv, array $a_set)
setExternalSegmentation(bool $a_val)
setPrefix(string $a_prefix)