Your argument is reasonable, just not based on constitutional principles. I don't think this law abides by the constitution, even if it seems reasonable enough. How do you reckon the feds have authority in such matters?
What the congress can do, however, is attach strings to federal assistance programs for schools to enforce these types of regulations. Since many schools systems or states absolutely depend on this money, the feds have a good deal of leeway in the kinds of regulations they can enforce.
This same kind of pressure gave us the national speed limit, raised the drinking age to 21, and created the right turn on red rule: all these measures were mandated at the federal level by tying compliance to federal highway funds.