Former teacher appears in court