What can students do if a professor penalizes an entire class because one student cheated on an exam? Today, I was taking a test in my intro to sociology course. It is a difficult enough class when the minimum requirement for an A is 96%. It is also difficult when the professor gets off-topic and does not cover important enough material. I'm taking the class pass/fail, so I'm not terribly worried right now. I have kept up a B+ so far.

We have an online textbook, which allows the reader to use the audio version, which reads the page out loud.

Today, during the test, someone near the back decided to play the audio on one of the chapters on which we were being tested. It played loudly for about two minutes, and the professor (who is not exactly relaxed) stood up and said the obvious about cheating policies. She said that if the cheater did not come forward before she left the classroom, she would penalize everyone's tests. She did not specify how, but just that she would do that.

She held behind everyone in the area from which she heard the audiobook, and let the others go. I was allowed to go, because I was not too close to the back, and also probably because I'm always on time and never on my phone in class.

I don't think she is allowed to penalize the entire class for the reason stated, but if she does, I'm reporting it to the dean of the university. However, our dean is known to not be the most responsive person. My question is: What should I do if the dean does not take the appropriate steps to help us? I may not be really affected by my grade in the class (again, pass/fail is how I'm taking it), but others are. Failing everyone for one person's actions is unacceptable. Please help!
The described event does taint the exams given by everybody in the room. Even if they didn't mean to cheat. Sorry.

What to do in such a case is a hard question. It ranges from doing nothing this time, but e.g. collecting cellphones and such next exam; just punishing the careless cheater (if caught); grade the affected question(s) for less maximal grade (or even not grade them at all, leaving them for a separate evaluation); or even repeat the exam.