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

Some way to pass extra information to API calls (e.g. context for events) without proliferating many parameters

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_27_STABLE

      Description

      In many cases it will make sense to fire events from API calls. However, not all APIs have access to complete information to fire the event (e.g. context).

      The worst thing is to do extra db calls and kill performance (especially in big loops).

      Tim outlined the issue in this thread:
      https://moodle.org/mod/forum/discuss.php?d=257934

      Here is an example of an instance of trying to solve it in an 'ugly' way MDL-45466

      I think we need a solution which doesn't involve a proliferation of extra parameters to apis (especially if there is potential for a mismatch between the parameters).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                poltawski Dan Poltawski
                Participants:
                Component watchers:
                Jake Dallimore, Jun Pataleta, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Matteo Scaramuccia, Jake Dallimore, Jun Pataleta
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: