MDL-49324 grades: Remove category aggregation change backend
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 29 Jan 2016 06:03:34 +0000 (14:03 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 24 Feb 2016 06:39:09 +0000 (14:39 +0800)
The UI for this was removed several releases ago and this code is no longer
called.

grade/edit/tree/index.php

index 92f8391..cdf9b80 100644 (file)
@@ -30,8 +30,6 @@ require_once $CFG->dirroot.'/grade/edit/tree/lib.php';
 $courseid        = required_param('id', PARAM_INT);
 $action          = optional_param('action', 0, PARAM_ALPHA);
 $eid             = optional_param('eid', 0, PARAM_ALPHANUM);
-$category        = optional_param('category', null, PARAM_INT);
-$aggregationtype = optional_param('aggregationtype', null, PARAM_INT);
 
 $url = new moodle_url('/grade/edit/tree/index.php', array('id' => $courseid));
 $PAGE->set_url($url);
@@ -53,18 +51,6 @@ $PAGE->requires->js('/grade/edit/tree/functions.js');
 $gpr = new grade_plugin_return(array('type'=>'edit', 'plugin'=>'tree', 'courseid'=>$courseid));
 $returnurl = $gpr->get_return_url(null);
 
-// Change category aggregation if requested
-if (!is_null($category) && !is_null($aggregationtype) && confirm_sesskey()) {
-    if (!$grade_category = grade_category::fetch(array('id'=>$category, 'courseid'=>$courseid))) {
-        print_error('invalidcategoryid');
-    }
-
-    $data = new stdClass();
-    $data->aggregation = $aggregationtype;
-    grade_category::set_properties($grade_category, $data);
-    $grade_category->update();
-}
-
 //first make sure we have proper final grades - we need it for locking changes
 $normalisationmessage = null;