(a) Any compensatory damages after payment of attorney's fees and costs awarded to a prisoner in connection with a civil action brought against any state or local jail, prison, or correctional facility, or against any official or agent of such jail, person, or correctional facility, shall be paid directly to satisfy any outstanding restitution orders pending against the prisoner.
(b) The remainder of any such award after full payment of all pending restitution orders shall be forwarded to the prisoner.