I have seen several conflicting versions of what actually happened. One local TV station, KETK 56 aired this story that claimed the project was school sanctioned and the gunpowder had been provided by the school, presumably by the Physics teacher.
One ATF officer was quoted as saying:
"From an ATF standpoint, I would personally like to see students not making gunpowder or cannons for class projects,
And to think we were worried at our district about students taking the alcohol based hand sanitizer and setting it on fire.
I once sat through a presentation by a high school science teacher from another district who went to great lengths to show off his ability to make explosions. While it was certainly entertaining, most of them were far too easily constructed and I found his admonishment, "There are some things I do but you don't" to his students would probably have done little to discourage them from trying it themselves.