Skip to content

Commit

Permalink
MDL-34204 grader report: static call to non-static method.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Nov 15, 2012
1 parent ff63a3a commit 1b36a75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grade/report/grader/index.php
Expand Up @@ -107,7 +107,7 @@

// Perform actions
if (!empty($target) && !empty($action) && confirm_sesskey()) {
grade_report_grader::process_action($target, $action);
grade_report_grader::do_process_action($target, $action);
}

$reportname = get_string('pluginname', 'gradereport_grader');
Expand Down
6 changes: 5 additions & 1 deletion grade/report/grader/lib.php
Expand Up @@ -1580,13 +1580,17 @@ protected function get_collapsing_icon($element) {
return $icon;
}

public function process_action($target, $action) {
return self::do_process_action($target, $action);
}

/**
* Processes a single action against a category, grade_item or grade.
* @param string $target eid ({type}{id}, e.g. c4 for category4)
* @param string $action Which action to take (edit, delete etc...)
* @return
*/
public function process_action($target, $action) {
public static function do_process_action($target, $action) {
// TODO: this code should be in some grade_tree static method
$targettype = substr($target, 0, 1);
$targetid = substr($target, 1);
Expand Down

0 comments on commit 1b36a75

Please sign in to comment.