In my time at school whole class punishments were not unusual. The most common reason was the class being noisy when the teacher returned to the classroom and those responsible refusing to own up, as a result the whole class was punished. A few times it was because the entire class had failed a test, happened in music, maths and French.
We were taken out to the front of the classroom one row at a time and had to stand in a line. The teacher would take his belt from his desk drawer, or pull it down from under his jacket, and order us to stand in a line. The pupil at the front of the queue would hold out his hand and be strapped, on to the next pupil and continuing until the whole class, boys and girls, had been punished. Usually we got one stroke each, but twice it was one on each hand with a thick leather 2 tail school belt. All such events happened in S1, S2 and S3.
It was pretty sore and often unfair as many of the pupils had done nothing wrong.