Permalink
Browse files

MDL-31133 calendar: Replace the deprecated function usage with core_c…

…alendar_renderer class
  • Loading branch information...
1 parent e16e230 commit f46895698889ebe170b77a0e723addb7ca49c6c0 @ankitagarwal ankitagarwal committed May 9, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 calendar/delete.php
View
@@ -28,6 +28,7 @@
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 @@
// 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();

0 comments on commit f468956

Please sign in to comment.