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

Decide how/when trigger events in external functions



    • Type: Task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: None
    • Component/s: Policy
    • Labels:
    • Affected Branches:


      Currently most of the external functions don't trigger events, this means, that user interactions with a site/course is not displayed in the site or course logs.
      Web Services requested are logged via events and are displayed in site logs as request, but not linked to specific courses.

      This situation is problematic because a teacher or manager can't have consolidated all the interactions an student did and, also, plugins that depends in events triggered are not doing anything in case the user access using the Mobile app.
      Reporting tools using logs won't be able to harvest all the necessary data too.

      Is not trivial to find a solution, because in some cases maybe is not the real USER who is calling the Web Service, imaging a SIS that is caching all the messages posted by an user for displaying it in a dashboard or something like that. The post message view event will be launched but the real user didn't open the post.

      There are several ways to fix these:

      • Trigger the same events that the web interface always, in every new web service developed, when we detect that the request is via token (not simpleserver that is the way recommended for SIS)
      • Add a new mandatory parameter in all the new web services (and in someway in the existing) "logging or launchevents" to say if the information must be logged
      • Create new external functions for launching events in the system (so the client must launch events manually after doing some actions)

      We want to solve this for the new app


          Issue Links



              jleyva Juan Leyva
              jleyva Juan Leyva
              Component watchers:
              Adrian Greeve, Andrew Lyons, Eloy Lafuente (stronk7), Juan Leyva, Jun Pataleta, Sander Bangma
              0 Vote for this issue
              7 Start watching this issue