Permalink
Browse files

MDL-29392 grade/report/index.php should use $CFG->grade_profilereport

  • Loading branch information...
1 parent 3df2ab8 commit 30721d4913c3d6be3438e13bd82c6f31c3876e85 @mkassaei mkassaei committed with timhunt Sep 16, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 grade/report/index.php
@@ -38,7 +38,7 @@
}
if (empty($reports)) {
- print_error('noreports', 'debug', $CFG->wwwroot.'/course/view.php?id='.$course->id); // TODO: localize
+ print_error('noreports', 'debug', $CFG->wwwroot.'/course/view.php?id='.$course->id);
}
if (!isset($USER->grade_last_report)) {
@@ -59,11 +59,12 @@
if (array_key_exists('grader', $reports)) {
$last = 'grader';
- } else if (array_key_exists('user', $reports)) {
- $last = 'user';
+ } else if (array_key_exists($CFG->grade_profilereport, $reports)) {
+ $last = $CFG->grade_profilereport;
} else {
- $last = key(reset($reports));
+ reset($reports);
+ $last = key($reports);
}
}

0 comments on commit 30721d4

Please sign in to comment.