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

All quiz user overrides deleted by group event handler

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.8, 2.5.4, 2.6.1
    • Fix Version/s: 2.5.5, 2.6.2
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with an enrolled user "A" and group "G"
      2. Create a quiz.
      3. Add a quiz user override for "A" and a group override for "G". (The overrides can set the quiz password, for example.)
      4. Delete group "G" from the course
      5. Verify that the quiz group override for "G" has been deleted but the user override for "A" is still present.
      Show
      Create a course with an enrolled user "A" and group "G" Create a quiz. Add a quiz user override for "A" and a group override for "G". (The overrides can set the quiz password, for example.) Delete group "G" from the course Verify that the quiz group override for "G" has been deleted but the user override for "A" is still present.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44029-quiz-group-delete-handler-bug

      Description

      Deleting a course group will result in all quiz user overrides being deleted course-wide.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            mpetrowi Matt Petro added a comment -

            I'm surprised nobody has reported this bug before now. I made it critical because of the potention for data/configuration loss.

            Show
            mpetrowi Matt Petro added a comment - I'm surprised nobody has reported this bug before now. I made it critical because of the potention for data/configuration loss.
            Hide
            cibot CiBoT added a comment -

            Results for MDL-44029

            Show
            cibot CiBoT added a comment - Results for MDL-44029 Remote repository: https://github.com/mpetrowi/moodle Remote branch MDL-44029 -quiz-group-delete-handler-bug to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1127 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1127/artifact/work/smurf.html
            Hide
            mpetrowi Matt Petro added a comment -

            I would like to see 2.4 updated as well, as this bug can result in course-wide configuration loss.

            Show
            mpetrowi Matt Petro added a comment - I would like to see 2.4 updated as well, as this bug can result in course-wide configuration loss.
            Hide
            timhunt Tim Hunt added a comment -

            Wow! I agree it is surprising that this has not been detected before. Perhaps most people use either group overrides, or user overrides.

            The only way this could be improved is if you wrote a unit test for this. If you can do that, great. If not, it should be integrated anyway.

            I agree this should go into 2.4 too.

            Show
            timhunt Tim Hunt added a comment - Wow! I agree it is surprising that this has not been detected before. Perhaps most people use either group overrides, or user overrides. The only way this could be improved is if you wrote a unit test for this. If you can do that, great. If not, it should be integrated anyway. I agree this should go into 2.4 too.
            Hide
            mpetrowi Matt Petro added a comment -

            What we really should do in master/2.6 is to pull the quiz id out of the record snapshot in the event. That way it just has to delete overrides for the deleted group.

            I'll make a separate issue and create a unit test for that. Sound okay?

            Show
            mpetrowi Matt Petro added a comment - What we really should do in master/2.6 is to pull the quiz id out of the record snapshot in the event. That way it just has to delete overrides for the deleted group. I'll make a separate issue and create a unit test for that. Sound okay?
            Hide
            mpetrowi Matt Petro added a comment -

            https://tracker.moodle.org/browse/MDL-44030

            I haven't looked into the new event stuff in detail, so I hope that issue description makes sense.

            Show
            mpetrowi Matt Petro added a comment - https://tracker.moodle.org/browse/MDL-44030 I haven't looked into the new event stuff in detail, so I hope that issue description makes sense.
            Hide
            cibot CiBoT added a comment -

            Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

            Show
            cibot CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Matt this has been integrated now.

            Noting that this wasn't integrated to 2.4 as that branch is now only receiving security fixes.

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Matt this has been integrated now. Noting that this wasn't integrated to 2.4 as that branch is now only receiving security fixes.
            Hide
            markn Mark Nelson added a comment -

            Works as expected, thanks for your hard work Matt!

            Show
            markn Mark Nelson added a comment - Works as expected, thanks for your hard work Matt!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Fetch your remotes, prune them,
            clean your integrated branches and say "Ahem".

            Rebase your ongoing stuff, keep conflicts away
            don't forget to test the code and we'll love you again.

            Thanks, closing!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Fetch your remotes, prune them, clean your integrated branches and say "Ahem". Rebase your ongoing stuff, keep conflicts away don't forget to test the code and we'll love you again. Thanks, closing!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Mar/14