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',
"components/ILIAS/MyStaff");
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();
132 if (\ilUserSearchOptions::_isEnabled(
'org_units')) {
134 $options[0] = $this->dic->language()->txt(
'mst_opt_all');
135 foreach ($paths as $org_ref_id =>
$path) {
138 $item = new \ilSelectInputGUI($this->dic->language()->txt(
'obj_orgu'),
'org_unit');
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;
343 if (isset($col[
'sort_field']) && strtolower($col[
'sort_field']) === $raw) {
Customizing of pimple-DIC for ILIAS.
Class ilMStListCompetencesTableGUI.
fillRowCSV(\ilCSVWriter $a_csv, array $a_set)
ILIAS UI Renderer $ui_ren
getTextRepresentationOfUsersOrgUnits(int $user_id)
array $selectable_columns_cached
__construct(\ilMStListCompetencesSkillsGUI $parent_obj, string $parent_cmd, Container $dic)
fillRowExcel(\ilExcel $a_excel, int &$a_row, array $a_set)
getFieldValuesForExport(\ilMStListCompetencesSkill $selected_skill)
getSelectableColumns()
Get selectable columns.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setCell(int $a_row, int $col, $value, ?string $datatype=null)
Set cell value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getTextRepresentationOfOrgUnits(bool $sort_by_title=true)
Get ref id path array.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isColumnSelected(string $col)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableNumInfo(bool $a_val)
setExportFormats(array $formats)
Set available export formats.
setExternalSegmentation(bool $a_val)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setEnableTitle(bool $a_enabletitle)
setFormName(string $a_name="")
setPrefix(string $a_prefix)
set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort...
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)
setDefaultOrderField(string $a_defaultorderfield)
setDisableFilterHiding(bool $a_val=true)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setFilterCols(int $a_val)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
static getSelectableColumnInfo(bool $a_admin=false)
Get info of searchable fields for selectable columns in table gui.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
filter(string $filter_id, array $class_path, string $cmd, bool $activated=true, bool $expanded=true)