To understand the event "The teacher gave the class homework.  All the students groaned.", it is important to know that Teachers give homework to students as part of the training of the students.