//$text = get_lang('Remove'); } else { $url = 'class.php?action=add_class_to_course&id=' . $group['id'] . '&' . api_get_cidreq() . '&type=not_registered'; //$class = 'btn btn-primary'; $icon = Display::return_icon('add.png', get_lang('Add')); //$text = get_lang('Add'); } switch ($group['group_type']) { case 0: $group['group_type'] = Display::label(get_lang('Class'), 'primary'); break; case 1: $group['group_type'] = Display::label(get_lang('Social'), 'success'); break; } $role = $obj->getUserRoleToString(api_get_user_id(), $group['id']); $group['status'] = $role; $group['actions'] = Display::url($icon, $url); $new_result[] = $group; } $result = $new_result; } if (!in_array($sidx, $columns)) { $sidx = 'name'; } // Multidimensional sort $result = ArrayClass::msort($result, $sidx, $sord); break; default: exit; }