Arming most teachers is not a good idea. I'm glad some teachers I had weren't. LOL Anyway, if students knew there were guns hidden in classrooms, some might find a way to get them.
Schools should be better designed to thwart such attacks, but bear in mind that the military is not fully protected against terrorist acts, nor are police station, so we can't expect to make our schools into bombproof bunkers, nor make school buses like armored personnel carriers.
Even armed guards in schools wouldn't fully protect students, because they're targets and not often adequately armed to prevent mass slaughter by well-armed crazies. Trying to hit a protected invader among a mass of students would probably not work.
Still, schools can be better designed to protect people in classrooms. Doors and windows can be hardened without creating a prison atmosphere that is detrimental to learning. Exterior doors can be locked during school, but still open-able from the inside in case of fire, etc. Emergency exits to the outside in classrooms may also be a good thing, especially in fires and other emergencies.