I don't know. You give up a lot of your constitutional rights once you step into a school (free speech, right to bear arms, right to assemble...). I bet it was perfectly legal.