mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
when no gradebook roles is set, there are lots of sql breakages so we should check gradebookroles first
This commit is contained in:
parent
4d7e30b3d8
commit
0893aa30e8
1 changed files with 5 additions and 0 deletions
|
@ -112,6 +112,11 @@ class grade_report {
|
||||||
function grade_report($courseid, $gpr, $context, $page=null) {
|
function grade_report($courseid, $gpr, $context, $page=null) {
|
||||||
global $CFG, $COURSE;
|
global $CFG, $COURSE;
|
||||||
|
|
||||||
|
if (!$CFG->gradebookroles) {
|
||||||
|
error ('no roles defined in admin->appearance->graderoles');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->courseid = $courseid;
|
$this->courseid = $courseid;
|
||||||
if ($this->courseid == $COURSE->id) {
|
if ($this->courseid == $COURSE->id) {
|
||||||
$this->course = $COURSE;
|
$this->course = $COURSE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue