This happened to me once in a freshman chemistry class. The course had a few hundred students and most of them failed the first preliminary exam. The questions bore no resemblance to what we had covered in class, and one was based on a recent publication. As far as I know, the one person to do well was already a chemistry superstar prior to the course. The professor chewed us all out afterwards for not applying ourselves. I'm still angry about it to this day. None of us were dumb or not trying. Either she failed as a professor to teach us what she expected us to learn, or she was placing unreasonable expectations on us to derive new conclusions during a stressful exam. It's not wrong to expect someone to make leaps based on something they've newly learned, but there is surely a better context for that.