Dynamics of the orientation of active and passive scalars in two-dimensional turbulence