From: poltawski Date: Tue, 8 Jan 2008 22:25:07 +0000 (+0000) Subject: MDL-12840 - gradebook CSV import was failing due to newlines with nothing X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=46decdf5d9bb6a1d8dcabda36e930e764d871266;p=moodle.git MDL-12840 - gradebook CSV import was failing due to newlines with nothing on them merged from MOODLE_19_STABLE --- diff --git a/grade/import/csv/index.php b/grade/import/csv/index.php index 2a2cbcbb61..30c2a49c12 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