Deja Vu.
Anyway... It's hard to accept your attempt as a viable solution because of *design*, not because the problem is impossible. What you're proposing is akin to the "Guns of the Patriots" storyline, where you need permission from "the system" be able to use your gun. Something that isn't going to happen unless (pretty much) the bullets themselves refuse to fire without authentication.
Specifically for your system, disables should happen automatically on the device after a timeout. *Enables* should be deliberate (combination, or BLE wireless device present to give permission. Remote disables should at least contain the serial (see keeloq or even basic garage door opener technology.)
Don't bother trying a generic lockout for schools. A criminal, by definition, wouldn't use a legally locked weapon. This is meant to keep little johnny from accidentally shooting little suzy, but still be obtainable in an emergency.
Honestly. A safe with a really fast palmprint reader would do. No gun modification necessary. A weapon can have a battery in it that lasts for years. Paired with an on switch when held is quite enough. If you're really bothering with bluetooth, your gun can tell you when it's battery is low anyway.