On the distribution of the order over residue classes