Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-41517 Do not call fix_course_sortorder unnecessarily

Thanks to Thomas Worthington
  • Loading branch information...
commit f68ebb8282c1468020a2643421966c9104f106d1 1 parent abb7671
@marinaglancy marinaglancy authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 course/lib.php
View
4 course/lib.php
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.