Stopping wrong people from buying gun is going to prove extremely difficult. No matter how hard they tried, there will always be a way around if one couldn't get gun legally. For instance, that guy that shoots at Navy yard in DC area. This could have been prevented but unfortunately no matter what, this had happened. Don't forget, we all are human and human brain is very very powerful. If outlaw really wants to get gun, they will always find crack in the system... Usually though black market.
We have prohibited laws on drugs, and bombs, including the defunct alcohol prohibition, yet they found way into our territory regardless.
Solution? Very simple, and it is called EDUCATION.
If had that school administrators smart enough, they would have start a topic discussing about gun and its safety in the classroom, instead of making drama out of it and suspending student.