MDL-28152 Improved detection of the course grade_category on course restore

This commit is contained in:
David Mudrak
2011-07-01 22:12:30 +02:00
parent 7fde489dae
commit 41f21f92cf
+1
View File
@@ -236,6 +236,7 @@ class restore_gradebook_structure_step extends restore_structure_step {
//get the already created course level grade category
$category = new stdclass();
$category->courseid = $this->get_courseid();
$category->parent = null;
$coursecategory = $DB->get_record('grade_categories', (array)$category);
if (!empty($coursecategory)) {