From: nicolasconnault Date: Thu, 4 Oct 2007 07:44:13 +0000 (+0000) Subject: Instantiating a full $grade_item object, otherwise the get_displaytype() method is... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9f2e50fc0f299be51eb29fb80eec3f3ab33bf8a7;p=moodle.git Instantiating a full $grade_item object, otherwise the get_displaytype() method is not available and causes a fatal error --- diff --git a/grade/edit/tree/outcomeitem.php b/grade/edit/tree/outcomeitem.php index 6bea8b76b5..aa90c21522 100644 --- a/grade/edit/tree/outcomeitem.php +++ b/grade/edit/tree/outcomeitem.php @@ -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'));