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

groups_delete_group_members opens but does not close a recordset

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9.4, 3.0.2
    • Component/s: Groups
    • Labels:
    • Sprint:
      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

            Assignee:
            markn Mark Nelson
            Reporter:
            damyon Damyon Wiese
            Peer reviewer:
            cameron1729
            Integrator:
            Dan Poltawski
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Jan/16