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

Block instance_delete is not called

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Blocks
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      The block class has an instance_delete method, but this is not called when an instance is deleted. There is an obvious code bug in blocklib:

      if(!$record = blocks_get_record($instance->blockid)) {
      if(!$obj = block_instance($record->name, $instance)) {
      // Return value ignored
      $obj->instance_delete();

      The two if statements should be if(), not if. I have fixed this on HEAD.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quen Sam Marshall
                Reporter:
                quen Sam Marshall
                Tester:
                Nobody
                Participants:
                Component watchers:
                Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  31/Mar/07