From e491e79c664b307a94e7c4e81a6779067c169fc0 Mon Sep 17 00:00:00 2001 From: Nick Phillips Date: Wed, 8 Apr 2020 16:32:21 +1200 Subject: [PATCH] Fix session_report_viewed get_url when groupby missing. --- classes/event/session_report_viewed.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/event/session_report_viewed.php b/classes/event/session_report_viewed.php index 4fe8940..b315269 100644 --- a/classes/event/session_report_viewed.php +++ b/classes/event/session_report_viewed.php @@ -74,13 +74,14 @@ class session_report_viewed extends \core\event\base { * @return \moodle_url */ public function get_url() { - // Mode is optional. + // Mode and groupby are optional. $mode = empty($this->other['mode']) ? "" : $this->other['mode']; + $groupby = empty($this->other['groupby']) ? "" : $this->other['groupby']; return new \moodle_url('/mod/attendance/view.php', array('id' => $this->contextinstanceid, 'studentid' => $this->relateduserid, 'mode' => $mode, 'view' => $this->other['view'], - 'groupby' => $this->other['groupby'], + 'groupby' => $groupby, 'sesscourses' => $this->other['sesscourses'], 'curdate' => $this->other['curdate'])); }