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

Allow modules to excute custom uninstall code...

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 2.0
    • Fix Version/s: 1.9, 2.0
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Right now, when installing one module, the function modulename_install() is automatically executed if present, allowing custom post-installation code to be executed.

      But the opposite (executing custom uninstall code ins't possible). And I really thing it's interesting to have such functionality.

      I've attached one patch here that implements the functionality. I've tested it and seems 100% safe (its completely paired with the install one). So I would introduce it for 1.9.

      Thoughts?

      Ciao

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08