Ex-teacher who raped student back in custody