Phase change in an opinion-dynamics model with separation of time scales