It’s an old story used to illustrate communism.
Hey, wait! If the teacher said no one would fail, then how come he flunked the whole class. The original story doesn’t have the “no one would fail” part.