Skip to content

Commit

Permalink
Merge branch 'MDL-31133-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed May 10, 2012
2 parents 702cb39 + 064f0c8 commit 1c7eb3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
6 changes: 5 additions & 1 deletion calendar/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
17 changes: 0 additions & 17 deletions calendar/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,23 +620,6 @@ function calendar_add_event_metadata($event) {
return $event;
}

/**
* Prints a calendar event
*
* @deprecated Moodle 2.0 - MDL-22887 please do not use this function any more.
* @todo MDL-31133 - will be removed in Moodle 2.3
* @see core_calendar_renderer event function
*/
function calendar_print_event($event, $showactions=true) {
global $CFG, $USER, $OUTPUT, $PAGE;
debugging('calendar_print_event is deprecated please update your code', DEBUG_DEVELOPER);
$renderer = $PAGE->get_renderer('core_calendar');
if (!($event instanceof calendar_event)) {
$event = new calendar_event($event);
}
echo $renderer->event($event);
}

/**
* Get calendar events
*
Expand Down

0 comments on commit 1c7eb3d

Please sign in to comment.