diff --git a/classes/calendar_helpers.php b/classes/calendar_helpers.php index e4e3f93..dc0e0f2 100644 --- a/classes/calendar_helpers.php +++ b/classes/calendar_helpers.php @@ -84,7 +84,7 @@ function attendance_create_calendar_events($sessionsids) { * @param $timestart int start time of the event * @return bool result of updating */ -function attendance_update_calendar_event($caleventid, $timeduration, $timestart = null) { +function attendance_update_calendar_event($caleventid, $timeduration, $timestart) { $caleventdata = new stdClass(); $caleventdata->timeduration = $timeduration; $caleventdata->timestart = $timestart; diff --git a/classes/structure.php b/classes/structure.php index c8d657c..772a021 100644 --- a/classes/structure.php +++ b/classes/structure.php @@ -919,7 +919,7 @@ class mod_attendance_structure { $sess->timemodified = $now; $DB->update_record('attendance_sessions', $sess); if ($sess->caleventid) { - attendance_update_calendar_event($sess->caleventid, $duration); + attendance_update_calendar_event($sess->caleventid, $duration, $sess->sessdate); } $event = \mod_attendance\event\session_duration_updated::create(array( 'objectid' => $this->id,