Several current external functions does not launch events, this means that not logging is done for users.
This is problematic, since some other plugins may depend on events launched by plugins (like forum) and the course log is not populated with this information (MOBILE-782).
Note that a web service can be executed as a single USER or as an admin account, we can detect if an USER is the one launching the Web Service and in that case launch the event, example:
$event = \mod_forum\event\course_module_viewed::create($params);
|
$event->add_record_snapshot('course_modules', $cm);
|
$event->add_record_snapshot('course', $course);
|
$event->add_record_snapshot('forum', $forum);
|
$event->trigger();
|
This can be problematic, 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 or something like that.
There are several ways to fix these:
- Force external functions to launch events always. (Maybe adding a new mandatory parameter "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)
Same applies for activity completion hooks, see: MOBILE-863 and MOBILE-782
- has been marked as being related by
-
MOBILE-863 Completion viewed is not set when a user opens a forum in the app
- Closed
-
MOBILE-782 Student Activity not showing in Logs/Reports
- Closed
- will help resolve
-
MOBILE-782 Student Activity not showing in Logs/Reports
- Closed