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

Observers do not include file from the right location

XMLWordPrintable

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

      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.

            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

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.