by Tim Hunt.
The place the list of activity types is built seems to be the get_all_mods function in course/lib.php - the first bit of that function. At the moment the list is sorted alphbetically. That is the collatorlib::asort($modnames); call.