Add new export types see BT#10139

1.10.x
Julio Montoya 10 years ago
parent 7832686cc4
commit cd4d275823
  1. 224
      main/admin/course_export.php
  2. 103
      main/admin/user_export.php
  3. 3
      main/inc/lib/export.lib.inc.php
  4. 159
      main/session/session_export.php

@ -13,11 +13,10 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
$tool_name = get_lang('ExportCourses').' CSV';
$tool_name = get_lang('ExportCourses');
$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
set_time_limit(0);
Display :: display_header($tool_name);
$archivePath = api_get_path(SYS_ARCHIVE_PATH);
$archiveURL = api_get_path(WEB_CODE_PATH).'course_info/download.php?archive=';
@ -27,110 +26,135 @@ $formSent = null;
$courses = $selected_courses = array();
if (isset($_POST['formSent']) && $_POST['formSent']) {
$formSent = $_POST['formSent'];
$select_type = intval($_POST['select_type']);
$file_type = 'csv';
if ($select_type == 2) {
// Get selected courses from courses list in form sent
$selected_courses = $_POST['course_code'];
if (is_array($selected_courses)) {
foreach ($course_list as $course) {
if (!in_array($course['code'],$selected_courses)) continue;
$courses[] = $course;
}
}
} else {
// Get all courses
$courses = $course_list;
}
$formSent = $_POST['formSent'];
$select_type = intval($_POST['select_type']);
$file_type = $_POST['file_type'];
if ($select_type == 2) {
// Get selected courses from courses list in form sent
$selected_courses = $_POST['course_code'];
if (is_array($selected_courses)) {
foreach ($course_list as $course) {
if (!in_array($course['code'], $selected_courses)) {
continue;
}
$courses[] = $course;
}
}
} else {
// Get all courses
$courses = $course_list;
}
if (!empty($courses)) {
if (!file_exists($archivePath)) {
mkdir($archivePath, api_get_permissions_for_new_directories(), true);
}
$archiveFile = 'export_courses_list_'.date('Y-m-d_H-i-s').'.'.$file_type;
$fp = fopen($archivePath.$archiveFile,'w');
if ($file_type == 'csv') {
$add = "Code;Title;CourseCategory;Teacher;Language;OtherTeachers;Users;".PHP_EOL;
foreach($courses as $course) {
$course['code'] = str_replace(';',',',$course['code']);
$course['title'] = str_replace(';',',',$course['title']);
$course['category_code'] = str_replace(';',',',$course['category_code']);
$course['tutor_name'] = str_replace(';',',',$course['tutor_name']);
$course['course_language'] = str_replace(';',',',$course['course_language']);
$course['course_users'] = CourseManager::get_user_list_from_course_code($course['code']);
$course['students'] = '';
$course['teachers'] = '';
foreach ($course['course_users'] as $user) {
if ($user['status_rel'] == 1) {
$course['teachers'] .= $user['username'].'|';
} else {
$course['students'] .= $user['username'].'|';
}
$archiveFile = 'export_courses_list_'.api_get_local_time();
$listToExport[] = [
'Code',
'Title',
'CourseCategory',
'Teacher',
'Language',
'Users',
'OtherTeachers'
];
$dataToExport = [];
foreach ($courses as $course) {
$dataToExport['code'] = str_replace(';',',',$course['code']);
$dataToExport['title'] = str_replace(';',',',$course['title']);
$dataToExport['category_code'] = str_replace(';',',',$course['category_code']);
$dataToExport['tutor_name'] = str_replace(';',',',$course['tutor_name']);
$dataToExport['course_language'] = str_replace(';',',',$course['course_language']);
$dataToExport['students'] = '';
$dataToExport['teachers'] = '';
$usersInCourse = CourseManager::get_user_list_from_course_code($course['code']);
foreach ($usersInCourse as $user) {
if ($user['status_rel'] == COURSEMANAGER) {
$dataToExport['teachers'] .= $user['username'].'|';
} else {
$dataToExport['students'] .= $user['username'].'|';
}
$course['students'] = substr($course['students'],0,-1);
$course['teachers'] = substr($course['teachers'],0,-1);
$add.= $course['code'].';'.$course['title'].';'.$course['category_code'].';'.$course['tutor_name'].';'.$course['course_language'].';'.$course['teachers'].';'.$course['students'].';'.PHP_EOL;
}
fputs($fp, $add);
}
fclose($fp);
$msg = get_lang('CoursesListHasBeenExported').'<br/><a class="btn btn-default" href="'.$archiveURL.$archiveFile.'">'.get_lang('ClickHereToDownloadTheFile').'</a>';
}
$dataToExport['students'] = substr($dataToExport['students'], 0, -1);
$dataToExport['teachers'] = substr($dataToExport['teachers'], 0, -1);
$listToExport[] = $dataToExport;
}
switch ($file_type) {
case 'xml':
// Remove header
unset($listToExport[0]);
Export::arrayToXml($listToExport, $archiveFile);
break;
case 'csv':
Export::arrayToCsv($listToExport, $archiveFile);
case 'xls':
Export::arrayToXls($listToExport, $archiveFile);
break;
}
} else {
$msg = get_lang('ThereAreNotSelectedCoursesOrCoursesListIsEmpty');
Display::addFlash(
Display::return_message(
get_lang('ThereAreNotSelectedCoursesOrCoursesListIsEmpty')
)
);
}
}
if (!empty($msg)) {
Display::display_normal_message($msg, false);
Display:: display_header($tool_name);
$form = new FormValidator('export', 'post', api_get_self());
$form->addHeader($tool_name);
$form->addHidden('formSent', 1);
$form->addElement(
'radio',
'select_type',
get_lang('Option'),
get_lang('ExportAllCoursesList'),
'1',
['onclick' => "javascript: if(this.checked){document.getElementById('div-course-list').style.display='none';}"]
);
$form->addElement(
'radio',
'select_type',
'',
get_lang('ExportSelectedCoursesFromCoursesList'),
'2',
['onclick' => "javascript: if(this.checked){document.getElementById('div-course-list').style.display='block';}"]
);
if (!empty($course_list)) {
$form->addHtml('<div id="div-course-list" style="display:none">');
$coursesInList = [];
foreach ($course_list as $course) {
$coursesInList[$course['code']] = $course['title'].' ('.$course['code'].')';
}
$form->addSelect(
'course_code',
get_lang('WhichCoursesToExport'),
$coursesInList,
['multiple' => 'multiple']
);
$form->addHtml('</div>');
}
// @todo use FormValidator!
?>
<form method="post" action="<?php echo api_get_self(); ?>" style="margin:0px;">
<input type="hidden" name="formSent" value="1">
<legend><?php echo $tool_name; ?></legend>
<?php if (!empty($course_list)) { ?>
<div class="control-group">
<div class="controls">
<label class="radio" for="all-courses">
<input id="all-courses" class="checkbox" type="radio" value="1" name="select_type" <?php if(!$formSent || ($formSent && $select_type == 1)) echo 'checked="checked"'; ?> onclick="javascript: if(this.checked){document.getElementById('div-course-list').style.display='none';}"/>
<?php echo get_lang('ExportAllCoursesList')?>
</label>
<label class="radio" for="select-courses">
<input id="select-courses" class="checkbox" type="radio" value="2" name="select_type" <?php if($formSent && $select_type == 2) echo 'checked="checked"'; ?> onclick="javascript: if(this.checked){document.getElementById('div-course-list').style.display='block';}"/>
<?php echo get_lang('ExportSelectedCoursesFromCoursesList')?>
</label>
</div>
</div>
<div id="div-course-list" style="<?php echo (!$formSent || ($formSent && $select_type == 1))?'display:none':'display:block';?>">
<table border="0" cellpadding="5" cellspacing="0">
<tr>
<td valign="top"><?php echo get_lang('WhichCoursesToExport'); ?> :</td>
<td>
<select name="course_code[]" multiple="multiple" size="10">
<?php
foreach($course_list as $course) {
?>
<option value="<?php echo $course['code']; ?>" <?php if(is_array($selected_courses) && in_array($course['code'],$selected_courses)) echo 'selected="selected"'; ?>>
<?php echo $course['title'].' ('.$course['code'].') ' ?>
</option>
<?php
}
?>
</select>
</td>
</tr>
</table>
</div>
<br />
<div id="actions">
<button class="save" type="submit" name="name" value="<?php echo get_lang('ExportCourses') ?>"><?php echo get_lang('ExportCourses') ?></button>
</div>
<?php } else { echo get_lang('ThereAreNotCreatedCourses'); }?>
</form>
<?php
$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null);
$form->addElement('radio', 'file_type', '' , 'XLS' , 'xls', null);
$form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml'));
$form->setDefaults(['select_type' => '1', 'file_type' => 'csv']);
$form->addButtonExport(get_lang('ExportCourses'));
$form->display();
Display :: display_footer();

@ -12,13 +12,13 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
// Database table definitions
$course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$course_user_table = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$course_table = Database:: get_main_table(TABLE_MAIN_COURSE);
$user_table = Database:: get_main_table(TABLE_MAIN_USER);
$course_user_table = Database:: get_main_table(TABLE_MAIN_COURSE_USER);
$tool_name = get_lang('ExportUserListXMLCSV');
$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
set_time_limit(0);
@ -27,6 +27,7 @@ $courses[''] = '--';
$sql = "SELECT code,visual_code,title FROM $course_table ORDER BY visual_code";
global $_configuration;
if (api_is_multiple_url_enabled()) {
$tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$access_url_id = api_get_current_access_url_id();
@ -40,39 +41,38 @@ if (api_is_multiple_url_enabled()) {
}
}
$result = Database::query($sql);
while ($course = Database::fetch_object($result))
{
while ($course = Database::fetch_object($result)) {
$courses[$course->code] = $course->visual_code.' - '.$course->title;
}
$form = new FormValidator('export_users');
$form->addElement('header', '', $tool_name);
$form->addElement('header', $tool_name);
$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML','xml');
$form->addElement('radio', 'file_type', null, 'CSV','csv');
$form->addElement('radio', 'file_type', null, 'CSV', 'csv');
$form->addElement('radio', 'file_type', null, 'XLS', 'xls');
$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'),'1');
$form->addElement('select', 'course_code', get_lang('OnlyUsersFromCourse'), $courses);
$form->addButtonExport(get_lang('Export'));
$form->setDefaults(array('file_type'=>'csv'));
$form->setDefaults(array('file_type' => 'csv'));
if ($form->validate()) {
global $_configuration;
$export = $form->exportValues();
$file_type = $export['file_type'];
$course_code = Database::escape_string($export['course_code']);
$courseInfo = api_get_course_info($course_code);
$courseId = $courseInfo['real_id'];
$sql = "SELECT u.user_id AS UserId,
u.lastname AS LastName,
u.firstname AS FirstName,
u.email AS Email,
u.username AS UserName,
".(($_configuration['password_encryption']!='none')?" ":"u.password AS Password, ")."
u.auth_source AS AuthSource,
u.status AS Status,
u.official_code AS OfficialCode,
u.phone AS Phone";
$sql = "SELECT
u.user_id AS UserId,
u.lastname AS LastName,
u.firstname AS FirstName,
u.email AS Email,
u.username AS UserName,
".(($_configuration['password_encryption']!='none')?" ":"u.password AS Password, ")."
u.auth_source AS AuthSource,
u.status AS Status,
u.official_code AS OfficialCode,
u.phone AS Phone";
if (strlen($course_code) > 0) {
$sql .= " FROM $user_table u, $course_user_table cu
WHERE
@ -80,14 +80,14 @@ if ($form->validate()) {
cu.c_id = $courseId AND
cu.relation_type<>".COURSE_RELATION_TYPE_RRHH."
ORDER BY lastname,firstname";
$filename = 'export_users_'.$course_code.'_'.date('Y-m-d_H-i-s');
$filename = 'export_users_'.$course_code.'_'.api_get_local_time();
} else {
global $_configuration;
if (api_is_multiple_url_enabled()) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
$sql.= " FROM $user_table u INNER JOIN $tbl_user_rel_access_url as user_rel_url
$sql.= " FROM $user_table u
INNER JOIN $tbl_user_rel_access_url as user_rel_url
ON (u.user_id= user_rel_url.user_id)
WHERE access_url_id = $access_url_id
ORDER BY lastname,firstname";
@ -95,47 +95,76 @@ if ($form->validate()) {
} else {
$sql .= " FROM $user_table u ORDER BY lastname,firstname";
}
$filename = 'export_users_'.date('Y-m-d_H-i-s');
$filename = 'export_users_'.api_get_local_time();
}
$data = array();
$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC',false);
if ($export['addcsvheader']=='1' AND $export['file_type']=='csv') {
if($_configuration['password_encryption']!='none') {
$data[] = array('UserId', 'LastName', 'FirstName', 'Email', 'UserName', 'AuthSource', 'Status', 'OfficialCode', 'PhoneNumber');
if ($_configuration['password_encryption'] != 'none') {
$data[] = array(
'UserId',
'LastName',
'FirstName',
'Email',
'UserName',
'AuthSource',
'Status',
'OfficialCode',
'PhoneNumber',
);
} else {
$data[] = array('UserId', 'LastName', 'FirstName', 'Email', 'UserName','Password', 'AuthSource', 'Status', 'OfficialCode', 'PhoneNumber');
$data[] = array(
'UserId',
'LastName',
'FirstName',
'Email',
'UserName',
'Password',
'AuthSource',
'Status',
'OfficialCode',
'PhoneNumber',
);
}
foreach($extra_fields as $extra) {
$data[0][]=$extra[1];
}
}
$res = Database::query($sql);
while($user = Database::fetch_array($res,'ASSOC')) {
$student_data= UserManager :: get_extra_user_data($user['UserId'],true,false);
$student_data = UserManager:: get_extra_user_data(
$user['UserId'],
true,
false
);
foreach($student_data as $key=>$value) {
$key= substr($key,6);
if (is_array($value))
$user[$key]= $value[$key];
else {
$user[$key]= $value;
$key = substr($key, 6);
if (is_array($value)) {
$user[$key] = $value[$key];
} else {
$user[$key] = $value;
}
}
$data[] = $user ;
}
switch($file_type) {
switch ($file_type) {
case 'xml':
Export::arrayToXml($data, $filename, 'Contact', 'Contacts');
exit;
break;
case 'csv':
Export::arrayToCsv($data,$filename);
Export::arrayToCsv($data, $filename);
exit;
case 'xls':
Export::arrayToXls($data, $filename);
exit;
break;
}
}
Display :: display_header($tool_name);
$form->display();
Display :: display_footer();

@ -108,6 +108,7 @@ class Export
fwrite($handle, '</table></body></html>');
fclose($handle);
DocumentManager::file_send_for_download($file, true, $filename.'.xls');
exit;
}
/**
@ -146,7 +147,7 @@ class Export
}
fclose($handle);
DocumentManager :: file_send_for_download($file, true, $filename.'.xml');
return false;
exit;
}
/**

@ -34,14 +34,13 @@ $tool_name = get_lang('ExportSessionListXMLCSV');
global $_configuration;
//$interbreadcrumb[] = array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
set_time_limit(0);
if (isset($_POST['formSent'])) {
$formSent = $_POST['formSent'];
$file_type = ($_POST['file_type'] == 'csv')?'csv':'xml';
$file_type = isset($_POST['file_type']) ? $_POST['file_type'] : 'csv';
$session_id = $_POST['session_id'];
if (empty($session_id)) {
$sql = "SELECT
@ -83,53 +82,58 @@ if (isset($_POST['formSent'])) {
}
if (Database::num_rows($result)) {
if (!file_exists($archivePath)) {
mkdir($archivePath, api_get_permissions_for_new_directories(), true);
}
if (!file_exists($archivePath.'index.html')) {
$fp = fopen($archivePath.'index.html','w');
fputs($fp,'<html><head></head><body></body></html>');
fclose($fp);
}
$archiveFile='export_sessions_'.$session_id.'_'.date('Y-m-d_H-i-s').'.'.$file_type;
while( file_exists($archivePath.$archiveFile)) {
$archiveFile='export_users_'.$session_id.'_'.date('Y-m-d_H-i-s').'_'.uniqid('').'.'.$file_type;
}
$sessionListToExport = [];
$fp = fopen($archivePath.$archiveFile, 'w');
if (in_array($file_type, ['csv', 'xls'])) {
$archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time();
if ($file_type == 'csv') {
$cvs = true;
fputs($fp,"SessionName;Coach;DateStart;DateEnd;Visibility;SessionCategory;Users;Courses;\n");
$sessionListToExport[] = [
'SessionName',
'Coach',
'DateStart',
'DateEnd',
'Visibility',
'SessionCategory',
'Users',
'Courses'
];
} else {
if (!file_exists($archivePath)) {
mkdir($archivePath, api_get_permissions_for_new_directories(), true);
}
if (!file_exists($archivePath.'index.html')) {
$fp = fopen($archivePath.'index.html', 'w');
fputs($fp, '<html><head></head><body></body></html>');
fclose($fp);
}
$archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time().'.'.$file_type;
while (file_exists($archivePath.$archiveFile)) {
$archiveFile ='export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type;
}
$cvs = false;
$fp = fopen($archivePath.$archiveFile, 'w');
fputs($fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Sessions>\n");
}
while($row=Database::fetch_array($result)) {
$add = '';
while ($row = Database::fetch_array($result)) {
$row['name'] = str_replace(';',',',$row['name']);
$row['username'] = str_replace(';',',',$row['username']);
$row['access_start_date'] = str_replace(';',',',$row['access_start_date']);
$row['access_end_date'] = str_replace(';',',',$row['access_end_date']);
$row['visibility'] = str_replace(';',',',$row['visibility']);
$row['session_category'] = str_replace(';',',',$row['session_category_id']);
if ($cvs) {
$add.= $row['name'].';'.$row['username'].';'.$row['access_start_date'].';'.$row['access_end_date'].';'.$row['visibility'].';'.$row['session_category'].';';
} else {
$add = "\t<Session>\n"
."\t\t<SessionName>$row[name]</SessionName>\n"
."\t\t<Coach>$row[username]</Coach>\n"
."\t\t<DateStart>$row[access_start_date]</DateStart>\n"
."\t\t<DateEnd>$row[access_end_date]</DateEnd>\n"
."\t\t<Visibility>$row[visibility]</Visibility>\n"
."\t\t<SessionCategory>$row[session_category]</SessionCategory>\n";
}
//users
// users
$sql = "SELECT DISTINCT $tbl_user.username
FROM $tbl_user
INNER JOIN $tbl_session_user
@ -143,21 +147,16 @@ if (isset($_POST['formSent'])) {
while ($rowUsers = Database::fetch_array($rsUsers)){
if($cvs){
$users .= str_replace(';',',',$rowUsers['username']).'|';
}
else {
} else {
$users .= "\t\t<User>$rowUsers[username]</User>\n";
}
}
if (!empty($users) && $cvs)
$users = api_substr($users , 0, api_strlen($users)-1);
if($cvs)
$users .= ';';
$add .= $users;
if (!empty($users) && $cvs) {
$users = api_substr($users, 0, api_strlen($users) - 1);
}
//courses
// Courses
$sql = "SELECT DISTINCT c.code, sc.id, c_id
FROM $tbl_course c
INNER JOIN $tbl_session_course_user sc
@ -170,13 +169,13 @@ if (isset($_POST['formSent'])) {
while ($rowCourses = Database::fetch_array($rsCourses)) {
// get coachs from a course
$sql = "SELECT u.username
FROM $tbl_session_course_user scu
INNER JOIN $tbl_user u
ON u.user_id = scu.user_id
WHERE
scu.c_id = '{$rowCourses['c_id']}' AND
scu.session_id = '".$row['id']."' AND
scu.status = 2 ";
FROM $tbl_session_course_user scu
INNER JOIN $tbl_user u
ON u.user_id = scu.user_id
WHERE
scu.c_id = '{$rowCourses['c_id']}' AND
scu.session_id = '".$row['id']."' AND
scu.status = 2 ";
$rs_coachs = Database::query($sql);
$coachs = array();
@ -184,7 +183,7 @@ if (isset($_POST['formSent'])) {
$coachs[] = $row_coachs['username'];
}
$coachs = implode(",",$coachs);
$coachs = implode(",", $coachs);
if ($cvs) {
$courses .= str_replace(';',',',$rowCourses['code']);
@ -229,31 +228,59 @@ if (isset($_POST['formSent'])) {
}
$courses .= $userscourse.']|';
}
else {
} else {
$courses .= "\t\t</Course>\n";
}
}
if(!empty($courses) && $cvs)
$courses = api_substr($courses , 0, api_strlen($courses)-1);
if (!empty($courses) && $cvs) {
$courses = api_substr($courses, 0, api_strlen($courses) - 1);
}
$add .= $courses;
if ($cvs) {
$breakline = api_is_windows_os()?"\r\n":"\n";
$add .= ";$breakline";
if (in_array($file_type, ['csv', 'xls'])) {
$sessionListToExport[] = [
$row['name'],
$row['username'],
$row['access_start_date'],
$row['access_end_date'],
$row['visibility'],
$row['session_category'],
$users,
$courses
];
} else {
$add .= "\t</Session>\n";
$add = "\t<Session>\n"
."\t\t<SessionName>$row[name]</SessionName>\n"
."\t\t<Coach>$row[username]</Coach>\n"
."\t\t<DateStart>$row[access_start_date]</DateStart>\n"
."\t\t<DateEnd>$row[access_end_date]</DateEnd>\n"
."\t\t<Visibility>$row[visibility]</Visibility>\n"
."\t\t<SessionCategory>$row[session_category]</SessionCategory>\n";
}
fputs($fp, $add);
if (!$cvs) {
$add .= "\t</Session>\n";
fputs($fp, $add);
}
}
if(!$cvs)
fputs($fp,"</Sessions>\n");
fclose($fp);
$errorMsg=get_lang('UserListHasBeenExported').'<br/><a class="btn btn-default" href="'.$archiveURL.$archiveFile.'">'.get_lang('ClickHereToDownloadTheFile').'</a>';
switch ($file_type) {
case 'xml':
fputs($fp, "</Sessions>\n");
fclose($fp);
$errorMsg = get_lang('UserListHasBeenExported').'<br/>
<a class="btn btn-default" href="'.$archiveURL.$archiveFile.'">'.get_lang('ClickHereToDownloadTheFile').'</a>';
break;
case 'csv':
Export::arrayToCsv($sessionListToExport, $archiveFile);
exit;
case 'xls':
Export::arrayToXls($sessionListToExport, $archiveFile);
exit;
break;
}
}
}
@ -278,7 +305,8 @@ $result = Database::query($sql);
$Sessions = Database::store_result($result);
echo '<div class="actions">';
echo '<a href="../session/session_list.php">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="../session/session_list.php">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'),'',ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
if (!empty($errorMsg)) {
@ -287,7 +315,8 @@ if (!empty($errorMsg)) {
$form = new FormValidator('session_export', 'post', api_get_self());
$form->addElement('hidden', 'formSent', 1);
$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null, array('id' => 'file_type_csv'));
$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null);
$form->addElement('radio', 'file_type', '', 'XLS' , 'xls', null);
$form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml'));
$options = array();

Loading…
Cancel
Save