Would it matter at that point? If the shooter gets in they're all dead regardless if they're huddled in a corner or not.

And that's ignoring the fact you don't know if the classroom door has windows or gives any clarity as to who's in the classroom. You can't definitively say that them taking the test was worse than hiding in a corner. They're gonna stay in the room no matter what.