Skip to content

Commit

Permalink
Merge pull request #5101 from IllianiCBT/education_daycareDropouts
Browse files Browse the repository at this point in the history
Prevented Dropout and Some Graduation Events Occurring for Very Young Children
  • Loading branch information
HammerGS authored Oct 21, 2024
2 parents f448dd7 + e120b82 commit c73352d
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -672,8 +672,11 @@ private static void processNewWeekChecks(Campaign campaign, Academy academy, Per
}

// does person want to drop out?
if (checkForDropout(campaign, academy, person, resources)) {
return;
// We don't process the dropout events for very young children.
if (person.getAge(campaign.getLocalDate()) > 6) {
if (checkForDropout(campaign, academy, person, resources)) {
return;
}
}

// was there a training accident?
Expand Down Expand Up @@ -1359,6 +1362,11 @@ private static void graduateChild(Campaign campaign, Person person, Academy acad
graduationRoll += person.getIntelligence().ordinal() - 12;
}

// We don't process the granularity of graduation events for very young children.
if (person.getAge(campaign.getLocalDate()) <= 6) {
graduationRoll = 30;
}

if (graduationRoll < 30) {
if (academy.isHomeSchool()) {
String reportMessage = String.format(resources.getString("graduatedBarelyHomeSchooled.text"),
Expand Down

0 comments on commit c73352d

Please sign in to comment.