mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'wip-MDL-42850-master' of git://github.com/abgreeve/moodle
This commit is contained in:
commit
496692fb9d
2 changed files with 4 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue