diff --git a/classes/calendar_helpers.php b/classes/calendar_helpers.php index fe30c95..4107dda 100644 --- a/classes/calendar_helpers.php +++ b/classes/calendar_helpers.php @@ -84,7 +84,7 @@ function create_calendar_events($sessionsids) { * @param $timestart int start time of the event * @return bool result of updating */ -function update_calendar_event($caleventid, $timeduration, $timestart = null) { +function 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 9d67b12..8472bbd 100644 --- a/classes/structure.php +++ b/classes/structure.php @@ -916,7 +916,7 @@ class mod_attendance_structure { $sess->timemodified = $now; $DB->update_record('attendance_sessions', $sess); if ($sess->caleventid) { - update_calendar_event($sess->caleventid, $duration); + update_calendar_event($sess->caleventid, $duration, $sess->sessdate); } $event = \mod_attendance\event\session_duration_updated::create(array( 'objectid' => $this->id,