Merge branch 'MDL-33554' of git://github.com/mouneyrac/moodle
authorSam Hemelryk <sam@moodle.com>
Wed, 13 Jun 2012 23:20:16 +0000 (11:20 +1200)
committerSam Hemelryk <sam@moodle.com>
Wed, 13 Jun 2012 23:20:16 +0000 (11:20 +1200)
course/externallib.php

index b3619c0..e58d5cd 100644 (file)
@@ -1376,6 +1376,9 @@ class core_course_external extends external_api {
                 // 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);
         }