From 9f2e50fc0f299be51eb29fb80eec3f3ab33bf8a7 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 4 Oct 2007 07:44:13 +0000 Subject: [PATCH] Instantiating a full $grade_item object, otherwise the get_displaytype() method is not available and causes a fatal error --- grade/edit/tree/outcomeitem.php | 1 + 1 file changed, 1 insertion(+) 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')); -- 2.39.5