Merge branch 'wip-MDL-42850-master' of git://github.com/abgreeve/moodle

This commit is contained in:
Sam Hemelryk 2013-11-19 14:19:20 +13:00
commit 496692fb9d
2 changed files with 4 additions and 5 deletions

View File

@ -123,12 +123,11 @@ if (empty($iid)) {
$content = $mform1->get_file_content('userfile');
$readcount = $cir->load_csv_content($content, $formdata->encoding, $formdata->delimiter_name);
$csvloaderror = $cir->get_error();
unset($content);
if ($readcount === false) {
print_error('csvloaderror', '', $returnurl);
} else if ($readcount == 0) {
print_error('csvemptyfile', 'error', $returnurl);
if (!is_null($csvloaderror)) {
print_error('csvloaderror', '', $returnurl, $csvloaderror);
}
// test if columns ok
$filecolumns = uu_validate_user_upload_columns($cir, $STD_FIELDS, $PRF_FIELDS, $returnurl);

View File

@ -186,7 +186,7 @@ $string['csvemptyfile'] = 'The CSV file is empty';
$string['csvfewcolumns'] = 'Not enough columns, please verify the delimiter setting';
$string['csvinvalidcols'] = '<b>Invalid CSV file:</b> First line must include "Header Fields" and the file must be type of <br />"Expanded Fields/Comma Separated"<br />or<br /> "Expanded Fields with CAVV Result Code/Comma Separated"';
$string['csvinvalidcolsnum'] = 'Invalid CSV file - each line must include 49 or 70 fields';
$string['csvloaderror'] = 'Error occur during loading CSV file!';
$string['csvloaderror'] = 'An error occurred while loading the CSV file: {$a}';
$string['csvweirdcolumns'] = 'Invalid CSV file format - number of columns is not constant!';
$string['dbconnectionfailed'] = '<p>Error: Database connection failed</p>
<p>It is possible that the database is overloaded or otherwise not running properly.</p>