Ex-teacher accused of having relationship with student