MDL-36559 core_grade: Deprecating unused functions print_toggle and get_toggles_html

This commit is contained in:
Frederic Massart
2012-11-21 17:29:14 +08:00
parent 4333bc64c8
commit 4cf69ee328
3 changed files with 4 additions and 4 deletions
-1
View File
@@ -140,7 +140,6 @@ $report->load_final_grades();
echo $report->group_selector;
echo '<div class="clearer"></div>';
// echo $report->get_toggles_html();
//show warnings if any
foreach($warnings as $warning) {
+4 -2
View File
@@ -517,10 +517,11 @@ class grade_report_grader extends grade_report {
/**
* Builds and returns a div with on/off toggles.
* @return string HTML code
* @deprecated since 2.4 as it appears not to be used any more.
*/
public function get_toggles_html() {
global $CFG, $USER, $COURSE, $OUTPUT;
debugging('Call to deprecated function grade_report_grader::get_toggles_html().', DEBUG_DEVELOPER);
$html = '';
if ($USER->gradeediting[$this->courseid]) {
if (has_capability('moodle/grade:manage', $this->context) or has_capability('moodle/grade:hide', $this->context)) {
@@ -557,10 +558,11 @@ class grade_report_grader extends grade_report {
* @param string $type The type of toggle
* @param bool $return Whether to return the HTML string rather than printing it
* @return void
* @deprecated since 2.4 as it appears not to be used any more.
*/
public function print_toggle($type) {
global $CFG, $OUTPUT;
debugging('Call to deprecated function grade_report_grader::print_toggle().', DEBUG_DEVELOPER);
$icons = array('eyecons' => 't/hide',
'calculations' => 't/calc',
'locks' => 't/lock',
-1
View File
@@ -94,7 +94,6 @@ print_grade_page_head($COURSE->id, 'report', 'grader', $reportname);
echo $report->group_selector;
echo '<div class="clearer"></div>';
// echo $report->get_toggles_html();
//show warnings if any
foreach($warnings as $warning) {