A primary school has said it was “devastated” to learn it was the target of former pupil Nicholas Prosper for a mass shooting.