Court refuses to quash rape case against teacher