(a) The court shall order any respondent found to be in violation of any provision of sections 363A.08 to 363A.19 and 363A.28 , subdivision 10, to pay a civil penalty to the state. This penalty is in addition to all damages recoverable at law and punitive damages to be paid to an aggrieved party. The court shall determine the amount of the civil penalty to be paid, taking into account the seriousness and extent of the violation, the public harm occasioned by the violation, whether the violation was intentional, and the financial resources of the respondent. Any penalties imposed under this provision shall be paid into the general fund of the state. In all cases where the court finds that the respondent has engaged in an unfair discriminatory practice, the court shall order the respondent to pay an aggrieved party who has suffered discrimination compensatory damages, including mental anguish or suffering, in an amount up to three times the actual damages sustained. In all cases, the court may also order the respondent to pay an aggrieved party punitive damages pursuant to section 549.20 . In any case under this chapter that is decided by a jury, the jury shall determine the amount of all damages to be awarded.