The students got out of hand when the teacher left the room.
=
The class got out of hand when the teacher left the room