I pray these madmen, or evil men, be stopped before they act. But dead Lord, I want to read some day that people didn’t lie on the floor. I want to read that someone shouted “Let’s roll,” and they all rushed the bastard.
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.