Students batch exit after finishing program

if a batch or student group finished their program , how the student exit works. there is student disable and exit options in student doc but its individual case . if a whole batch or student group is leaving that they finished their program and i dont want that student in any further operation how that works ?
can anyone help me with this one