MDL-34209 JavaScript: Correct course Drag/drop random reordering
MDL-34209 JavaScript: Tidy up dragdrop code.