Likely, the kids who were on the "yearbook committee" put it in, and the teacher who had oversight and should have provided adult guidance was doing one of two things: picking their nose with one hand while their opposing thumb was jammed firmly up their anus, or...they saw it and approved wholeheartedly.
Either way, they should hang (speaking figuratively, job-wise)
Just imagine if this had been a middle school yearbook that had Barack Obama and Joe Biden or Nancy Pelosi on the list after Hitler and Bin Laden. The teacher would be gone, gone, gone, as would the principal, and there would be stories about the kids on the yearbook committee being the next Columbine perpetrators while their parents would be pilloried as right-wing extremists, tea party members or worse. They would be called racist, they and their kids would have to go to sensitivity training, and there might even be visits from The Department of Youth Services.