Teacher accused of having sex with 14-year-old student