Former teacher pleads guilty to sexual contact with a minor