All the details aren't in, but this case apparently involved a police chase that led to the school, a school resource officer was present and wasn't able to stop the shooter from entering the school (nor were the pursuing police officers).
The first responders called for help, and a Border Patrol agent came to the scene, ran in alone and killed the shooter.