Skip to content

Commit

Permalink
MDL-42618 fix grade importing of whitespace idnumbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Switlik authored and danpoltawski committed Feb 17, 2014
1 parent 06a8eb0 commit 823640c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grade/import/csv/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
$studentid = $value;
break;
case 'useridnumber':
if (!$user = $DB->get_record('user', array('idnumber' => $value))) {
if (empty($value) || !$user = $DB->get_record('user', array('idnumber' => $value))) {
// user not found, abort whole import
import_cleanup($importcode);
echo $OUTPUT->notification("user mapping error, could not find user with idnumber \"$value\"");
Expand Down

0 comments on commit 823640c

Please sign in to comment.