Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-52052

Import grades with an empty identifier causes bad upload but it doesn't show error message

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a .csv or .txt file with the following content

      student-email;grade1
      s1@example.com;5
      ;7
      s2@example.com;10
      

      (NOTE: "s1@example.com" and "s2@example.com" should be replaced with the emails of the enrolled students)

      1. Login as Admin
      2. Create a Course
      3. Create an activity in the course (at least 1)
      4. Enrol several Students into the Course (at least 2)
      5. Go to the course "Grades" page
      6. Click on the "Import tab"
      7. The "CSV file" tab should be active, if not click on it
      8. In the "CSV file" import page
        • Upload the created file in the "File" field.
        • Set "Separator" = "Semicolon" (or "Comma" if using a csv file)
        • Click "Upload grades"
      9. In the "Import preview_"_ page
        • table should be displayed
      student-email grade1
      s1@example.com 5
        7
      s2@example.com 10
        • In the "Identify user by" section set:
          • "Map from" = "student-email"
          • "Map to" = "Email address"
        • In the "Grade item mappings" section set:
          • "grade1" = "New grade item"
        • Press "Upload grades"
      1. make sure the import failed and the following error messages are displayed:
        • User mapping error: Could not find user with email address of "".
        • Import failed. No data was imported.
      Show
      Create a .csv or .txt file with the following content student-email;grade1 s1 @example .com; 5 ; 7 s2 @example .com; 10 (NOTE: " s1@example.com" and "s2@example.com" should be replaced with the emails of the enrolled students) Login as Admin Create a Course Create an activity in the course (at least 1) Enrol several Students into the Course (at least 2) Go to the course "Grades" page Click on the "Import tab" The "CSV file" tab should be active, if not click on it In the "CSV file" import page Upload the created file in the "File" field. Set "Separator" = "Semicolon" (or "Comma" if using a csv file) Click "Upload grades" In the "Import preview_"_ page table should be displayed student-email grade1 s1@example.com 5   7 s2@example.com 10 In the "Identify user by" section set: "Map from" = "student-email" "Map to" = "Email address" In the "Grade item mappings" section set: "grade1" = "New grade item" Press "Upload grades" make sure the import failed and the following error messages are displayed: User mapping error: Could not find user with email address of "". Import failed. No data was imported.
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.8 Branch:
    • Pull 3.9 Branch:
    • Pull Master Branch:
      MDL-52052-master
    • Story Points:
      5
    • Sprint:
      4.0 holding pattern, 4.0 holding pattern 2, 4.0 holding pattern 3

      Description

      When import grades with a csv like this (line 2 with an empty email):

      student-email;grade1
      student1@testing-moodle-grades.com;5
      ;7
      student3@testing-moodle-grades.com;10

      Moodle loads this:

      student1@testing-moodle-grades.com -> 7
      student2@testing-moodle-grades.com -> -
      student3@testing-moodle-grades.com -> 10

      student1 gets the grade in line 2 and no error message is shown. Says "Grade import success".

      If there are more students, the ones above the empty, take the grade of the student below.

      Thank you.

        Attachments

        1. MDL-52052.jpg
          MDL-52052.jpg
          46 kB
        2. screenshot-1.png
          screenshot-1.png
          160 kB
        3. screenshot-2.png
          screenshot-2.png
          159 kB
        4. screenshot-3.png
          screenshot-3.png
          154 kB
        5. screenshot-4.png
          screenshot-4.png
          167 kB
        6. test_bug-import.txt
          0.1 kB
        7. upload_test_user_bug-import.txt
          0.3 kB

          Activity

            People

            Assignee:
            Geshoski Mihail Geshoski
            Reporter:
            juanvidal.conde@upm.es Juan V. Conde
            Peer reviewer:
            Mathew May
            Integrator:
            Jun Pataleta
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Sep/20

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 15 minutes
                5h 15m