diff --git a/grade/import/csv/index.php b/grade/import/csv/index.php index 2a2cbcbb612..30c2a49c123 100755 --- a/grade/import/csv/index.php +++ b/grade/import/csv/index.php @@ -222,6 +222,11 @@ if ($formdata = $mform->get_data()) { // add something $line = split($csv_delimiter, fgets($fp,1024)); + if(count($line) <= 1){ + // there is no data on this line, move on + continue; + } + // array to hold all grades to be inserted $newgrades = array(); // array to hold all feedback