yes, but you are thinking self preservation, I am talking about stopping a mad man that is attempting to kill you and all your friends, it is defiantly a dangerous idea, but given that you have a better chance of getting to him before he reloads compared to the window, and you have a chance of startling him, maybe even enough for him to drop the gun, attacking him is defiantly the more reasonable option, also, if you knock him down, he will seem more human to the other students, therefore some may help you.
essentially, it all boils down to, if you go for the window, you will probably die with a bullet in your back, if you do nothing, you will probably die with a bullet in your head, if you attack him while he is reloading, well, you might have saved your live and the lives of everyone else in the room.