Well, usually there are ways of figuring out if there's an inherent inability to grasp the material, or if the kid is just slacking off.
In cases of the latter, I definitely think disciplinary action is fair. (grounded, no video games, etc.)
Yeah if it's obvious the kid is not trying it's a different story and perhaps the kid deserves some (cival) punishment like "no more video games", but in lot of cases a course can just be so hard that you can still fail even if you try hard. For example I suck at math - most people do have a weakness or subject they're not good at. So I used to always get very poor marks. In fact I failed grade 11 math, I got like 27%, and I worked harder in that class then every other class combined, which I got 80-90 in. I even got 99 in one class. My parents were not mad at me. Now if I would have just left it at that and called it quits, then they probably would have. But I decided to not get a job that summer, and instead I took summer school, and passed it with a 70% which is super good for math, for me. So next school year I was no longer behind.
To me a logical punishment for that kid would of been to have to show his homework to his parents, or if he plays lot of video games, that he can't anymore until his grades improved, something along those lines.
I can't imagine how horrifying that must of been for the kid. That's almost something you'd see in a whacked murder movie. The whole sense of being forced to kill another being that you love. That will really mess you up forever. Even though it's "just a hamster" it was still a being he was close to and probably played with every day. It would be like if some robbers broke into your house, held a gun to your head and told you to put your cat in the microwave and turn it on. Or for those who don't care about animals, how about this, imagine a robber comes into your house pointing a gun to your head, throws you another gun, and forces you to kill your wife, lets assume that there is no way you can shoot the robber with said gun, maybe he has a bunch of guys also pointing a gun at you, or something. Just imagine the psychological effects of being in a situation like this. That's keeping the cruelty factor aside.