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

Observers do not include file from the right location

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Events API
    • Labels:
    • Story Points:
      2
    • Sprint:
      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

              Assignee:
              fred Frédéric Massart
              Reporter:
              fred Frédéric Massart
              Peer reviewer:
              Petr Skoda
              Integrator:
              Dan Poltawski
              Tester:
              David Monllaó
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13