I've seen loud, stupid kids sell pot during class and the teacher not notice (and no, she wasn't turning a blind eye). I would never trust teachers with something so important as keeping guns out of student's hands. I certainly wouldn't expect them to be able to recognize which room a shooting is occurring in and get there in time when the shooter inevitably shoots their classroom's gun-toting teacher first, much less aim correctly if they get the kid in their sights.
Besides, almost all school shootings are performed by students. That means that if you give teachers guns to ward off shootings, your implicitly giving them permission to shoot their students in extreme circumstances. Now, I think we can all agree its better a shooter dies than his class, but how will teachers handle their new responsibilities in more ambiguous circumstances? What if a kid starts attacking people with a knife? The teacher could shoot him, and deal with the probably horrible consequences for the rest of her life (or hit the wrong kid!), or not shoot and let the kid stab people. Sure, there's middle ground such as using the gun to threaten the student, but its naive to expect those to work in every situation just like its naive to expect random civilians with guns to react correctly whenever trouble breaks out. Plus, there's always going to be the crazy guy that shoots a kid for petty theft, or threatens a kid with a gun for minor disobedience and then shoots them when they don't comply.
I can think of so many ways this could go wrong, and so many better solutions.