From f8d0dae12046657cd59cba96de09cfa1e0cedb5f Mon Sep 17 00:00:00 2001 From: Nick Phillips Date: Thu, 25 Jul 2019 10:37:40 +1200 Subject: [PATCH] Fix logs generated for report_viewed event to include correct id param. (#413) --- classes/event/report_viewed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/event/report_viewed.php b/classes/event/report_viewed.php index 6b64a50..004bf2a 100644 --- a/classes/event/report_viewed.php +++ b/classes/event/report_viewed.php @@ -74,7 +74,7 @@ class report_viewed extends \core\event\base { * @return \moodle_url */ public function get_url() { - return new \moodle_url('/mod/attendance/report.php', array('id' => $this->objectid)); + return new \moodle_url('/mod/attendance/report.php', array('id' => $this->contextinstanceid)); } /** @@ -83,7 +83,7 @@ class report_viewed extends \core\event\base { * @return array of parameters to be passed to legacy add_to_log() function. */ protected function get_legacy_logdata() { - return array($this->courseid, 'attendance', 'report', 'report.php?id=' . $this->objectid, + return array($this->courseid, 'attendance', 'report', 'report.php?id=' . $this->contextinstanceid, $this->objectid, $this->contextinstanceid); }