Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…category
  • Loading branch information...
commit fe77a34ed051f679f94e052ad5f73021e61de407 1 parent 4db0616
@mouneyrac mouneyrac authored
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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.