'Horny' teacher jailed for sex offence