In my college thermodynamics class the professor said that he didn’t care if we got a text message in class, however he did care if we had our ringers on. So his rule was that if you got a text message and your phone went off loud enough for the whole room to hear it, you had two options.
You could either read the text out loud to the whole class, or you could bring in donuts for everyone at the next class (there were about 20 of us).
Of course everyone keeps their phones on silent, so it never happens… until smack dab in the middle of one of the exams, when the Professor’s phone gets a text message and rings out loud and clear in the middle of the exam.
Professor freezes, takes one look at his phone as we all start giggling, and says “Guess I’m bringing you guys all donuts on Wednesday”. (They were delicious).