Permalink
Browse files

MDL-42618 fix grade importing of whitespace idnumbers

  • Loading branch information...
Matt Switlik authored and danpoltawski committed Nov 14, 2013
1 parent 06a8eb0 commit 823640c16dcf71f9aa930c0e4fa1dc68bc4ccc2f
Showing with 1 addition and 1 deletion.
  1. +1 −1 grade/import/csv/index.php
@@ -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\"");

0 comments on commit 823640c

Please sign in to comment.