$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') { //so we are not in learnpath tool if (! $is_allowed_in_course) api_not_allowed(true); if (!api_is_allowed_to_edit(false,true)) api_not_allowed(true); else Display::display_header($nameTools,"Group"); } else { ?> '; echo Display::return_icon('groupadd.gif', get_lang('NewGroupCreate')) . ''.get_lang('NewGroupCreate').''; echo Display::return_icon('group.gif', get_lang('Groups')) .''.get_lang('Groups').''; if (api_get_setting('allow_group_categories') == 'true') { echo Display::return_icon('folder_new.gif', get_lang('AddCategory')) . ''.get_lang('AddCategory').' '; } else { //echo ''.Display::return_icon('edit_group.gif').' '.get_lang('PropModify').' '; echo Display::return_icon('settings.gif', get_lang('PropModify')) . ''.get_lang('PropModify').' '; } //echo Display::return_icon('csv.gif', get_lang('ExportAsCSV')).''.get_lang('ExportAsCSV').' '; echo Display::return_icon('excel.gif', get_lang('ExportAsXLS')).' '.get_lang('ExportAsXLS').''; 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(); } ?>