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

Observers do not include file from the right location

    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 (Obsolete):
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

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