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

Grade Import Creates Millions of Invalid Temporary Rows; Provides no Error Feedback

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2, 2.2, 2.6.2, 2.7
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Gradebook
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      Setup on fresh Moodle:

      1. Login to Moodle as admin
      2. Create a course
      3. Create 10 users, with ID number set to user001@example.com through user010@example.com (see provided CSV if this enumeration is unclear)
      4. Add these users as Students on the course
      5. Create 4 manual grade items named Quiz 1 through Quiz 4 and worth 2, 1, 10 and 10 points respectively.

      Testing:

      1. Click on the Grades link in the sidebar settings panel
      2. On the Grades page, select 'Import from CSV' from the drop-down select at the top of the page
      3. Upload the attached CSV with a million+ "blank" rows in the useridnumber column (This is a common problem when Excel creates the CSV).
      4. Map from User ID Number to useridnumber
      5. Map the grade columns to the grades items created in the setup.
      6. Ensure that your request completes without timing out.
      7. Inspect the grade_import_values table to make sure that it is empty after the process is complete.
      Show
      Setup on fresh Moodle: Login to Moodle as admin Create a course Create 10 users, with ID number set to user001@example.com through user010@example.com (see provided CSV if this enumeration is unclear) Add these users as Students on the course Create 4 manual grade items named Quiz 1 through Quiz 4 and worth 2, 1, 10 and 10 points respectively. Testing: Click on the Grades link in the sidebar settings panel On the Grades page, select 'Import from CSV' from the drop-down select at the top of the page Upload the attached CSV with a million+ "blank" rows in the useridnumber column (This is a common problem when Excel creates the CSV). Map from User ID Number to useridnumber Map the grade columns to the grades items created in the setup. Ensure that your request completes without timing out. Inspect the grade_import_values table to make sure that it is empty after the process is complete.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-29572_master

      Description

      Unfortunately, Excel CSV exports have a disagreeable tendency to contain a million or more "blank" rows consisting solely of commas. When real errors do occur, the import exits without any sort of feedback. In some situations, the millions of extra rows encourage the system to exit before cleanup causing some setups to be left with several gigabytes of grade import rows which exist in a state of limbo and have the bad habit of being pulled in by future imports for a column.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/May/14