Ex-student testifies in trial of former teacher