[svn r18673] Fixed CSV import

skala
Yannick Warnier 16 years ago
parent ea0eca8cb0
commit 4923049fff
  1. 6
      main/admin/resume_session.php
  2. 10
      main/admin/session_import.php
  3. 11
      main/admin/session_list.php

@ -1,4 +1,4 @@
<?php // $Id: resume_session.php 17532 2009-01-04 20:33:49Z yannoo $
<?php // $Id: resume_session.php 18673 2009-02-25 04:53:55Z yannoo $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -93,8 +93,10 @@ if($_GET['action'] == 'delete')
Display::display_header($tool_name);
if (!empty($_GET['warn'])) {
Display::display_warning_message(urldecode($_GET['warn']));
}
api_display_tool_title($tool_name);
?>

@ -1,4 +1,4 @@
<?php // $Id: session_import.php 18650 2009-02-24 07:58:52Z yannoo $
<?php // $Id: session_import.php 18673 2009-02-25 04:53:55Z yannoo $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -661,17 +661,17 @@ if ($_POST['formSent']) {
}
if (count($inserted_in_course)>1) {
$warn = get_lang('UsersSubscribedToSeveralCoursesBecauseOfVirtualCourses').': ';
$warn = get_lang('SeveralCoursesSubscribedToSessionBecauseOfSameVisualCode').': ';
foreach ($inserted_in_course as $code => $title) {
$warn .= ' '.$title.' ('.$code.'),';
}
$warn .= substr($warn,0,-1);
$warn = substr($warn,0,-1);
}
if($countSessions == 1) {
header('Location: resume_session.php?id_session='.$session_id.'&warn='.urlencode($warn));
exit;
} else {
header('Location: session_list.php?action=show_message&message='.urlencode(get_lang('FileImported').' '.$errorMsg.'&warn='.urlencode($warn)));
header('Location: session_list.php?action=show_message&message='.urlencode(get_lang('FileImported').' '.$errorMsg).'&warn='.urlencode($warn));
exit;
}
} else {
@ -682,7 +682,7 @@ if ($_POST['formSent']) {
Display::display_header($tool_name);
api_display_tool_title($tool_name);
if (count($inserted_in_course) > 1) {
$msg = get_lang('UsersSubscribedToSeveralCoursesBecauseOfVirtualCourses').': ';
$msg = get_lang('SeveralCoursesSubscribedToSessionBecauseOfSameVisualCode').': ';
foreach ($inserted_in_course as $code => $title) {
$msg .= ' '.$title.' ('.$title.'),';
}

@ -140,16 +140,17 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced')
Display::display_header($tool_name);
api_display_tool_title($tool_name);
if (!empty($_GET['warn'])) {
Display::display_warning_message(urldecode($_GET['warn']));
}
if(isset($_GET['action'])) {
Display::display_normal_message($_GET['message']);
}
?>
<div id="main">
<div class="actions">
<?php
if(isset($_GET['action'])) {
Display::display_normal_message(Security::remove_XSS($_GET['message']), false);
}
echo '<div style="float:right;">
<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('view_more_stats.gif',get_lang('AddSession')).get_lang('AddSession').'</a>
</div>';

Loading…
Cancel
Save