MDL-31133 calendar: Replace the deprecated function usage with core_calendar_renderer class

This commit is contained in:
Ankit Agarwal
2012-05-09 14:23:27 +08:00
parent e16e2300c5
commit f468956988
+5 -1
View File
@@ -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();