From what I have read this incident has yet to be fully investigated so not sure what was shown in class. I have heard it is the Hebdo cartoon of someone who is supposed to be Prophet Mohammed with a bomb on his head.
If it is the Hebdo cartoon, to be consistent about freedom of expression and censorship is it currently ok for teachers to show cartoons to school children of Jews with hook noses counting money to discuss anti-Semitism or the rise of Nazism? Or cartoons of black people in loin cloths looking like monkeys to discuss racism? Or cartoons of adults homosexuals fiddling with little boys to discuss LGBT issues?
If it is not ok to show these cartoons in school - I don't know if it is - why is it not ok?
I'm not sure it isn't ok provided that these items were being used in the context of education about changing social attitudes.
There are, for example, numerous Nazi-era posts that stereotype Jewish people that could be reasonably discussed in a social and historical context. I'm not sure about the specific example of racism you give, since I haven't seen any examples of that type, but there are other examples of racism that could be discussed in context, such as the 'Jim Crow' era, the Ku Klux Klan or the song 'Strange Fruit' in American cultural history. Your last example seems to be conflating homosexuality with paedophilia, which seems like a stretch too far to me.
As I said further up-thread, while tact and diplomacy have their place, the context of what this teacher did, and why he did it, is unknown at present. It is not the case that people have the automatic right to not feel offended, whereby their expectation would be that others should modify their behaviour in response to their taking offense. It maybe the case that avoiding giving offense just for the sake is something that most of us would do most of the time, but there does seem to be an assumption in this case that because some Muslims have traditional sensitivities about depictions of their prophet that such depictions should be proscribed for us non-Muslims: to me, that approach seems censorious.
Of late we've seen the UK government trying to promote the Union flag (the Union Jack), and while I wouldn't go out of my way to vandalise said flag I would certainly refuse to display, wave or in any sense endorse this symbol - and if that offends others then tough: but their taking offense at my position does not require me to adjust my views or behaviour accordingly so as to conform to their expectations regarding this flag. I was offended at the prejudice displayed by the likes of the CofE over same-sex marriage, and the ring-fencing of that particular organisation by the government, but they are free to maintain their prejudices even though I find them offensive.
While I don't usually actively seek to ridicule Christianity at every opportunity, I am free to do so whether or not some Christians are offended, and nor am I required to treat their particular religious traditions and superstitions seriously. I might personally choose to avoid being overtly confrontational or controversial in relation to the sensitivities of others, such as Christians, but I'm not required to modify my behaviour simply to fit with their sensitivities.
Why am I not free to adopt the same stance in relation to Islam?