FIXED: script was calling fix_course_sortorder() before courseorder have been renamed to coursecount.
FIXED:
script was calling fix_course_sortorder() before courseorder have been renamed to coursecount.

dilawar/moodle