MDL-52052 gradeimport_csv: Do not skip rows with blank user fields
authorMihail Geshoski <mihail@moodle.com>
Fri, 26 Jun 2020 06:57:49 +0000 (14:57 +0800)
committerMihail Geshoski <mihail@moodle.com>
Mon, 20 Jul 2020 00:55:05 +0000 (08:55 +0800)
grade/import/csv/classes/load_data.php

index c1d5067..df8876a 100644 (file)
@@ -399,10 +399,7 @@ class gradeimport_csv_load_data {
             case 'useridnumber':
             case 'useremail':
             case 'username':
-                // Skip invalid row with blank user field.
-                if (!empty($value)) {
-                    $this->studentid = $this->check_user_exists($value, $userfields[$mappingidentifier]);
-                }
+                $this->studentid = $this->check_user_exists($value, $userfields[$mappingidentifier]);
             break;
             case 'new':
                 $this->import_new_grade_item($header, $key, $value);