BAKERSFIELD, Calif. (KGET) — A McFarland High School teacher has pleaded no contest to having sex with a 17-year-old student, court records say.

Elvia Gonzalez pleaded no contest Thursday to unlawful sexual intercourse, and a charge of contacting a minor with the intent to commit a sex act was dismissed, according to the court website. Sentencing is set for Oct. 22. She faces up to 16 months in jail.

The student told police he had sex with Gonzalez between 10 to 15 times. He said they showered together at Gonzalez’s residence when her children were away.

The teen said he began talking to Gonzalez at the end of August of last year because she offered to tutor him. They exchanged phone numbers and flirted with each other, and soon began meeting outside of school, according to court documents.

Gonzalez picked him up and drove him to unincorporated areas outside McFarland, where they had sex in her vehicle, the teen said in the documents. Gonzalez also sent the teen inappropriate photos and text messages, according to police.