Skip to content
Browse files

MDL-33554 update_categories didn't update the path field when moving …

…category
  • Loading branch information...
1 parent 4db0616 commit fe77a34ed051f679f94e052ad5f73021e61de407 @mouneyrac mouneyrac committed Jun 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 course/externallib.php
View
3 course/externallib.php
@@ -1372,6 +1372,9 @@ public static function update_categories($categories) {
// Finally move the category.
move_category($category, $parent_cat);
$category->parent = $cat['parent'];
+ // Get updated path by move_category().
+ $category->path = $DB->get_field('course_categories', 'path',
+ array('id' => $category->id));
}
$DB->update_record('course_categories', $category);
}

0 comments on commit fe77a34

Please sign in to comment.
Something went wrong with that request. Please try again.