Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee78814
)
MDL-41517 Do not call fix_course_sortorder unnecessarily
author
Marina Glancy
<marina@moodle.com>
Tue, 3 Sep 2013 03:45:00 +0000
(13:45 +1000)
committer
Marina Glancy
<marina@moodle.com>
Tue, 3 Sep 2013 03:45:00 +0000
(13:45 +1000)
Thanks to Thomas Worthington
course/lib.php
patch
|
blob
|
blame
|
history
diff --git
a/course/lib.php
b/course/lib.php
index
a0b5f5a
..
52462a2
100644
(file)
--- a/
course/lib.php
+++ b/
course/lib.php
@@
-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) {