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

CSV import of grades silently fails when malformed row(s) present

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.6.6, 2.7.3
    • 2.6.5, 2.7.2
    • Gradebook
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_26_STABLE, MOODLE_27_STABLE
    • wip-MDL-46546-master
    • Hide

      Getting some malformed data to test with

      1. Create a new course, and enrol a few users in it.
      2. Create a new assignment activity with submission types set to online text.
      3. As two students, complete the assignment.
      4. As a teacher or admin user, grade the students.
      5. Go to the course's grader report, by clicking Course administration -> Grades.
      6. Navigate to Grade administration -> Export -> Plain text file.
        • Export a CSV file using commas as the separator.
      7. Open the CSV file you generated.
        • Observe that the first line is a header row, with names for each data column.
        • Pick a subsequent row and completely excise a column from it - not just the data value, but the comma after it as well.
        • Save your CSV file as malformed.csv.

      Testing with malformed data

      1. Navigate to Grade administration -> Import -> CSV file.
      2. Upload your malformed CSV file, selecting comma as the separator and with a non-zero number of preview rows.
      3. Click Upload grades.
        • Observe that an error message is displayed.
      Show
      Getting some malformed data to test with Create a new course, and enrol a few users in it. Create a new assignment activity with submission types set to online text . As two students, complete the assignment. As a teacher or admin user, grade the students. Go to the course's grader report, by clicking Course administration -> Grades . Navigate to Grade administration -> Export -> Plain text file . Export a CSV file using commas as the separator. Open the CSV file you generated. Observe that the first line is a header row, with names for each data column. Pick a subsequent row and completely excise a column from it - not just the data value, but the comma after it as well. Save your CSV file as malformed.csv . Testing with malformed data Navigate to Grade administration -> Import -> CSV file . Upload your malformed CSV file, selecting comma as the separator and with a non-zero number of preview rows. Click Upload grades . Observe that an error message is displayed.
    • 13

      If the number of columns in any data row don’t match the columns in the header row, there is no diagnostic warning, AND the ability to map from the select box in the “identify user by" section is broken.

            abgreeve Adrian Greeve
            jethac Jetha Chan
            Damyon Wiese Damyon Wiese
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.