MDL-41517 Do not call fix_course_sortorder unnecessarily

Thanks to Thomas Worthington
This commit is contained in:
Marina Glancy
2013-09-03 13:55:04 +10:00
parent abb767192f
commit f68ebb8282
+3 -1
View File
@@ -4001,7 +4001,9 @@ function update_course($data, $editoroptions = NULL) {
context_moved($context, $newparent);
}
fix_course_sortorder();
if ($movecat || (isset($data->sortorder) && $oldcourse->sortorder != $data->sortorder)) {
fix_course_sortorder();
}
// Test for and remove blocks which aren't appropriate anymore
blocks_remove_inappropriate($course);