Permalink
Browse files

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

…OODLE_21_STABLE
  • Loading branch information...
2 parents 6a49c01 + 1859247 commit 6831c9ff36b4ef578fd7f4a57702da756bb7fe60 Sam Hemelryk committed Sep 19, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 grade/report/index.php
View
@@ -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 6831c9f

Please sign in to comment.