Skip to content

Commit

Permalink
Student Scheduling: Required Sections / Configs
Browse files Browse the repository at this point in the history
- CourseRequest.isRequired(Section) -- corrected the config checking when there is a section required
  • Loading branch information
tomas-muller committed Nov 17, 2020
1 parent 12657a9 commit 62bfaa7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/org/cpsolver/studentsct/model/CourseRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,13 @@ public boolean isRequired(Section section) {
if (choice.getSubpartId().equals(section.getSubpart().getId())) {
hasSubpart = true;
if (choice.sameSection(section)) hasMatchingSection = true;
} else if (!hasMatchingConfig) {
for (Subpart subpart: section.getSubpart().getConfig().getSubparts()) {
if (choice.getSubpartId().equals(subpart.getId())) {
hasMatchingConfig = true;
break;
}
}
}
}
}
Expand Down

0 comments on commit 62bfaa7

Please sign in to comment.