I am attaching a thread I discovered last week. What author/investigator basically says is the school system had made a deal with the sheriff not to prosecute/arrest students in an effort to keep the school system enrollment up. Higher enrollment means more state and federal money to the school board. The result was/is students and gangs figured out pretty fast the sheriff's quotas and took advantage of the lack of policing. I'm not saying that the shooter is a gang member, but the article lends itself as to why he wasn't picked up after so many calls, alerts, and police site visits.
It's a long read but very well documented. It speaks of evidence hidden, reports edited, officers called off certain individuals. It seemingly points blame to high level county officials.