Apparently the door to the classroom where the 19 children and two teachers were massacred was not locked, perhaps the result of chaos and panic.
The door was designed to automatically close and lock so it could not be opened from the outside. A teacher propped the door open, saw the shooter coming, and ran back inside, leaving the door propped open.
No security measures can overcome stupidity.