when no gradebook roles is set, there are lots of sql breakages so we should check gradebookroles first

This commit is contained in:
toyomoyo 2007-09-27 02:29:46 +00:00
parent 4d7e30b3d8
commit 0893aa30e8

View file

@ -112,6 +112,11 @@ class grade_report {
function grade_report($courseid, $gpr, $context, $page=null) {
global $CFG, $COURSE;
if (!$CFG->gradebookroles) {
error ('no roles defined in admin->appearance->graderoles');
}
$this->courseid = $courseid;
if ($this->courseid == $COURSE->id) {
$this->course = $COURSE;