mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-31133 calendar: Replace the deprecated function usage with core_calendar_renderer class
This commit is contained in:
parent
e16e2300c5
commit
f468956988
@ -28,6 +28,7 @@ require_once('../config.php');
|
||||
require_once($CFG->dirroot.'/calendar/event_form.php');
|
||||
require_once($CFG->dirroot.'/calendar/lib.php');
|
||||
require_once($CFG->dirroot.'/course/lib.php');
|
||||
require_once($CFG->dirroot.'/calendar/renderer.php');
|
||||
|
||||
$eventid = required_param('id', PARAM_INT);
|
||||
$confirm = optional_param('confirm', false, PARAM_BOOL);
|
||||
@ -121,7 +122,10 @@ echo $OUTPUT->box_end();
|
||||
|
||||
// Print the event so that people can visually confirm they have the correct event
|
||||
$event->time = calendar_format_event_time($event, time(), null, false);
|
||||
calendar_print_event($event, false);
|
||||
$renderer = $PAGE->get_renderer('core_calendar');
|
||||
echo $renderer->start_layout();
|
||||
echo $renderer->event($event);
|
||||
echo $renderer->complete_layout();
|
||||
|
||||
echo $OUTPUT->box_end();
|
||||
echo $OUTPUT->footer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user