Teacher appears in court for sex arrest