Moodle
  1. Moodle
  2. MDL-37098

Fatal error when deleting a group in quiz_groups_group_deleted_handler()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.1
    • Component/s: Groups, Quiz
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with some groups.
      2. Create a quiz in the course, add some questions and attempt it as a student. (Do not create any settings overrides.)
      3. Delete one of the groups. Verify that there are no fatal errors.
      Show
      Create a course with some groups. Create a quiz in the course, add some questions and attempt it as a student. (Do not create any settings overrides.) Delete one of the groups. Verify that there are no fatal errors.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      46660

      Description

      When attempting to delete a group in Course Administration->Users->Groups there was a fatal error (group was not empty):

      Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays

      More information about this error

      Debug info:
      Error code: codingerror
      Stack trace:
      line 646 of /lib/dml/moodle_database.php: coding_exception thrown
      line 802 of /mod/quiz/locallib.php: call to moodle_database->get_in_or_equal()
      line 1628 of /mod/quiz/locallib.php: call to quiz_update_open_attempts()
      line ? of unknownfile: call to quiz_groups_group_deleted_handler()
      line 299 of /lib/eventslib.php: call to call_user_func()
      line 519 of /lib/eventslib.php: call to events_dispatch()
      line 442 of /group/lib.php: call to events_trigger()
      line 73 of /group/delete.php: call to groups_delete_group()

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          This will be a regression from MDL-35717. I am on it.

          Show
          Tim Hunt added a comment - This will be a regression from MDL-35717 . I am on it.
          Hide
          Tim Hunt added a comment -

          To INTEGRATORS: Please cherry-pick from the master branch to the 24 branch.

          Show
          Tim Hunt added a comment - To INTEGRATORS: Please cherry-pick from the master branch to the 24 branch.
          Hide
          Dan Poltawski added a comment -

          Integrated to 24 and master. Thanks Tim.

          Show
          Dan Poltawski added a comment - Integrated to 24 and master. Thanks Tim.
          Hide
          Jason Fowler added a comment -

          Works well Tim, no fatal errors

          Show
          Jason Fowler added a comment - Works well Tim, no fatal errors
          Hide
          Matt Petro added a comment -

          Gah! Thanks for fixing this, Tim.

          Show
          Matt Petro added a comment - Gah! Thanks for fixing this, Tim.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: