Add sort by course attribute, and costumize the comparing rule