1. In lieu of a criminal proceeding under section 299.6, a county attorney may bring a civil action against a parent, guardian, or legal or actual custodian of a child who is of compulsory attendance age, has not completed educational requirements, and is truant, if the parent, guardian, or legal or actual custodian has failed to cause the child to attend a public school or an accredited nonpublic school, or to place the child under competent private instruction or independent private instruction in the manner provided in this chapter. If the court finds that the parent, guardian, or legal or actual custodian has failed to cause the child to attend as required in this section, the court shall assess a civil penalty of not less than one hundred but not more than one thousand dollars for each violation established.
 2. Funds received from civil penalties assessed pursuant to this section shall be paid to the school district of residence or school district of enrollment, if open enrolled, of the person against whom the court assessed the penalty. The school district shall use moneys received under this subsection to support programs for students who meet the definition of at-risk children adopted by the department of education.