56 $this->
setId(
'myst_cs');
60 $this->
setRowTemplate(
'tpl.list_skills_row.html',
"Services/MyStaff");
61 $this->
setFormAction($this->dic->ctrl()->getFormAction($parent_obj));
90 'filters' => $this->
filter,
103 $result = $skills_fetcher->getData($options);
105 $this->
setMaxCount($result->getTotalDatasetCount());
106 $data = $result->getDataset();
118 $item =
new ilTextInputGUI($this->dic->language()->txt(
"skmg_skill"),
'skill');
120 $item->readFromSession();
121 $this->
filter[
'skill'] = $item->getValue();
124 $item =
new ilTextInputGUI($this->dic->language()->txt(
"skmg_skill_level"),
'skill_level');
126 $item->readFromSession();
127 $this->
filter[
'skill_level'] = $item->getValue();
131 $this->dic->language()->txt(
"login") .
"/" . $this->dic->language()->txt(
"email") .
"/" . $this->dic->language()
137 $item->readFromSession();
138 $this->
filter[
'user'] = $item->getValue();
143 $options[0] = $this->dic->language()->txt(
'mst_opt_all');
144 foreach ($paths as $org_ref_id =>
$path) {
145 $options[$org_ref_id] =
$path;
147 $item =
new ilSelectInputGUI($this->dic->language()->txt(
'obj_orgu'),
'org_unit');
148 $item->setOptions($options);
150 $item->readFromSession();
151 $this->
filter[
'org_unit'] = $item->getValue();
157 if ($this->selectable_columns_cached) {
170 $cols[
'skill_title'] = array(
171 'txt' => $this->dic->language()->txt(
'skmg_skill'),
174 'sort_field' =>
'skill_title',
176 $cols[
'skill_level'] = array(
177 'txt' => $this->dic->language()->txt(
'skmg_skill_level'),
180 'sort_field' =>
'skill_level',
183 if ($arr_searchable_user_columns[
'login'] ??
false) {
184 $cols[
'login'] = array(
185 'txt' => $this->dic->language()->txt(
'login'),
188 'sort_field' =>
'login',
191 if ($arr_searchable_user_columns[
'firstname'] ??
false) {
192 $cols[
'first_name'] = array(
193 'txt' => $this->dic->language()->txt(
'firstname'),
196 'sort_field' =>
'firstname',
199 if ($arr_searchable_user_columns[
'lastname'] ??
false) {
200 $cols[
'last_name'] = array(
201 'txt' => $this->dic->language()->txt(
'lastname'),
204 'sort_field' =>
'lastname',
207 if ($arr_searchable_user_columns[
'email'] ??
false) {
208 $cols[
'email'] = array(
209 'txt' => $this->dic->language()->txt(
'email'),
212 'sort_field' =>
'email',
215 if ($arr_searchable_user_columns[
'org_units'] ??
false) {
216 $cols[
'usr_assinged_orgus'] = array(
217 'txt' => $this->dic->language()->txt(
'objs_orgu'),
230 $sort = $v[
'sort_field'] ??
"";
237 $this->
addColumn($this->dic->language()->txt(
'actions'));
243 if (isset($this->usr_orgu_names[$user_id])) {
244 return $this->usr_orgu_names[$user_id];
247 return $this->usr_orgu_names[$user_id] = \ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
253 final protected function fillRow(array $a_set): void
255 $set = array_pop($a_set);
257 $propGetter = Closure::bind(
function ($prop) {
258 return $this->$prop ?? null;
263 case 'usr_assinged_orgus':
264 $this->tpl->setCurrentBlock(
'td');
265 $this->tpl->setVariable(
269 $this->tpl->parseCurrentBlock();
272 if ($propGetter($k) !== null) {
273 $this->tpl->setCurrentBlock(
'td');
274 $this->tpl->setVariable(
276 (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k))
278 $this->tpl->parseCurrentBlock();
280 $this->tpl->setCurrentBlock(
'td');
281 $this->tpl->setVariable(
'VALUE',
' ');
282 $this->tpl->parseCurrentBlock();
289 $actions->setListTitle($this->dic->language()->txt(
"actions"));
290 $actions->setId($set->getUserId() .
"-" . $set->getSkillNodeId());
292 $mst_lcom_usr_id = $set->getUserId();
294 $this->dic->ctrl()->setParameterByClass(get_class($this->parent_obj),
'mst_lcom_usr_id', $mst_lcom_usr_id);
296 $actions = \ilMyStaffGUI::extendActionMenuWithUserActions(
299 rawurlencode($this->dic->ctrl()->getLinkTargetByClass(
300 "ilMStListCompetencesSkillsGUI",
305 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
306 $this->tpl->parseCurrentBlock();
311 $set = array_pop($a_set);
315 $a_excel->
setCell($a_row, $col, $v);
322 $set = array_pop($a_set);
332 $propGetter = Closure::bind(
function ($prop) {
333 return $this->$prop ?? null;
334 }, $selected_skill, $selected_skill);
336 $field_values = array();
339 case 'usr_assinged_orgus':
343 $field_values[$k] = strip_tags($propGetter($k) ??
"");
348 return $field_values;
fillRowCSV(ilCSVWriter $a_csv, array $a_set)
setExportFormats(array $formats)
Set available export formats.
getFieldValuesForExport(ilMStListCompetencesSkill $selected_skill)
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setEnableTitle(bool $a_enabletitle)
__construct(ilMStListCompetencesSkillsGUI $parent_obj, string $parent_cmd, Container $dic)
setDisableFilterHiding(bool $a_val=true)
fillRowExcel(ilExcel $a_excel, int &$a_row, array $a_set)
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.
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...
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
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)
array $selectable_columns_cached
static _isEnabled($a_key)
determineOffsetAndOrder(bool $a_omit_offset=false)
setMaxCount(int $a_max_count)
set max.
setFilterCols(int $a_val)
setExternalSegmentation(bool $a_val)
setPrefix(string $a_prefix)