Browse Source

Fix #221 always pass timestart to calendar update function.

MOODLE_32_STABLE
Dan Marsden 8 years ago
parent
commit
bfc9c1511a
  1. 2
      classes/calendar_helpers.php
  2. 2
      classes/structure.php

2
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;

2
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,

Loading…
Cancel
Save