-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.4, 3.6.2
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MDL-64958-master -
Since email and idnumber are not unique fields, there's a chance that multiple user records will be matched when querying for user data using these fields in \gradeimport_csv_load_data::check_user_exists(). This can lead to a different user's grades being inadvertently modified during grade import.
In such a case, this function needs to return a null userid instead.
I was able to reproduce this problem by having 2 users have the same email address (with $CFG->allowaccountssameemail turned on). I uploaded using the email field mapping, and only got one user being updated even when the update should have been for the other user.