Deputies: Teacher had sexual relationship with student