Former teacher accused of sex with student