2nd tour looks if assignment is accepted
This commit is contained in:
parent
fafd94f469
commit
28e872ce3a
@ -91,6 +91,7 @@ public class AssignmentService {
|
|||||||
if (com.isPresent()) {
|
if (com.isPresent()) {
|
||||||
final List<Assignment> assignments = this.getCommisionAssignments(com.get());
|
final List<Assignment> assignments = this.getCommisionAssignments(com.get());
|
||||||
assignments.forEach(a -> {
|
assignments.forEach(a -> {
|
||||||
|
if (a.isAccepted() == false) {
|
||||||
final Groups group = a.getGroup();
|
final Groups group = a.getGroup();
|
||||||
if (group.getCapacity() > group.getRegisteredStudents().size()) {
|
if (group.getCapacity() > group.getRegisteredStudents().size()) {
|
||||||
e.claimGroup(group);
|
e.claimGroup(group);
|
||||||
@ -98,6 +99,7 @@ public class AssignmentService {
|
|||||||
} else {
|
} else {
|
||||||
removed.add(group);
|
removed.add(group);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.userService.save(e);
|
this.userService.save(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user