Skip to content

Commit

Permalink
MDL-58423 core_calendar: moved \core_calendar\event class
Browse files Browse the repository at this point in the history
Part of MDL-55611 epic.
  • Loading branch information
mdjnelson authored and danpoltawski committed Apr 4, 2017
1 parent 1dc764a commit e1cd93c
Show file tree
Hide file tree
Showing 72 changed files with 998 additions and 1,006 deletions.
8 changes: 4 additions & 4 deletions calendar/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public static function get_mini_calendar($courses, $groups, $users, $calmonth =
if (!isset($events[$eventid])) {
continue;
}
$event = new event($events[$eventid]);
$event = new \calendar_event($events[$eventid]);
$popupalt = '';
$component = 'moodle';
if (!empty($event->modulename)) {
Expand Down Expand Up @@ -1354,7 +1354,7 @@ public static function set_filters(array $courseeventsfrom, $ignorefilters = fal
/**
* Return the capability for editing calendar event
*
* @param event $event event object
* @param \calendar_event $event event object
* @return bool capability to edit event
*/
public static function can_edit_event($event) {
Expand Down Expand Up @@ -1444,7 +1444,7 @@ public static function get_default_courses() {
/**
* Get event format time
*
* @param event $event event object
* @param \calendar_event $event event object
* @param int $now current time in gmt
* @param array $linkparams list of params for event link
* @param bool $usecommonwords the words as formatted date/time.
Expand Down Expand Up @@ -1884,7 +1884,7 @@ public static function add_icalendar_event($event, $courseid, $subscriptionid, $
} else {
$return = CALENDAR_IMPORT_EVENT_INSERTED; // Insert.
}
if ($createdevent = event::create($eventrecord, false)) {
if ($createdevent = \calendar_event::create($eventrecord, false)) {
if (!empty($event->properties['RRULE'])) {
// Repeating events.
date_default_timezone_set($tz); // Change time zone to parse all events.
Expand Down
Loading

0 comments on commit e1cd93c

Please sign in to comment.