Inelastic heavy ion scattering in a folding model