Ideally, as soon as someone realized he had shot the grandmother the word would have gone out to lockdown every public spot in town until the bastard was caught or killed. I don't know the time frame of when he did that and when he got to the school. I'm guessing communication could have been better, but a small town like that probably wasn't expecting such an occurrence. You are never going to make any place perfectly safe, especially a school with people coming and going all the time. "Make the schools like prisons!" is never gonna work, "arm the teachers!" is (trust me) a bad idea, and "ban all guns!" is never gonna fly in America and would only remove guns from law-abiding non-crazy citizens anyway. We can and must do better, but you're never going to eliminate all risk from life. We go to the greatest lengths to protect presidents and four of them have been killed nonetheless.