DAYTON, Ohio -- A former substitute teacher must register as a sex offender but avoided prison after being sentenced Thursday on charges connected with her having sexual contact with students.

Madeline Marx, 24, who worked in Oakwood and Kettering schools, did receive five years of probation on each of two counts of sexual battery, according to WDTN Channel 2. If she violates the probation, she could be sent to prison.

She is classified as a Tier III sex offender and must register her address every 90 days for the rest of her life, the Dayton Daily News reports.

Marx apologized before her sentencing Thursday by Judge Steven Dankov in Montgomery County Common Pleas Court.

"I cannot express how sorry I am for what I've done, especially to the victims and their families," Marx said, according to WKEF.

Marx pleaded guilty last month to the two sexual battery charges. She was arrested in November and accused of having inappropriate relationships with three students, WKEF Channel 6 reports.

According to the Daily News, a 17-year-old student says he received oral sex from Marx last summer in the parking lot of a Big Lots. A 16-year-old student said he had intercourse with the substitute teacher in the parking lot of an apartment complex.

Marx also told police she sent nude pictures to students using social media.

She is a 2016 graduate of the University of Dayton with a bachelor's degree in education, the Daily News reports. She now is prohibited from working in a job that would allow her to have contact with anyone under the age of 18, WDTN reports.

To comment on this story, please visit Thursday's crime and courts comments page.