2nd tour looks if assignment is accepted

This commit is contained in:
Filip Izydorczyk 2021-01-14 15:05:41 +01:00
parent fafd94f469
commit 28e872ce3a

View File

@ -91,12 +91,14 @@ public class AssignmentService {
if (com.isPresent()) {
final List<Assignment> assignments = this.getCommisionAssignments(com.get());
assignments.forEach(a -> {
final Groups group = a.getGroup();
if (group.getCapacity() > group.getRegisteredStudents().size()) {
e.claimGroup(group);
accepted.add(group);
} else {
removed.add(group);
if (a.isAccepted() == false) {
final Groups group = a.getGroup();
if (group.getCapacity() > group.getRegisteredStudents().size()) {
e.claimGroup(group);
accepted.add(group);
} else {
removed.add(group);
}
}
});
}