Teacher quits, charged with sexual relationship with a student