A former Edmonton teacher charged with sexual exploitation has admitted to having sex with his former student several times.

In court Wednesday, a judge accepted former teacher, Brad Ashley Glenn's guilty plea to sexual exploitation.

In the agreed statement of facts, Glenn admitted to having sex with his former student several times, the first time when she was 17, and no longer a student of his.

The court heard the former student was attending WP Wagner High School where Glenn had taught for years, before being laid off and taking a teaching job at Kate Chegwin Junior High School.

The court also heard how the accused and victim had a dating relationship, while he was married. Glenn bought the former student groceries and took her dinner. They told each other they were in love.

The former student later told school counselors she felt Glenn was taking advantage of her.

The court heard when the former student eventually told school officials what was going on, she asked Glenn not to hate her, in a text message, he replied "I don't, just don't sell me out."

Glenn resigned from his teaching job in June, 2010 – and was arrested at his Edmonton home in September of the same year.

Glenn will be sentenced on July 19 - before then, a risk evaluation of Glenn will be performed.

With files from Sean Amato