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

Gradebook CSV import deletes existing feedback comments if set to be ignored

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup:

      1. Login as admin
      2. Create a course
      3. Create two assignments named 'Assign 1' and 'Assign 2' within the course. Make sure that "Feedback comments" are enabled.
      4. Enroll students to the course
      5. Go to each assignment and provide grades and feedback to at least two students.

      Affected Areas:

      Gradebook CSV Import

      1. On the nav panel, click "Grades"
      2. On the "Grader report" page, open the Export tab.
      3. Go to the course grades.
      4. On the "Grader report" page, open the Export tab.
      5. Export the grades as a Plain text file (CSV), make sure that "Include feedback in export" under "Export format options" is ticked.
      6. Edit the downloaded CSV file and edit the grades and feedback for "Assign 1" and "Assign 2".
      7. Import the CSV.
      8. Under "Identify user by", set "Map from" and "Map to" to "Email address"
      9. Under "Grade item mappings", map "Assign 1"'s grade item and feedback accordingly.
      10. For "Assign 2", map its grade item accordingly but ignore "Assign 2"'s feedback.
      11. Upload the grades.
      12. Confirm that the grades for "Assign 1" and "Assign 2" have been updated accordingly.
      13. Confirm that the feedbacks for "Assign 1" have been updated accordingly.
      14. Confirm that the existing feedbacks for "Assign 2" remain unchanged.
      Show
      Setup: Login as admin Create a course Create two assignments named 'Assign 1' and 'Assign 2' within the course. Make sure that " Feedback comments " are enabled. Enroll students to the course Go to each assignment and provide grades and feedback to at least two students. Affected Areas: Gradebook CSV Import On the nav panel, click " Grades " On the " Grader report " page, open the Export tab. Go to the course grades. On the " Grader report " page, open the Export tab. Export the grades as a Plain text file (CSV), make sure that " Include feedback in export " under " Export format options " is ticked. Edit the downloaded CSV file and edit the grades and feedback for " Assign 1 " and " Assign 2 ". Import the CSV. Under " Identify user by ", set " Map from " and " Map to " to " Email address " Under " Grade item mappings ", map " Assign 1 "'s grade item and feedback accordingly. For " Assign 2 ", map its grade item accordingly but ignore " Assign 2 "'s feedback. Upload the grades. Confirm that the grades for " Assign 1 " and " Assign 2 " have been updated accordingly. Confirm that the feedbacks for " Assign 1 " have been updated accordingly. Confirm that the existing feedbacks for " Assign 2 " remain unchanged.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull from Repository:
    • Pull 3.7 Branch:
      MDL-66200-MOODLE_37_STABLE_gradebook_csv_import
    • Pull 3.8 Branch:
      MDL-66200-MOODLE_38_STABLE_gradebook_csv_import
    • Pull Master Branch:
      MDL-66200-master_gradebook_csv_import

      Description

      In Grade book, While importing a CSV file, if the feedback is set to be ignored and the grades are selected to be imported then all the existing feedback are removed.

       

      Steps to reproduce:

      • Create a course with an assignment and participants.
      • Grade the students with some feedback comments in Gradebook > Single View tab.
      • Export the grade book
        • Using "Plain Text Format"
        • Include feedback in export
      • Import the exported CSV file.
      • Click "Upload Grades"
      • In "Grade Items Mappings" set
        •  In Identify user by set mapping from "Email address" and mapping to "Email address"
        • Under 'Grade items mapping' choose 'Ignore' on feedback
        • Set assignment XXX(Real) to corresponding assignment name  under Grade items in options
      • Upload grades
      • Click continue and go back to single view
      • See that all the existing Feedback Comments are lost in Single View

      After digging around I found that the error is caused in grade_item.php line number 1781 where it tries to compare value of string against a boolean with `!==` operator

       

       

        Attachments

        1. export.png
          export.png
          46 kB
        2. export.png
          export.png
          46 kB
        3. gradebook.png
          gradebook.png
          45 kB
        4. ignorecomment.png
          ignorecomment.png
          9 kB
        5. image-2020-04-16-09-26-08-633.png
          image-2020-04-16-09-26-08-633.png
          181 kB
        6. usermap.png
          usermap.png
          9 kB

          Activity

            People

            Assignee:
            gmrsagar Sagar Ghimire
            Reporter:
            gmrsagar Sagar Ghimire
            Peer reviewer:
            John Yao
            Integrator:
            Jun Pataleta
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            2 Vote for this issue
            Watchers:
            15 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/May/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 6 minutes
                4h 6m