Judge on teacher who had sex with student: 'What young man would not jump on that candy?'

Former Pennsylvania high school teacher Erica Ann Ginnetti pleaded guilty to having sex with a male student. She was sentenced April 3, 2015, to 30 days in jail and 60 days house arrest. (Photo via County of Montgomery, Pa., District Attorney) less Former Pennsylvania high school teacher Erica Ann Ginnetti pleaded guilty to having sex with a male student. She was sentenced April 3, 2015, to 30 days in jail and 60 days house arrest. (Photo via County of ... more Image 1 of / 1 Caption Close Judge on teacher who had sex with student: 'What young man would not jump on that candy?' 1 / 1 Back to Gallery

A former Pennsylvania teacher whose flirtations allegedly led to sex with a 17-year-old male student presented an irresistible temptation, a judge told her.

Erica Ann Ginnetti, 35, was sentenced Fridayto 30 days in jail and 60 days house arrest after pleading guilty in December to "institutional sexual assault" for having sex with a student and disseminating sexually explicit material, according to the Philadelphia Inquirer.

The inappropriate relationship began in spring 2013, when Ginnetti approached the boy at a school dance and began flirting with him, the paper reported. The two began daily exchanges of cellphone messages, photos and videos and eventually had sex in her car in July 2013.

RELATED: Teacher accused of sex with student ... after already being arrested for alleged sex with student

"That is candy to a young man," Judge Garrett D. Page, of Pennsylvania's Montgomery County Court, told Ginnetti at her sentencing.

According to the Daily Mail, Page asked the remorseful Ginnetti, "What young man would not jump on that candy?"

The former math and calculus teacher had faced seven to 14 years in prison before Page's relatively lenient sentence drew criticism from some observers, the Daily Mail said.

Her sentence also included three years probation, 100 hours community service and the requirement that she register as a sex offender for the next 25 years, according to the Daily Mail.

RELATED: Charges get worse for teachers accused of cocaine-fueled sex trip with students

Ginnetti, a wife and mother, said it was a "life-changing experience" that cost her a career and almost meant the loss of her family, according to CBS Philly.

She wept as she read a letter of apology in court, the Daily Mail reported.