While I don't approve of this type of social engineering I do believe that the school is acting within their sphere of control.
Does the school own the property? If so, the owner/operator of the school controls what activities can be participated in on that property.
If students don't want to be forced, (coerced), into this type of control then they should vote with their feet.