41 $this->ui_fac = $this->dic->ui()->factory();
42 $this->ui_ren = $this->dic->ui()->renderer();
46 $this->
setId(
'myst_cs');
50 $this->
setRowTemplate(
'tpl.list_skills_row.html',
"components/ILIAS/MyStaff");
51 $this->
setFormAction($this->dic->ctrl()->getFormAction($parent_obj));
80 'filters' => $this->
filter,
92 $skills_fetcher = new \ilMStListCompetencesSkills($this->dic);
93 $result = $skills_fetcher->getData($options);
95 $this->
setMaxCount($result->getTotalDatasetCount());
96 $data = $result->getDataset();
108 $item = new \ilTextInputGUI($this->dic->language()->txt(
"skmg_skill"),
'skill');
110 $item->readFromSession();
111 $this->
filter[
'skill'] = $item->getValue();
114 $item = new \ilTextInputGUI($this->dic->language()->txt(
"skmg_skill_level"),
'skill_level');
116 $item->readFromSession();
117 $this->
filter[
'skill_level'] = $item->getValue();
120 $item = new \ilTextInputGUI(
121 $this->dic->language()->txt(
"login") .
"/" . $this->dic->language()->txt(
"email") .
"/" . $this->dic->language()
127 $item->readFromSession();
128 $this->
filter[
'user'] = $item->getValue();
133 $options[0] = $this->dic->language()->txt(
'mst_opt_all');
134 foreach ($paths as $org_ref_id =>
$path) {
135 $options[$org_ref_id] =
$path;
137 $item = new \ilSelectInputGUI($this->dic->language()->txt(
'obj_orgu'),
'org_unit');
138 $item->setOptions($options);
140 $item->readFromSession();
141 $this->
filter[
'org_unit'] = $item->getValue();
147 if ($this->selectable_columns_cached) {
160 $cols[
'skill_title'] = array(
161 'txt' => $this->dic->language()->txt(
'skmg_skill'),
164 'sort_field' =>
'skill_title',
166 $cols[
'skill_level'] = array(
167 'txt' => $this->dic->language()->txt(
'skmg_skill_level'),
170 'sort_field' =>
'skill_level',
173 if ($arr_searchable_user_columns[
'login'] ??
false) {
174 $cols[
'login'] = array(
175 'txt' => $this->dic->language()->txt(
'login'),
178 'sort_field' =>
'login',
181 if ($arr_searchable_user_columns[
'firstname'] ??
false) {
182 $cols[
'first_name'] = array(
183 'txt' => $this->dic->language()->txt(
'firstname'),
186 'sort_field' =>
'firstname',
189 if ($arr_searchable_user_columns[
'lastname'] ??
false) {
190 $cols[
'last_name'] = array(
191 'txt' => $this->dic->language()->txt(
'lastname'),
194 'sort_field' =>
'lastname',
197 if ($arr_searchable_user_columns[
'email'] ??
false) {
198 $cols[
'email'] = array(
199 'txt' => $this->dic->language()->txt(
'email'),
202 'sort_field' =>
'email',
205 if ($arr_searchable_user_columns[
'org_units'] ??
false) {
206 $cols[
'usr_assinged_orgus'] = array(
207 'txt' => $this->dic->language()->txt(
'objs_orgu'),
220 $sort = $v[
'sort_field'] ??
"";
227 $this->
addColumn($this->dic->language()->txt(
'actions'));
233 if (isset($this->usr_orgu_names[$user_id])) {
234 return $this->usr_orgu_names[
$user_id];
237 return $this->usr_orgu_names[
$user_id] = \ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
243 final protected function fillRow(array $a_set): void
245 $set = array_pop($a_set);
247 $propGetter = \Closure::bind(
function ($prop) {
248 return $this->$prop ??
null;
253 case 'usr_assinged_orgus':
254 $this->tpl->setCurrentBlock(
'td');
255 $this->tpl->setVariable(
259 $this->tpl->parseCurrentBlock();
262 if ($propGetter($k) !==
null) {
263 $this->tpl->setCurrentBlock(
'td');
264 $this->tpl->setVariable(
266 (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k))
268 $this->tpl->parseCurrentBlock();
270 $this->tpl->setCurrentBlock(
'td');
271 $this->tpl->setVariable(
'VALUE',
' ');
272 $this->tpl->parseCurrentBlock();
278 $mst_lcom_usr_id = $set->getUserId();
280 $this->dic->ctrl()->setParameterByClass(get_class($this->parent_obj),
'mst_lcom_usr_id', $mst_lcom_usr_id);
282 $buttons = \ilMyStaffGUI::extendActionMenuWithUserActions(
284 rawurlencode($this->dic->ctrl()->getLinkTargetByClass(
285 "ilMStListCompetencesSkillsGUI",
290 $dropdown = $this->ui_fac->dropdown()->standard(
$buttons)->withLabel($this->
lng->txt(
"actions"));
291 $this->tpl->setVariable(
"ACTIONS", $this->ui_ren->render($dropdown));
292 $this->tpl->parseCurrentBlock();
297 $set = array_pop($a_set);
301 $a_excel->
setCell($a_row, $col, $v);
308 $set = array_pop($a_set);
318 $propGetter = \Closure::bind(
function ($prop) {
319 return $this->$prop ??
null;
320 }, $selected_skill, $selected_skill);
322 $field_values = array();
325 case 'usr_assinged_orgus':
329 $field_values[$k] = strip_tags($propGetter($k) ??
"");
334 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)
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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setExternalSorting(bool $a_val)
isColumnSelected(string $col)
setCell(int $a_row, int $col, $value, ?string $datatype=null, bool $disable_strip_tags_for_strings=false)
Set cell value.
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)
__construct(Container $dic, ilPlugin $plugin)
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)