The collisionality dependence of the quasilinear particle flux due to the ion temperature gradient (ITG) and trapped electron mode (TEM) instabilities is studied, by including electron collisions modeled by a pitch-angle scattering collision operator in the gyrokinetic equation. The inward transport due to ITG-modes is mainly caused by magnetic curvature and thermodiffusion and can be reversed as electron collisions are introduced, if the plasma is far from marginal stability. However, if the plasma is close to marginal stability, collisions may even enhance the inward transport. The sign and the magnitude of the transport are sensitive to the form of the collision operator, to the magnetic drift normalized to the real frequency of the mode, and to the density and temperature scale lengths. These analytical results are in agreement with previously published gyrokinetic simulations. Unlike the ITG-driven flux, the TEM-driven flux is expected to be outwards for conditions far from marginal stability and inwards otherwise.