diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php
index 296c1d1a43..bb59098b39 100755
--- a/main/mySpace/myStudents.php
+++ b/main/mySpace/myStudents.php
@@ -32,15 +32,14 @@ function show_image(image,width,height) {
}
';
-$export_csv = isset ($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
-$sessionId = isset($_GET['id_session']) ? $_GET['id_session'] : 0;
+$export = isset($_GET['export']) ? $_GET['export'] : false;
+$sessionId = isset($_GET['id_session']) ? intval($_GET['id_session']) : 0;
if (empty($sessionId)) {
$sessionId = api_get_session_id();
}
-
-if ($export_csv) {
+if ($export) {
ob_start();
}
$csv_content = array();
@@ -318,8 +317,13 @@ if (!empty($student_id)) {
echo ''.
Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'';
+
echo ''.
Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).' ';
+
+ echo ''.
+ Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).' ';
+
if (!empty ($user_info['email'])) {
$send_mail = ''.
Display :: return_icon('mail_send.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM).'';
@@ -400,7 +404,7 @@ if (!empty($student_id)) {
// cvs information
$csv_content[] = array(
- get_lang('Informations', '')
+ get_lang('Information', '')
);
$csv_content[] = array (
get_lang('Name', ''),
@@ -1157,9 +1161,17 @@ if (!empty($student_id)) {