MDL-58777 mod_assign: Explicitly sort records and set event priority
MDL-58777 mod_assign: Explicitly sort records and set event priority

The assign update events code depends on the "old" events in the
DB being returned in the same order as they were originally made,
however there was no guarantee that this would be the case.

There were also situations where the priority would not be explicitly
set (e.g., when creating the "original" event).

dilawar/moodle