Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
MDL-43532 Course: Remove deprecated functions from calendar
Browse files Browse the repository at this point in the history
This function was deprecated in 2.4 and was due for removal in 2.6.

Removing as per deprecation policy.
  • Loading branch information
andrewnicols committed Jan 2, 2014
1 parent bbb291b commit 2ad8f0f
Showing 1 changed file with 1 addition and 74 deletions.
75 changes: 1 addition & 74 deletions calendar/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,79 +598,6 @@ public function show_month_detailed(calendar_information $calendar, moodle_url $
return $output;
}

/**
* Displays a filter selection table
*
* @param calendar_information $calendar
* @return string
* @deprecated since Moodle 2.4 MDL-32309
* @see calendar_filter_controls()
*/
protected function filter_selection_table(calendar_information $calendar, moodle_url $returnurl = null) {
global $SESSION;
debugging('Method core_calendar_renderer::filter_selection_table() is deprecated, please use '.
'calendar_filter_controls() instead', DEBUG_DEVELOPER);

if ($returnurl === null) {
$returnurl = $this->page->url;
}

$output = html_writer::start_tag('div', array('class'=>'filters'));
$output .= html_writer::start_tag('table');
$output .= html_writer::start_tag('tr');

// Global events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var' => 'showglobal', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strglobalevents = get_string('globalevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_GLOBAL)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_global', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $strglobalevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strglobalevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $strglobalevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strglobalevents.'</span>').')');
}

// Course events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showcourses', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strcourseevents = get_string('courseevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_COURSE)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_course', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $strcourseevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strcourseevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $strcourseevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strcourseevents.'</span>').')');
}
$output .= html_writer::end_tag('tr');

if(isloggedin() && !isguestuser()) {
$output .= html_writer::start_tag('tr');
// Group events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showgroups', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$strgroupevents = get_string('groupevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_GROUP)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_group', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $strgroupevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$strgroupevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $strgroupevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$strgroupevents.'</span>').')');
}
// User events
$link = new moodle_url(CALENDAR_URL.'set.php', array('var'=>'showuser', 'return' => base64_encode($returnurl->out(false)), 'sesskey'=>sesskey()));
$struserevents = get_string('userevents', 'calendar');
if (calendar_show_event_type(CALENDAR_EVENT_USER)) {
$output .= html_writer::tag('td', '', array('class'=>'calendar_event_user', 'style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $struserevents).' '.get_string('shown', 'calendar').' ('.html_writer::link($link, get_string('clickhide', 'calendar').'<span class="accesshide">'.$struserevents.'</span>').')');
} else {
$output .= html_writer::tag('td', '', array('style'=>'width:8px;'));
$output .= html_writer::tag('td', html_writer::tag('strong', $struserevents).' '.get_string('hidden', 'calendar').' ('.html_writer::link($link, get_string('clickshow', 'calendar').'<span class="accesshide">'.$struserevents.'</span>').')');
}
$output .= html_writer::end_tag('tr');
}
$output .= html_writer::end_tag('table');
$output .= html_writer::end_tag('div');
return $output;
}

/**
* Displays upcoming events
*
Expand Down Expand Up @@ -855,4 +782,4 @@ protected function subscription_action_form($subscription, $courseid) {
$html .= html_writer::end_tag('form');
return $html;
}
}
}

0 comments on commit 2ad8f0f

Please sign in to comment.