Use next available detention slot for each individual pupil when a group is put in detention.
Instead of booking the detention for the next slot when the whole group is free (could be a month or more away if some pupils already have detentions), the detentions should be booked into each pupil's next available slot.