Teacher accused of improper relationship appears in court