Instantiating a full $grade_item object, otherwise the get_displaytype() method is not available and causes a fatal error
This commit is contained in:
@@ -40,6 +40,7 @@ if ($item = get_record('grade_items', 'id', $id, 'courseid', $course->id)) {
|
||||
} else {
|
||||
$item->cmid = 0;
|
||||
}
|
||||
$item = new grade_item($item);
|
||||
|
||||
} else {
|
||||
$item = new grade_item(array('courseid'=>$courseid, 'itemtype'=>'manual'));
|
||||
|
||||
Reference in New Issue
Block a user