restore MDL-23863 Category->coursecount is incremented if restoring to a new course.

This commit is contained in:
Sam Hemelryk 2010-09-21 10:12:58 +00:00
parent 47fffd8d60
commit 593fc4a977

View File

@ -920,7 +920,12 @@ abstract class restore_dbops {
$course->timemodified = $course->timecreated;
$course->visible = $category->visible;
return $DB->insert_record('course', $course);
$courseid = $DB->insert_record('course', $course);
$category->coursecount++;
$DB->update_record('course_categories', $category);
return $courseid;
}
/**