33 $this->
setId(
'myst_lu');
37 $this->
setRowTemplate(
'tpl.list_users_row.html',
"Services/MyStaff");
38 $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
72 $arr_usr_id = $this->access->getUsersForUser($DIC->user()->getId());
75 'filters' => $this->filter,
104 $item =
new ilTextInputGUI($DIC->language()->txt(
"login") .
"/" . $DIC->language()->txt(
"email") .
"/" . $DIC->language()
105 ->txt(
"name"),
"user");
110 $item->readFromSession();
111 $this->filter[
'user'] = $item->getValue();
118 $options[0] = $DIC->language()->txt(
'mst_opt_all');
122 $item =
new ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'),
'org_unit');
124 $item->addCustomAttribute(
"style='width:100%'");
126 $item->readFromSession();
127 $this->filter[
'org_unit'] = $item->getValue();
137 $arr_fields_without_table_sort = array(
140 'interests_help_offered',
141 'interests_help_looking',
146 if (!in_array(
$key, $arr_fields_without_table_sort)) {
169 if (isset($v[
'sort_field'])) {
170 $sort = $v[
'sort_field'];
174 $this->
addColumn($v[
'txt'], $sort, $v[
'width']);
179 $this->
addColumn($DIC->language()->txt(
'actions'));
191 $propGetter = Closure::bind(
function ($prop) {
193 }, $my_staff_user, $my_staff_user);
196 $this->tpl->setCurrentBlock(
'user_profile_picture');
197 $f = $DIC->ui()->factory();
198 $renderer = $DIC->ui()->renderer();
199 $il_obj_user = $my_staff_user->returnIlUserObj();
200 $avatar =
$f->image()->standard($il_obj_user->getPersonalPicturePath(
'small'), $il_obj_user->getPublicName());
201 $this->tpl->setVariable(
'user_profile_picture', $renderer->render($avatar));
202 $this->tpl->parseCurrentBlock();
208 $this->tpl->setCurrentBlock(
'td');
209 $this->tpl->setVariable(
'VALUE', strval(ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($my_staff_user->getUsrId())));
210 $this->tpl->parseCurrentBlock();
213 $this->tpl->setCurrentBlock(
'td');
214 $this->tpl->setVariable(
'VALUE', $DIC->language()->txt(
'gender_' . $my_staff_user->getGender()));
215 $this->tpl->parseCurrentBlock();
217 case 'interests_general':
218 $this->tpl->setCurrentBlock(
'td');
219 $this->tpl->setVariable(
'VALUE', ($my_staff_user->returnIlUserObj()
220 ->getGeneralInterestsAsText() ? $my_staff_user->returnIlUserObj()->getGeneralInterestsAsText() :
' '));
221 $this->tpl->parseCurrentBlock();
223 case 'interests_help_offered':
224 $this->tpl->setCurrentBlock(
'td');
225 $this->tpl->setVariable(
'VALUE', ($my_staff_user->returnIlUserObj()
226 ->getOfferingHelpAsText() ? $my_staff_user->returnIlUserObj()->getOfferingHelpAsText() :
' '));
227 $this->tpl->parseCurrentBlock();
229 case 'interests_help_looking':
230 $this->tpl->setCurrentBlock(
'td');
231 $this->tpl->setVariable(
'VALUE', ($my_staff_user->returnIlUserObj()
232 ->getLookingForHelpAsText() ? $my_staff_user->returnIlUserObj()->getLookingForHelpAsText() :
' '));
233 $this->tpl->parseCurrentBlock();
236 if ($propGetter($k) !== null) {
237 $this->tpl->setCurrentBlock(
'td');
238 $this->tpl->setVariable(
'VALUE', (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k)));
239 $this->tpl->parseCurrentBlock();
241 $this->tpl->setCurrentBlock(
'td');
242 $this->tpl->setVariable(
'VALUE',
' ');
243 $this->tpl->parseCurrentBlock();
251 $actions->setListTitle($DIC->language()->txt(
"actions"));
252 $actions->setAsynch(
true);
253 $actions->setId($my_staff_user->getUsrId());
255 $DIC->ctrl()->setParameterByClass(ilMStListUsersGUI::class,
'mst_lus_usr_id', $my_staff_user->getUsrId());
257 $actions->setAsynchUrl(str_replace(
"\\",
"\\\\", $DIC->ctrl()
259 $this->tpl->setVariable(
'ACTIONS', $actions->getHTML());
260 $this->tpl->parseCurrentBlock();
273 return rawurlencode($DIC->ctrl()->getLinkTargetByClass(strtolower(ilMyStaffGUI::class),
ilMyStaffGUI::CMD_INDEX));
286 $a_excel->
setCell($a_row, $col, $v);
299 $a_csv->addColumn($v);
314 $propGetter = Closure::bind(
function ($prop) {
316 }, $my_staff_user, $my_staff_user);
318 $field_values = array();
323 $field_values[$k] = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($my_staff_user->
getUsrId());
326 $field_values[$k] = $DIC->language()->txt(
'gender_' . $my_staff_user->
getGender());
328 case 'interests_general':
329 $field_values[$k] = $my_staff_user->
returnIlUserObj()->getGeneralInterestsAsText();
331 case 'interests_help_offered':
332 $field_values[$k] = $my_staff_user->
returnIlUserObj()->getOfferingHelpAsText();
334 case 'interests_help_looking':
335 $field_values[$k] = $my_staff_user->
returnIlUserObj()->getLookingForHelpAsText();
338 $field_values[$k] = strip_tags($propGetter($k));
343 return $field_values;
fillRowExcel(ilExcel $a_excel, &$a_row, $my_staff_user)
setExternalSorting($a_val)
Set external sorting.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setExportFormats(array $formats)
Set available export formats.
setEnableNumInfo($a_val)
Set enable num info.
setFilterCols($a_val)
Set filter columns.
setExternalSegmentation($a_val)
Set external segmentation.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
determineLimit()
Determine the limit.
static getData(array $arr_usr_ids=array(), array $options=array())
getOrderDirection()
Get order direction.
getFieldValuesForExport(ilMStListUser $my_staff_user)
Class ilMStListUsersTableGUI.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
__construct(ilMStListUsersGUI $parent_obj, $parent_cmd=ilMStListUsersGUI::CMD_INDEX)
getProfileBackUrl()
Get profile back url.
static getTextRepresentationOfOrgUnits($sort_by_title=true)
Get ref id path array.
static getSelectableColumnInfo($a_admin=false)
Get info of searchable fields for selectable columns in table gui.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
This class represents a text property in a property form.
getSelectedColumns()
Get selected columns.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
isColumnSelected($a_col)
Is given column selected?
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
User interface class for advanced drop-down selection lists.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setFormName($a_formname="")
Set Form name.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setMaxCount($a_max_count)
set max.
getExportMode()
Was export activated?
setEnableTitle($a_enabletitle)
Set Enable Title.
static _isEnabled($a_key)
fillRowCSV($a_csv, $my_staff_user)