Planned school attack thwarted