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

groups_delete_group_members opens but does not close a recordset

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9
    • 2.9.4, 3.0.2
    • Groups
    • 3.1 Stable Sprint 2

    Description

      group/lib.php

      I used this function as an interview question to review some bad code.

      The bug in this code is not closing the recordset - but there are some other things that are not good here:

      • (repeated) DB queries in a loop
      • no error checking
      • mixes display logic and business logic
      • does not clear group caches
      • it makes baby kittens sad

      Attachments

        Activity

          People

            markn Mark Nelson
            damyon Damyon Wiese
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            CiBoT CiBoT
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jan/16