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

Delete user with orphaned grade item

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a user (s1)
      2. Create a course
      3. Create a quiz with a a true/false question
      4. Enrol the user s1 as student into that course
      5. Login as the student (s1)
      6. Attempt the quiz
      7. Submit the quiz
      8. Access to the gradebook
      9. Make sure the grade is there
      10. Break the DB running the following SQL query: 

        DELETE FROM mdl_grade_items WHERE courseid = {the created courseid} AND itemmodule = 'quiz' 

      11. Login as admin
      12. Delete the user s1
      13. Confirm the deletion finishes without any error
        • Note: if debugging is enabled, the following message will be displayed: "Missing grade item id xxx".

       

      Show
      Create a user (s1) Create a course Create a quiz with a a true/false question Enrol the user s1 as student into that course Login as the student (s1) Attempt the quiz Submit the quiz Access to the gradebook Make sure the grade is there Break the DB running the following SQL query:  DELETE FROM mdl_grade_items WHERE courseid = {the created courseid} AND itemmodule = 'quiz'  Login as admin Delete the user s1 Confirm the deletion finishes without any error Note: if debugging is enabled, the following message will be displayed: "Missing grade item id xxx".  
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
      MDL-68680-MOODLE_39_STABLE
    • Pull 3.10 Branch:
      MDL-68680-MOODLE_310_STABLE
    • Pull Master Branch:
      MDL-68680-Master

      Description

      Related tracker https://tracker.moodle.org/browse/MDL-51694

      Provide a fix for deleting user with existing orphaned grade item

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Nguyen Nathan Nguyen
              Reporter:
              Nguyen Nathan Nguyen
              Peer reviewer:
              Dmitrii Metelkin Dmitrii Metelkin
              Integrator:
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Tester:
              Janelle Barcega Janelle Barcega
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Sep/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h