If the students are sitting at desks, the best strategy would be for some to rush and some to throw heavy objects (desks if possible) at a lone shooter. Doing nothing, lying on the floor, or crouching in the rear will just get the students shot. They're easy marks.
Obviously, some students will get shot. But there's no way the shooter would be able to shoot everybody if the students were prepared to act. Rushing the shooter and throwing heavy objects at him is the only way to stop the carnage.
You’re right, of course.
A laptop or tablet thrown hard at head level might be difficult to deflect.
That’s easy to say when you’ve never been in a similar situation. No one can say for certain how they will react in these situations. Don’t blame the victims