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

Importing null grade data clears existing grades

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Create a csv file

      1. Go to or create a course with at least an assignment activity.
      2. Download the gradebook as a csv.
        1. Go to Administration ► Grade administration ► Export ► Plain text file.
        2. Download the file.
      3. Open the file in a text editor and ensure that there is a column called Last downloaded from this course.

      Import a gradebook csv file back into Moodle.

      1. Edit the grades in the csv file.
      2. Go to Administration ► Grade administration ► Import ► CSV file.
      3. Upload the file with the default settings.
        1. Set Map from field: Email address
        2. Set Map to field: Email address
        3. Set Assignment field to the assignment you want import grades.
      4. Upload the grades.
      5. Ensure that the csv file upgrades fine.
      6. In the Grader report turn editing on and manually change the grade of a student.
      7. In the same gradebook csv file from before edit another students grade.
      8. Follow the instructions from before for uploading the csv file.
      9. Check that you receive an error such as "studentname grades have not been imported because the grades in the import file are older than in the grader report. To proceed with the grade import anyway, use the force import option."
      10. Repeat the steps again, but this time, select the force import option.
      11. You should receive a Grade import success message. Check that the file uploads and that it overrides the existing grades.
      12. Remove the column "Last downloaded from this course" and all the associated data for that column from the csv file.
      13. Upload the file again.
      14. You should receive a Grade import success message. Check that the file uploads and that it overrides the existing grades.

      Test date validation

      1. Edit the csv file, and change the exported date to 1325376000. (two years ago)
      2. Try to import using force import disabled, you should receive an error message:
      3. You should receive an error message: The export date is invalid because it is more than a year ago, or in the future, or because the format is invalid.
      4. Edit the csv file, and change the exported date to 1451606400. (date in the future)
      5. Try to import using force import disabled, you should receive the same error message.
      6. Edit the csv file, and change the exported date to 14A16B64C0. (invalid date)
      7. Try to import using force import disabled, you should receive the same error message.

      Import a gradebook using Past from spreadsheet

      1. Repeat the same tests above to the Paste from spreadsheet option and make sure it have the same exact behaviour.

      Unit tests

      1. Please run grade/import/csv/tests/load_data_test.php and check that there are no errors.
      Show
      Create a csv file Go to or create a course with at least an assignment activity. Download the gradebook as a csv. Go to Administration ► Grade administration ► Export ► Plain text file. Download the file. Open the file in a text editor and ensure that there is a column called Last downloaded from this course . Import a gradebook csv file back into Moodle. Edit the grades in the csv file. Go to Administration ► Grade administration ► Import ► CSV file. Upload the file with the default settings. Set Map from field: Email address Set Map to field: Email address Set Assignment field to the assignment you want import grades. Upload the grades. Ensure that the csv file upgrades fine. In the Grader report turn editing on and manually change the grade of a student. In the same gradebook csv file from before edit another students grade. Follow the instructions from before for uploading the csv file. Check that you receive an error such as " studentname grades have not been imported because the grades in the import file are older than in the grader report. To proceed with the grade import anyway, use the force import option." Repeat the steps again, but this time, select the force import option. You should receive a Grade import success message. Check that the file uploads and that it overrides the existing grades. Remove the column "Last downloaded from this course" and all the associated data for that column from the csv file. Upload the file again. You should receive a Grade import success message. Check that the file uploads and that it overrides the existing grades. Test date validation Edit the csv file, and change the exported date to 1325376000. (two years ago) Try to import using force import disabled, you should receive an error message: You should receive an error message: The export date is invalid because it is more than a year ago, or in the future, or because the format is invalid. Edit the csv file, and change the exported date to 1451606400. (date in the future) Try to import using force import disabled, you should receive the same error message. Edit the csv file, and change the exported date to 14A16B64C0. (invalid date) Try to import using force import disabled, you should receive the same error message. Import a gradebook using Past from spreadsheet Repeat the same tests above to the Paste from spreadsheet option and make sure it have the same exact behaviour. Unit tests Please run grade/import/csv/tests/load_data_test.php and check that there are no errors.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-46599-master
    • Story Points:
      40

      Description

      If an instructor has a data file, that has null scores for students,
      and the instructor imports that file, any existing scores will be cleared with
      those null scores.

      Example real-world scenario: when there are large classes, with multiple graders, who only grade a subset of the students.
      Each grader may only enter scores for their students, and have nulls for all the others.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lameze Simey Lameze
              Reporter:
              jethac Jetha Chan
              Peer reviewer:
              Adrian Greeve
              Integrator:
              Dan Poltawski
              Tester:
              Damyon Wiese
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14