The bottom line is that government cannot cut constitutional corners even in pursuit of a goal it identifies as being for the public good.

Whether the police or a school want to search or seize a person, it has to be done in a manner that's reasonable. There was no reason to suspect any single person in that hallway, yet every single person in there was forced, with no choice, and seized by police in a completely unreasonable manner.