There IS discretion. They could have "referred" him to the truant officer, and directed him to tell the kid "be more careful next time, OK?"
This is a shakedown, period.
A lot of people don't have their minds right on that point.
The Constitution is the supreme law. All other government statutes, regulations, policies, etc. must stay within constitutional bounds.
The gun free school act is a flagrant violation of the Second Amendment, not to mention an abuse of the Commerce Clause.