Problem here is he prepared (and as such intended) to break the law, preparation disqualifies selfdefense.
As I said, I really hope they can take the principal/school to court from negligence as they were informed about the situation, but what he did was a punishable offense.