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

Block removal should have automatically remove 'config_plugins' settings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.2
    • Component/s: Blocks
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Install a block that uses the config_plugins method of storing global configuration.
      Set some global config data.
      Verify the data is in the config_plugins table.
      Uninstall the block.
      Verify that the data is / is not removed from the config_plugins.

      Note - some blocks may have already installed a 'before_delete' function to avoid this problem. Test should be done with a block that does not explicitly remove its own settings.

      Show
      Install a block that uses the config_plugins method of storing global configuration. Set some global config data. Verify the data is in the config_plugins table. Uninstall the block. Verify that the data is / is not removed from the config_plugins. Note - some blocks may have already installed a 'before_delete' function to avoid this problem. Test should be done with a block that does not explicitly remove its own settings.
    • Workaround:
      Hide

      Blocks must be coded with specific 'before_delete' function to remove this data themselves.

      Show
      Blocks must be coded with specific 'before_delete' function to remove this data themselves.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w46_MDL-30327_m22_blockconfig

      Description

      If a block is using the plugins config method for storing its global configuration values, they are left in the 'config_plugins' table unless code has been specifically provided in the 'before_delete' method to remove them. These should be remove automatically when the block is uninstalled, using the Moodle 'unset_all_config_for_plugin' function. It appears that blocks do not use the same 'uninstall_plugin' function that modules and other plugins do, or this would happen.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              mchurch Mike Churchward
              Integrator:
              Sam Hemelryk
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/11