Permalink
Browse files

Merge branch 'MDL-29392_20' of git://github.com/timhunt/moodle into M…

…OODLE_20_STABLE
  • Loading branch information...
2 parents 2bc77f9 + 30721d4 commit 024315981725216edee5af96c5b777cc7e5e0bb4 Sam Hemelryk committed Sep 19, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 grade/report/index.php
View
9 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 0243159

Please sign in to comment.