Moodle

New Module Hook

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Messages
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Create a new module hook with is called when a module is installed. This is to be used to register a module as message provider in the new messaging system.

Activity

Hide
Martin Dougiamas added a comment -

I've added this hook to the install process (for activity modules).

If the modules define a function named xxxxxx_install where xxxxx is the name of the module then it will be called during the installation of the module.

To cope with sites that are upgrading, you should also register the module as a messaging provider in db/upgrade.php for each module.

Show
Martin Dougiamas added a comment - I've added this hook to the install process (for activity modules). If the modules define a function named xxxxxx_install where xxxxx is the name of the module then it will be called during the installation of the module. To cope with sites that are upgrading, you should also register the module as a messaging provider in db/upgrade.php for each module.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: