Teacher gets probation for having sex with student