I worked in the schools for several years. The young women, from budding to gradation were wearing things that would be rare outside of a school. They enjoy being daring and noticed. They do get attention. Females will distract no matter how they move or dress. I have fought dress codes all of my life.
Equality is the first step. Making boys responsible for their own civil behavior comes before that. This kid's correct. It is like the "she was asking for it" BS.
The administrators want control, they want to show that they are traditional and they rationalize to make excuses to maintain the status quo. They require shoes for "safety" attempting to sound reasonable. They come up with bare shoulders, cleavage, skirt liength concepts that are just weirdly obsessive.
The bottom line the opposite sex is interesting, sexy, distracting, and these thoughts will come up. Children should be required to be naked, if anything, so they don't grow up with shame, unrealistic concepts of body image, function, or the importance of clothing. Of course then maturity would be defined as allowed to wear clothing, like getting rid of the school uniforms. They'd revolt.
So, what needs to be done...no dress codes anywhere. Nothing to criminalize a simply naked human body.
Jbee