mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
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:
parent
e9dfeec94e
commit
e057f279e4
25 changed files with 901 additions and 877 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue