(3)
(A) Except as provided in subparagraph (B), it shall be unlawful for any person, knowingly or with reckless disregard for the safety of another, to discharge or attempt to discharge a firearm that has moved in or that otherwise affects interstate or foreign commerce at a place that the person knows is a school zone.
(B) Subparagraph (A) does not apply to the discharge of a firearm—
(i) on private property not part of school grounds;
(ii) as part of a program approved by a school in the school zone, by an individual who is participating in the program;
(iii) by an individual in accordance with a contract entered into between a school in a school zone and the individual or an employer of the individual; or
(iv) by a law enforcement officer acting in his or her official capacity.