Moodle
  1. Moodle
  2. MDL-3446

new instance_delete function - trigger

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: Blocks
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_16_STABLE
    • Rank:
      10865

      Description

      I am working on a new Choice Block and am using function instance_config to store information in the moodle choice tables, however when the block is deleted I can't see an easy way of cleaning the database entries related to that instance.

      it would be nice if function blocks_delete_instance($instance) in blocklib.php made a call to a function within the moodleblock.class.php called something like function instance_delete() that individual blocks can override so that when an instance of a block is deleted, the block can do it's own cleaning process as well as the removing of the instance. I might get time later this week to sort out a patch.....

      Dan

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Jon Papaioannou (pj at moodle.org) Monday, 13 June 2005, 11:33 AM:

        Done, I added instance_delete() and also instance_create().

        Ported back to STABLE as well to maximize compatibility.

        From Dan Marsden (dan at digitalclay.co.nz) Tuesday, 14 June 2005, 05:25 AM:

        looks good! - thanks Jon!

        - almost finished the block - I've been distracted by the deployment of AD here.... should be able to finish it next week......

        Show
        Martin Dougiamas added a comment - From Jon Papaioannou (pj at moodle.org) Monday, 13 June 2005, 11:33 AM: Done, I added instance_delete() and also instance_create(). Ported back to STABLE as well to maximize compatibility. From Dan Marsden (dan at digitalclay.co.nz) Tuesday, 14 June 2005, 05:25 AM: looks good! - thanks Jon! - almost finished the block - I've been distracted by the deployment of AD here.... should be able to finish it next week......
        Hide
        Michael Blake added a comment -

        Temporary transition to reassign bug to "pj".

        Show
        Michael Blake added a comment - Temporary transition to reassign bug to "pj".
        Hide
        Michael Blake added a comment -

        Re-closing bugs after re-assigning to "pj".

        Show
        Michael Blake added a comment - Re-closing bugs after re-assigning to "pj".

          People

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

            Dates

            • Created:
              Updated:
              Resolved: