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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide

      Setup:

      1. Login as admin
      2. Create a course
      3. Create an assignment within the course
      4. Enroll students to the course

       

      Affected Areas:

      Gradebook CSV Import

      1. Go to 'Gradebook' view page
      2. Make sure at least one student has been graded and some feedback comment has been given in Single View tab
      3. Select the export tab
      4. Select the 'Plain text file' tab
      5. Click on 'Export format options'
      6. Check 'Include feedback in export'
      7. Download the file
      8. Select the import tab
      9. Choose the downloaded file and Click "Upload Grades"
      10.  In Identify user by set mapping from "Email address" and mapping to "Email address"
      11. Under 'Grade items mapping' choose 'Ignore' on feedback and set assignment XXX(Real) to corresponding assignment name  under Grade items in options
      12. Upload grades
      13. TEST: Make sure that the old feedback comments are still there
      Show
      Setup: Login as admin Create a course Create an assignment within the course Enroll students to the course   Affected Areas: Gradebook CSV Import Go to 'Gradebook' view page Make sure at least one student has been graded and some feedback comment has been given in Single View tab Select the export tab Select the 'Plain text file' tab Click on 'Export format options' Check 'Include feedback in export' Download the file Select the import tab Choose the downloaded file and Click "Upload Grades"  In Identify user by set mapping from "Email address" and mapping to "Email address" Under 'Grade items mapping' choose 'Ignore' on feedback and set assignment XXX(Real) to corresponding assignment name  under Grade items in options Upload grades TEST: Make sure that the old feedback comments are still there
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull 3.6 Branch:
      MDL-66200-MOODLE_36_STABLE_gradebook_csv_import_fix
    • Pull 3.7 Branch:
      MDL-66200-MOODLE_37_STABLE_gradebook_csv_import_fix
    • Pull Master Branch:
      MDL-66200-master_gradebook_csv_import_fix

      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. usermap.png
          usermap.png
          9 kB

          Activity

            People

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

              Dates

              • Created:
                Updated:

                Time Tracking

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