Suppose I am sitting at a standard school desk with the little compartment full of books, pens, pencils etc. A guy comes to the door of the classroom with a gun. No place to hide, except behind other students. No other exit except through windows. Choice is to fight or cower and hope he shoots someone else.
What if I grab the table holding it in front of me and charge into the guy with the gun? Fairly decent chance of deflecting bullets on metal, wood or books in the desk. How about throwing books and chairs as you close the distance, then grabbing a desk or chair and smashing the fellow?
I have only been shooting for a few years. I still have not put enough rounds through my pistol to be able to shoot straight without really concentrating on it. The larger the caliber and the smaller the gun, the more pronounced this effect is, meaning a poorly trained shooter will shoot worse with a .45 than with a .22 --good news for the aggressive defender. A bad trigger pull can send a round very low or seriously to the right or left. An untrained shooter faced with flying books, chairs and teaching aids would likely panic just a little and start shooting wildly. Just how much range time and tactical training would we expect of a high school psychopath? Even a kid seriously into paintball has likely never had someone throw a desk at him and practice a cool aim.
Second, were I in a classroom and heard gunfire in another classroom, the last thing I would want to do would be to enter the hallway along with everyone else and either get shot or trampled in the panic. Lock the classroom door, bar it with desks and chairs, cover the window in the door, then figure out how to escape the classroom by another way, exterior windows, through the crawlway above the ceiling tiles etc. If the shooter attempts to enter, you will have delayed him with your barricade. Stop trying to escape at that point, put students unwilling to fight in the rear of the room and everybody get quiet and grab a desk or a chair. If the shooter manages to enter-- throw everything you have on him in waves of two or three. Once he has been hit and knocked off balance, the two or three most athletic people jump him and take the gun -- or just continue to beat him with chairs, desks and boots.
Finally, there was some advice in a previous post for HS students to let the professionals deal with things. In the case of the Columbine shootings, this meant staying in a school with two psychopathic killers for several hours. The main argument for self defense is that the police can't be everywhere and they are responsible for the safety of society, not of any particular individual. Until the police show up and take the perpetrator into custody, you are on your own.

Hide if you can, but there are only hiding places enough for 5% of a student population.

Run if you can, but most schools have central hallway systems with not nearly enough room to handle a mass panic exodus.

If you can't hide and you can't run your choices are to cower or fight. Hard to know which choice increases your chances of survival. I figure that I will one day give my life for something - might be old age, might be an accident, might be a disease. Dying taking out a psychopath seems like a better way of dying than witless in a nursing home, but that is my personal preference.