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

Observers do not include file from the right location

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.6
    • Events API
    • 2
    • BACKEND Sprint 4

    Description

      The observers property includefile is not relative to dirroot anymore.

      Add the following observer to any events file (for instance lib/db/events.php):

      $observers = array(
            array(
              'eventname' => '\core\event\group_created',
              'callback' => 'print_object',
              'includefile' => '/lib/datalib.php'
            )
      )
      

      Purge cache, and create a new group, and make sure the content of the event has been printed out.

      Attachments

        Issue Links

          Activity

            People

              fred Frédéric Massart
              fred Frédéric Massart
              Petr Skoda Petr Skoda
              Dan Poltawski Dan Poltawski
              David Monllaó David Monllaó
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13