From 46decdf5d9bb6a1d8dcabda36e930e764d871266 Mon Sep 17 00:00:00 2001 From: poltawski Date: Tue, 8 Jan 2008 22:25:07 +0000 Subject: [PATCH] MDL-12840 - gradebook CSV import was failing due to newlines with nothing on them merged from MOODLE_19_STABLE --- grade/import/csv/index.php | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5