Save module before syncing relationships.
Save module sort order when updating course.
Always retrieve modules in sorting order.
Add jQuery UI.
Make modules sortable from UI.