when no gradebook roles is set, there are lots of sql breakages so we should check...
authortoyomoyo <toyomoyo>
Thu, 27 Sep 2007 02:29:46 +0000 (02:29 +0000)
committertoyomoyo <toyomoyo>
Thu, 27 Sep 2007 02:29:46 +0000 (02:29 +0000)
grade/report/lib.php

index b9f8e3692fc6c4a24017b4bf34c5fb9f06d7c54c..4185099638b76e279e18130db14566d1ba0f2a46 100755 (executable)
@@ -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;