Teacher who married student appears in court