"Time from which events should be returned",
VALUE_DEFAULT, 0, NULL_ALLOWED),
'timeend' => new external_value(PARAM_INT,
- "Time to which the events should be returned",
- VALUE_DEFAULT, time(), NULL_ALLOWED),
+ "Time to which the events should be returned. We treat 0 and null as no end",
+ VALUE_DEFAULT, 0, NULL_ALLOWED),
'ignorehidden' => new external_value(PARAM_BOOL,
"Ignore hidden events or not",
VALUE_DEFAULT, true, NULL_ALLOWED),
$funcparam['courses'][] = $SITE->id;
}
+ // We treat 0 and null as no end.
+ if (empty($params['options']['timeend'])) {
+ $params['options']['timeend'] = PHP_INT_MAX;
+ }
+
$eventlist = calendar_get_events($params['options']['timestart'], $params['options']['timeend'], $funcparam['users'], $funcparam['groups'],
$funcparam['courses'], true, $params['options']['ignorehidden']);
// WS expects arrays.
This files describes API changes in /calendar/* ,
information provided here is intended especially for developers.
+=== 2.9 ===
+default values changes in code:
+* core_calendar_external::get_calendar_events_parameters() 'timeend' default option changed; now, by default,
+ all events are returned, not only the past ones.
+
=== 2.5 ===
required changes in code:
* calendar_add_icalendar_event() now requires a valid subscriptionid