ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilCourseParticipantsTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=0);
4 
26 {
27  protected bool $show_learning_progress = false;
28  protected bool $show_timings = false;
29  protected bool $show_lp_status_sync = false;
30 
33 
36  protected ilObjUser $user;
37  protected array $cached_user_names = [];
38 
39  public function __construct(
40  object $a_parent_obj,
42  bool $a_show_learning_progress = false,
43  bool $a_show_timings = false,
44  bool $a_show_lp_status_sync = false,
45  ilCertificateUserForObjectPreloader $preloader = null
46  ) {
47  global $DIC;
48 
49  $this->show_learning_progress = $a_show_learning_progress;
50 
51  if (null === $preloader) {
52  $preloader = new ilCertificateUserForObjectPreloader(
55  );
56  }
57  $this->preLoader = $preloader;
58  $this->show_timings = $a_show_timings;
59  $this->show_lp_status_sync = $a_show_lp_status_sync;
60  $this->rep_object = $rep_object;
61 
63  $this->show_lp_status_sync = false;
64  }
65  $this->privacy = ilPrivacySettings::getInstance();
66  $this->access = $DIC->access();
67  $this->participants = ilParticipants::getInstanceByObjId($this->getRepositoryObject()->getId());
68  $this->rbacReview = $DIC->rbac()->review();
69  $this->user = $DIC->user();
70 
71  $this->setId('crs_' . $this->getRepositoryObject()->getId());
72  parent::__construct($a_parent_obj, 'participants');
73 
74  $this->lng->loadLanguageModule('crs');
75  $this->lng->loadLanguageModule('trac');
76  $this->lng->loadLanguageModule('rbac');
77  $this->lng->loadLanguageModule('mmbr');
78  $this->lng->loadLanguageModule('cert');
79  $this->lng->loadLanguageModule('certificate');
80 
81  $this->initSettings();
82 
83  $this->setFormName('participants');
84 
85  $this->addColumn('', 'f', '1', true);
86  $this->addColumn($this->lng->txt('name'), 'name', '20%');
87 
88  $all_cols = $this->getSelectableColumns();
89  foreach ($this->getSelectedColumns() as $col) {
90  $this->addColumn($all_cols[$col]['txt'], $col);
91  }
92 
93  if ($this->show_learning_progress) {
94  $this->addColumn($this->lng->txt('learning_progress'), 'progress');
95  }
96 
97  if ($this->privacy->enabledCourseAccessTimes()) {
98  $this->addColumn($this->lng->txt('last_access'), 'access_ut', '16em');
99  }
100 
101  $this->addColumn($this->lng->txt('crs_member_passed'), 'passed');
102  if ($this->show_lp_status_sync) {
103  $this->addColumn($this->lng->txt('crs_member_passed_status_changed'), 'passed_timestamp');
104  }
105 
106  $this->setSelectAllCheckbox('participants', true);
107  $this->addColumn($this->lng->txt('crs_mem_contact'), 'contact');
108  $this->addColumn($this->lng->txt('crs_blocked'), 'blocked');
109  $this->addColumn($this->lng->txt('crs_notification_list_title'), 'notification');
110 
111  $this->addColumn($this->lng->txt('actions'), 'optional', '', false, 'ilMembershipRowActionsHeader');
112 
113  $this->setRowTemplate("tpl.show_participants_row.html", "Modules/Course");
114 
115  $this->setDefaultOrderField('roles');
116  $this->enable('sort');
117  $this->enable('header');
118  $this->enable('numinfo');
119  $this->enable('select_all');
120 
121  $this->setEnableNumInfo(true);
122  $this->setExternalSegmentation(false);
123  $this->setTopCommands(true);
124  $this->setEnableHeader(true);
125  $this->setEnableTitle(true);
126  $this->initFilter();
127 
128  $this->setShowRowsSelector(true);
129 
130  $preloader->preLoadDownloadableCertificates($this->getRepositoryObject()->getId());
131  $this->addMultiCommand('editParticipants', $this->lng->txt('edit'));
132  $this->addMultiCommand('confirmDeleteParticipants', $this->lng->txt('remove'));
133  $this->addMultiCommand('sendMailToSelectedUsers', $this->lng->txt('mmbr_btn_mail_selected_users'));
134  $this->lng->loadLanguageModule('user');
135  $this->addMultiCommand('addToClipboard', $this->lng->txt('clipboard_add_btn'));
136 
137  $this->addCommandButton('updateParticipantsStatus', $this->lng->txt('save'));
138  }
139 
140  protected function fillRow(array $a_set): void
141  {
142  $this->tpl->setVariable('VAL_ID', $a_set['usr_id']);
143  $this->tpl->setVariable('VAL_NAME', $a_set['lastname'] . ', ' . $a_set['firstname']);
144  $this->tpl->setVariable('SELECT_PARTICIPANT', $this->lng->txt("select") . ' ' . $a_set['lastname'] . ', ' . $a_set['firstname']);
145 
146  if (
147  !$this->access->checkAccessOfUser($a_set['usr_id'], 'read', '', $this->getRepositoryObject()->getRefId()) &&
148  is_array($info = $this->access->getInfo())
149  ) {
150  $this->tpl->setCurrentBlock('access_warning');
151  $this->tpl->setVariable('PARENT_ACCESS', $info[0]['text']);
152  $this->tpl->parseCurrentBlock();
153  }
154 
155  if (!$a_set['active']) {
156  $this->tpl->setCurrentBlock('access_warning');
157  $this->tpl->setVariable('PARENT_ACCESS', $this->lng->txt('usr_account_inactive'));
158  $this->tpl->parseCurrentBlock();
159  }
160 
161  foreach ($this->getSelectedColumns() as $field) {
162  switch ($field) {
163  case 'gender':
164  $a_set['gender'] = ($a_set['gender'] ?? '') ? $this->lng->txt('gender_' . $a_set['gender']) : '';
165  $this->tpl->setCurrentBlock('custom_fields');
166  $this->tpl->setVariable('VAL_CUST', $a_set[$field]);
167  $this->tpl->parseCurrentBlock();
168  break;
169 
170  case 'birthday':
171  $a_set['birthday'] = ($a_set['birthday'] ?? false) ? ilDatePresentation::formatDate(new ilDate(
172  $a_set['birthday'],
174  )) : $this->lng->txt('no_date');
175  $this->tpl->setCurrentBlock('custom_fields');
176  $this->tpl->setVariable('VAL_CUST', $a_set[$field]);
177  $this->tpl->parseCurrentBlock();
178  break;
179 
180  case 'consultation_hour':
181  $this->tpl->setCurrentBlock('custom_fields');
182  $dts = array();
183  foreach ((array) ($a_set['consultation_hours'] ?? []) as $ch) {
185  new ilDateTime($ch['dt'], IL_CAL_UNIX),
186  new ilDateTime($ch['dtend'], IL_CAL_UNIX)
187  );
188  if ($ch['explanation']) {
189  $tmp .= ' ' . $ch['explanation'];
190  }
191  $dts[] = $tmp;
192  }
193  $dt_string = implode('<br />', $dts);
194  $this->tpl->setVariable('VAL_CUST', $dt_string);
195  $this->tpl->parseCurrentBlock();
196  break;
197 
198  case 'prtf':
199  $tmp = array();
200  if (is_array($a_set['prtf'])) {
201  foreach ($a_set['prtf'] as $prtf_url => $prtf_txt) {
202  $tmp[] = '<a href="' . $prtf_url . '">' . $prtf_txt . '</a>';
203  }
204  }
205  $this->tpl->setCurrentBlock('custom_fields');
206  $this->tpl->setVariable('VAL_CUST', implode('<br />', $tmp));
207  $this->tpl->parseCurrentBlock();
208  break;
209 
210  case 'odf_last_update':
211  $this->tpl->setCurrentBlock('custom_fields');
212  $this->tpl->setVariable('VAL_CUST', (string) ($a_set['odf_info_txt'] ?? ''));
213  $this->tpl->parseCurrentBlock();
214  break;
215 
216  case 'roles':
217  $this->tpl->setCurrentBlock('custom_fields');
218  $this->tpl->setVariable('VAL_CUST', (string) ($a_set['roles_label'] ?? ''));
219  $this->tpl->parseCurrentBlock();
220  break;
221 
222  case 'org_units':
223  $this->tpl->setCurrentBlock('custom_fields');
224  $this->tpl->setVariable(
225  'VAL_CUST',
226  ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((int) $a_set['usr_id'])
227  );
228  $this->tpl->parseCurrentBlock();
229  break;
230 
231  default:
232  $this->tpl->setCurrentBlock('custom_fields');
233  $this->tpl->setVariable('VAL_CUST', isset($a_set[$field]) ? (string) $a_set[$field] : '');
234  $this->tpl->parseCurrentBlock();
235  break;
236  }
237  }
238 
239  if ($this->privacy->enabledCourseAccessTimes()) {
240  $this->tpl->setVariable('VAL_ACCESS', $a_set['access_time']);
241  }
242  if ($this->show_learning_progress) {
243  $this->tpl->setCurrentBlock('lp');
245  $icon_rendered = $icons->renderIconForStatus($icons->lookupNumStatus($a_set['progress']));
246 
247  $this->tpl->setVariable('LP_STATUS_ALT', $this->lng->txt($a_set['progress']));
248  $this->tpl->setVariable('LP_STATUS_ICON', $icon_rendered);
249 
250  $this->tpl->parseCurrentBlock();
251  }
252 
253  $this->tpl->setVariable('VAL_POSTNAME', 'participants');
254 
255  if ($this->access->checkAccess("grade", "", $this->rep_object->getRefId())) {
256  $this->tpl->setCurrentBlock('grade');
257  $this->tpl->setVariable('VAL_PASSED_ID', $a_set['usr_id']);
258  $this->tpl->setVariable('VAL_PASSED_CHECKED', ($a_set['passed'] ? 'checked="checked"' : ''));
259  $this->tpl->setVariable('PASSED_TITLE', $this->lng->txt('crs_member_passed'));
260  $this->tpl->parseCurrentBlock();
261  } else {
262  $this->tpl->setVariable('VAL_PASSED_TXT', ($a_set['passed']
263  ? $this->lng->txt("yes")
264  : $this->lng->txt("no")));
265  }
266 
267  if (
268  $this->getParticipants()->isAdmin($a_set['usr_id']) ||
269  $this->getParticipants()->isTutor($a_set['usr_id'])
270  ) {
271  // cognos-blu-patch: begin
272  $this->tpl->setCurrentBlock('with_contact');
273  $this->tpl->setVariable('VAL_CONTACT_ID', $a_set['usr_id']);
274  $this->tpl->setVariable('VAL_CONTACT_CHECKED', $a_set['contact'] ? 'checked="checked"' : '');
275  $this->tpl->setVariable('CONTACT_TITLE', $this->lng->txt('crs_mem_contact'));
276  $this->tpl->parseCurrentBlock();
277  // cognos-blu-patch: end
278 
279  $this->tpl->setCurrentBlock('with_notification');
280  $this->tpl->setVariable('VAL_NOTIFICATION_ID', $a_set['usr_id']);
281  $this->tpl->setVariable('VAL_NOTIFICATION_CHECKED', ($a_set['notification'] ? 'checked="checked"' : ''));
282  $this->tpl->setVariable('NOTIFICATION_TITLE', $this->lng->txt('crs_notification_list_title'));
283  $this->tpl->parseCurrentBlock();
284  }
285 
286  // blocked only for real members
287  if (
288  !$this->getParticipants()->isAdmin($a_set['usr_id']) &&
289  !$this->getParticipants()->isTutor($a_set['usr_id'])
290  ) {
291  $this->tpl->setCurrentBlock('with_blocked');
292  $this->tpl->setVariable('VAL_BLOCKED_ID', $a_set['usr_id']);
293  $this->tpl->setVariable('VAL_BLOCKED_CHECKED', ($a_set['blocked'] ? 'checked="checked"' : ''));
294  $this->tpl->setVariable('BLOCKED_TITLE', $this->lng->txt('crs_blocked'));
295  $this->tpl->parseCurrentBlock();
296  }
297 
298  if ($this->show_lp_status_sync) {
299  $this->tpl->setVariable('PASSED_INFO', $a_set["passed_info"]);
300  }
301 
302  $this->showActionLinks($a_set);
303 
304  $isPreloaded = $this->preLoader->isPreloaded($this->getRepositoryObject()->getId(), $a_set['usr_id']);
305  if ($isPreloaded) {
306  $this->tpl->setCurrentBlock('link');
307  $this->tpl->setVariable('LINK_NAME', $this->ctrl->getLinkTarget($this->parent_obj, 'deliverCertificate'));
308  $this->tpl->setVariable('LINK_TXT', $this->lng->txt('download_certificate'));
309  $this->tpl->parseCurrentBlock();
310  }
311  $this->ctrl->clearParameters($this->parent_obj);
312 
313  if ($this->show_timings) {
314  $this->ctrl->setParameterByClass('ilcoursecontentgui', 'member_id', $a_set['usr_id']);
315  $this->tpl->setCurrentBlock('link');
316  $this->tpl->setVariable(
317  'LINK_NAME',
318  $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'showUserTimings')
319  );
320  $this->tpl->setVariable('LINK_TXT', $this->lng->txt('timings_timings'));
321  $this->tpl->parseCurrentBlock();
322  }
323  }
324 
325  public function parse(): void
326  {
327  $this->determineOffsetAndOrder(true);
328 
329  $additional_fields = $this->getSelectedColumns();
330  unset($additional_fields["firstname"]);
331  unset($additional_fields["lastname"]);
332  unset($additional_fields["last_login"]);
333  unset($additional_fields["access_until"]);
334  unset($additional_fields['consultation_hour']);
335  unset($additional_fields['prtf']);
336  unset($additional_fields['roles']);
337  unset($additional_fields['org_units']);
338 
339  $part = $this->participants->getParticipants();
340 
341  $part = $this->access->filterUserIdsByRbacOrPositionOfCurrentUser(
342  'manage_members',
343  'manage_members',
344  $this->getRepositoryObject()->getRefId(),
345  $part
346  );
347 
348  if ($part === []) {
349  $this->setData(array());
350  return;
351  }
352 
353  $udf_ids = $usr_data_fields = $odf_ids = array();
354  foreach ($additional_fields as $field) {
355  if (substr($field, 0, 3) == 'udf') {
356  $udf_ids[] = substr($field, 4);
357  continue;
358  }
359  if (substr($field, 0, 3) == 'odf') {
360  $odf_ids[] = substr($field, 4);
361  continue;
362  }
363 
364  $usr_data_fields[] = $field;
365  }
366 
367  $usr_data = ilUserQuery::getUserListData(
368  '',
369  '',
370  0,
371  9999,
372  $this->current_filter['login'],
373  '',
374  null,
375  false,
376  false,
377  0,
378  0,
379  null,
380  $usr_data_fields,
381  $part
382  );
383  // filter by array
384  $usr_ids = array();
385  $local_roles = $this->getParentObject()->getLocalRoles();
386  foreach ((array) $usr_data['set'] as $user) {
387  if ($this->current_filter['roles'] ?? false) {
388  if (!$this->rbacReview->isAssigned($user['usr_id'], $this->current_filter['roles'])) {
389  continue;
390  }
391  }
392  if ($this->current_filter['org_units'] ?? false) {
393  $org_unit = $this->current_filter['org_units'];
394 
395  $assigned = ilObjOrgUnitTree::_getInstance()->getOrgUnitOfUser($user['usr_id']);
396  if (!in_array($org_unit, $assigned)) {
397  continue;
398  }
399  }
400 
401  $usr_ids[] = $user['usr_id'];
402  }
403 
404  // merge course data
405  $course_user_data = $this->getParentObject()->readMemberData(
406  $usr_ids,
407  $this->getSelectedColumns(),
408  true
409  );
410  $a_user_data = array();
411  foreach ((array) $usr_data['set'] as $ud) {
412  $user_id = (int) $ud['usr_id'];
413 
414  if (!in_array($user_id, $usr_ids)) {
415  continue;
416  }
417  // #15434
418  if (!$this->checkAcceptance($user_id)) {
419  $ud = [
420  'active' => $ud['active'],
421  'firstname' => $ud['firstname'],
422  'lastname' => $ud['lastname'],
423  'login' => $ud['login']
424  ];
425  }
426 
427  $a_user_data[$user_id] = array_merge($ud, $course_user_data[$user_id]);
428 
429  $roles = array();
430  foreach ($local_roles as $role_id => $role_name) {
431  // @todo fix performance
432  if ($this->rbacReview->isAssigned($user_id, $role_id)) {
433  $roles[] = $role_name;
434  }
435  }
436 
437  $a_user_data[$user_id]['name'] = ($a_user_data[$user_id]['lastname'] . ', ' . $a_user_data[$user_id]['firstname']);
438  $a_user_data[$user_id]['roles_label'] = implode('<br />', $roles);
439  $a_user_data[$user_id]['roles'] = $this->participants->setRoleOrderPosition($user_id);
440 
441  if ($this->show_lp_status_sync) {
442  // #9912 / #13208
443  $passed_info = "";
444  $passed_timestamp = '';
445  if ($a_user_data[$user_id]["passed_info"]) {
446  $pinfo = $a_user_data[$user_id]["passed_info"];
447  if ($pinfo["user_id"]) {
448  if ($pinfo["user_id"] < 0) {
449  $passed_info = $this->lng->txt("crs_passed_status_system");
450  } elseif ($pinfo["user_id"] > 0) {
451  $name = $this->lookupUserName((int) $pinfo["user_id"]);
452  $passed_info = $this->lng->txt("crs_passed_status_manual_by") . ": " . $name["login"];
453  }
454  }
455  if ($pinfo["timestamp"]) {
456  $passed_info .= "<br />" . ilDatePresentation::formatDate($pinfo["timestamp"]);
457  $passed_timestamp = $pinfo["timestamp"];
458  }
459  }
460  $a_user_data[$user_id]["passed_info"] = $passed_info;
461  $a_user_data[$user_id]["passed_timestamp"] = $passed_timestamp;
462  }
463  }
464 
465  // Custom user data fields
466  if ($udf_ids !== []) {
467  $data = ilUserDefinedData::lookupData($usr_ids, $udf_ids);
468  foreach ($data as $usr_id => $fields) {
469  if (!$this->checkAcceptance((int) $usr_id)) {
470  continue;
471  }
472 
473  foreach ($fields as $field_id => $value) {
474  $a_user_data[$usr_id]['udf_' . $field_id] = $value;
475  }
476  }
477  }
478  // Object specific user data fields
479  if ($odf_ids !== []) {
481  foreach ($data as $usr_id => $fields) {
482  $usr_id = (int) $usr_id;
483  // #7264: as we get data for all course members filter against user data
484  if (!$this->checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) {
485  continue;
486  }
487 
488  foreach ($fields as $field_id => $value) {
489  $a_user_data[$usr_id]['odf_' . $field_id] = $value;
490  }
491  }
492 
493  // add last edit date
494  foreach (ilObjectCustomUserFieldHistory::lookupEntriesByObjectId($this->getRepositoryObject()->getId()) as $usr_id => $edit_info) {
495  if (!isset($a_user_data[$usr_id])) {
496  continue;
497  }
498 
499  if ($usr_id == $edit_info['update_user']) {
500  $a_user_data[$usr_id]['odf_last_update'] = '';
501  $a_user_data[$usr_id]['odf_info_txt'] = $this->lng->txt('cdf_edited_by_self');
502  if (ilPrivacySettings::getInstance()->enabledAccessTimesByType($this->getRepositoryObject()->getType())) {
503  $a_user_data[$usr_id]['odf_last_update'] .= ('_' . $edit_info['editing_time']->get(IL_CAL_UNIX));
504  $a_user_data[$usr_id]['odf_info_txt'] .= (', ' . ilDatePresentation::formatDate($edit_info['editing_time']));
505  }
506  } else {
507  $a_user_data[$usr_id]['odf_last_update'] = $edit_info['update_user'];
508  $a_user_data[$usr_id]['odf_last_update'] .= ('_' . $edit_info['editing_time']->get(IL_CAL_UNIX));
509 
510  $name = $this->lookupUserName((int) $edit_info['update_user']);
511  $a_user_data[$usr_id]['odf_info_txt'] = ($name['firstname'] . ' ' . $name['lastname'] . ', ' . ilDatePresentation::formatDate($edit_info['editing_time']));
512  }
513  }
514  }
515 
516  // consultation hours
517  if ($this->isColumnSelected('consultation_hour')) {
519  $this->getRepositoryObject()->getId(),
520  $this->user->getId()
521  ) as $buser => $booking) {
522  if (isset($a_user_data[$buser])) {
523  $a_user_data[$buser]['consultation_hour'] = $booking[0]['dt'];
524  $a_user_data[$buser]['consultation_hour_end'] = $booking[0]['dtend'];
525  $a_user_data[$buser]['consultation_hours'] = $booking;
526  }
527  }
528  }
529 
530  // always sort by name first
531  $a_user_data = ilArrayUtil::sortArray(
532  $a_user_data,
533  'name',
534  $this->getOrderDirection()
535  );
536  $this->setData($a_user_data);
537  }
538 
542  protected function lookupUserName(int $user_id): array
543  {
544  if (isset($this->cached_user_names[$user_id])) {
545  return $this->cached_user_names[$user_id];
546  }
547  return $this->cached_user_names[$user_id] = ilObjUser::_lookupName($user_id);
548  }
549 }
static lookupData(array $a_user_ids, array $a_field_ids)
Lookup data.
setData(array $a_data)
setTopCommands(bool $a_val)
enable(string $a_module_name)
setEnableTitle(bool $a_enabletitle)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
static _getValuesByObjId(int $a_obj_id)
static _lookupName(int $a_user_id)
lookup user name
const IL_CAL_UNIX
setFormName(string $a_name="")
setId(string $a_val)
ilCertificateUserForObjectPreloader $preLoader
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247
isColumnSelected(string $col)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setDefaultOrderField(string $a_defaultorderfield)
Singleton class that stores all privacy settings.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupManagedBookingsForObject(int $a_obj_id, int $a_usr_id)
Lookup bookings for own and managed consultation hours of an object.
const IL_CAL_DATE
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
setEnableNumInfo(bool $a_val)
__construct(Container $dic, ilPlugin $plugin)
__construct(object $a_parent_obj, ilObject $rep_object, bool $a_show_learning_progress=false, bool $a_show_timings=false, bool $a_show_lp_status_sync=false, ilCertificateUserForObjectPreloader $preloader=null)
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)
static getUserListData(string $a_order_field, string $a_order_dir, int $a_offset, int $a_limit, string $a_string_filter="", string $a_activation_filter="", ?ilDateTime $a_last_login_filter=null, bool $a_limited_access_filter=false, bool $a_no_courses_filter=false, int $a_course_group_filter=0, int $a_role_filter=0, array $a_user_folder_filter=null, array $a_additional_fields=null, array $a_user_filter=null, string $a_first_letter="", string $a_authentication_filter="")
Get data for user administration list.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addMultiCommand(string $a_cmd, string $a_text)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setExternalSegmentation(bool $a_val)
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)