If I read this correctly it sounds as if as long as the firearm is unloaded and lock up it is 100% legal to have a firearm on school property. 18.2-308 is the Virginia code making it illegal to possess a firearm on school property
See exception (VI)
The exemptions set out in 18.2-308 shall...