A former Madison Public Schools teacher accused of having a sexual relationship with a student took a plea deal on Friday.