$group) { $users = GroupManager::get_users($group['id']); foreach ($users as $index => $user) { $row = array(); $user = api_get_user_info($user); $row[] = $group['name']; $row[] = $user['official_code']; $row[] = $user['lastName']; $row[] = $user['firstName']; $data[] = $row; } } switch ($_GET['type']) { case 'csv': Export::export_table_csv($data); exit; case 'xls': Export::export_table_xls($data); exit; } break; } } /* Header */ $interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups')); if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') { if (!api_is_allowed_to_edit(false, true)) { api_not_allowed(true); } else { Display::display_header($nameTools, 'Group'); } } else { ?> '; echo ''.Display::return_icon('new_group.png', get_lang('NewGroupCreate'),'',ICON_SIZE_MEDIUM).''; echo ''.Display::return_icon('group.png', get_lang('Groups'),'',ICON_SIZE_MEDIUM).''; if (api_get_setting('allow_group_categories') == 'true') { echo ''.Display::return_icon('new_folder.png', get_lang('AddCategory'),'',ICON_SIZE_MEDIUM).''; } else { //echo ''.Display::return_icon('edit_group.gif').' '.get_lang('PropModify').' '; echo ''.Display::return_icon('settings.png', get_lang('PropModify'),'',ICON_SIZE_MEDIUM).''; } //echo Display::return_icon('csv.gif', get_lang('ExportAsCSV')).''.get_lang('ExportAsCSV').' '; echo ''.Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).''; echo ''; $categories = GroupManager::get_categories(); foreach ($categories as $index => $category) { if (api_get_setting('allow_group_categories') == 'true') { echo '

'.$category['title'].'

'; } $groups = GroupManager::get_group_list($category['id']); echo ''; } /* FOOTER */ if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') { Display::display_footer(); }