MDL-57497 core_calendar: added new calendar event class

Moved calendar_event class to new location using replaceclasses.php

Part of MDL-55611 epic.
This commit is contained in:
Mark Nelson 2016-12-23 11:31:06 +08:00 committed by Damyon Wiese
parent e9dfeec94e
commit e057f279e4
25 changed files with 901 additions and 877 deletions

View file

@ -52,11 +52,11 @@ function choice_set_events($choice) {
$event->timestart = $choice->timeopen;
$event->visible = instance_is_visible('choice', $choice);
$event->timeduration = 0;
$calendarevent = calendar_event::load($event->id);
$calendarevent = \core_calendar\event::load($event->id);
$calendarevent->update($event);
} else {
// Calendar event is on longer needed.
$calendarevent = calendar_event::load($event->id);
$calendarevent = \core_calendar\event::load($event->id);
$calendarevent->delete();
}
} else {
@ -73,7 +73,7 @@ function choice_set_events($choice) {
$event->timestart = $choice->timeopen;
$event->visible = instance_is_visible('choice', $choice);
$event->timeduration = 0;
calendar_event::create($event);
\core_calendar\event::create($event);
}
}
@ -88,11 +88,11 @@ function choice_set_events($choice) {
$event->timestart = $choice->timeclose;
$event->visible = instance_is_visible('choice', $choice);
$event->timeduration = 0;
$calendarevent = calendar_event::load($event->id);
$calendarevent = \core_calendar\event::load($event->id);
$calendarevent->update($event);
} else {
// Calendar event is on longer needed.
$calendarevent = calendar_event::load($event->id);
$calendarevent = \core_calendar\event::load($event->id);
$calendarevent->delete();
}
} else {
@ -110,7 +110,7 @@ function choice_set_events($choice) {
$event->timestart = $choice->timeclose;
$event->visible = instance_is_visible('choice', $choice);
$event->timeduration = 0;
calendar_event::create($event);
\core_calendar\event::create($event);
}
}
}