MDL-41517 Do not call fix_course_sortorder unnecessarily
Thanks to Thomas Worthington
This commit is contained in:
+4
-1
@@ -2408,7 +2408,10 @@ function update_course($data, $editoroptions = NULL) {
|
||||
$context->update_moved($newparent);
|
||||
}
|
||||
|
||||
fix_course_sortorder();
|
||||
if ($movecat || (isset($data->sortorder) && $oldcourse->sortorder != $data->sortorder)) {
|
||||
fix_course_sortorder();
|
||||
}
|
||||
|
||||
// purge appropriate caches in case fix_course_sortorder() did not change anything
|
||||
cache_helper::purge_by_event('changesincourse');
|
||||
if ($changesincoursecat) {
|
||||
|
||||
Reference in New Issue
Block a user