So much this. I think in the Netherlands schools/teachers get the right to discipline their students for faulty behaviour, to a certain extent.
So beatings, excessive punishment and verbal abuse are not allowed. But when you start school basically as a student you accept that you can be disciplined for incorrect behaviour.
Now, personally, I would have failed him for the test, full stop and give him 1 week's detention/cleaning the classroom. But letting him resit the test is already super lenient.
So yeah, tell your friend to suck it up. It's not like 15-20 minutes a day that it takes to clean a classroom will kill him, nor is it child-labour or in any way illegal.