Permalink
Browse files

MDL-42618 fix grade importing of whitespace idnumbers

  • Loading branch information...
1 parent d214057 commit 3f7bd819124a5c4b1cfc127d45ecd4ca3dcf5a69 Matt Switlik committed Nov 14, 2013
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 3f7bd81

Please sign in to comment.