Sort teachers list by priority