Haeli Way, 29, pleaded guilty to two counts of an improper relationship with a student. She had been arrested after allegedly engaging in sexual activity with two 17-year-old boys

A former teacher at a Texas school pleaded guilty on Friday to two counts of an improper relationship with a student.

Haeli Way, 29, had been arrested in December 2015 after allegedly engaging in sexual activity with two 17-year-old boys.

She was a teacher at Westlake High School in Austin, Texas.

She will not have to register as a sex offender and her attorney said she will likely get probation when she is sentenced on March 10, the Austin American-Statesman reported.

It is illegal in Texas for teachers to have sex with students, even if they are at least 17 years old, which is the state's legal age of consent.

She was a teacher at Westlake High School in Austin, Texas. She will not have to register as a sex offender and her attorney said she will likely get probation. Texas's legal age of consent is 17, though it is illegal for teachers to have sex with students

Wey was allegedly involved in two different months-long relationships with teenage boys at the high school.

Police say the crimes occurred during the summer and fall of 2015.

Wey met the first boy at a student ministry program in June of this year, and later, that summer accompanied him and his family to Africa on a ministry trip.

Wey was allegedly involved in two different months-long relationships with teenage boys at the high school. Wey accompanied the first boy and his family on a ministry trip to Africa

While on that trip she and the student, 17, had sex approximately ten times according to an affidavit acquired by 48 Hours' Crimesider.

The two then had a months-long relationship that ended when the student learned that Wey and another student, also 17, had been out together on a hike this fall.

The first student eventually told his parents about his alleged relationship with Wey, while the second student said they engaged in 'sexual contact' while out on their hike.

Wey was fired from her job in late October and voluntarily surrendered her teacher certification on December 15.

According to the Eanes Independent School District, which runs nine Texas schools including Westlake High, Wey passed background checks before being hired.