Galaxy groups in the 2dF Galaxy Redshift Survey: effects of environment on star formation