Skip to content

Commit

Permalink
Merge pull request #1479 from bcgov/feature/v33v46
Browse files Browse the repository at this point in the history
Fixes for V33 & V46
  • Loading branch information
alexmcdermid authored Jan 10, 2025
2 parents bf6a57b + 19180e6 commit abd71f9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public FteCalculationResult calculateFte(StudentRuleData studentData) {
}

private boolean isOnlineSchool(StudentRuleData studentRuleData) {
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public FteCalculationResult calculateFte(StudentRuleData studentData) {
}

private boolean isOnlineSchool(StudentRuleData studentRuleData) {
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public List<SdcSchoolCollectionStudentValidationIssue> executeValidation(Student
}

private boolean onlineConditionPassed(StudentRuleData studentRuleData) {
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
return studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.CONT_ED.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode()) || studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public boolean shouldExecute(StudentRuleData studentRuleData, List<SdcSchoolColl
log.debug("In shouldExecute of SchoolAgedNoOfCoursesRule-V46: for collectionType {} and sdcSchoolCollectionStudentID :: {}" , FteCalculatorUtils.getCollectionTypeCode(studentRuleData),
studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollectionStudentID());

var onlineAndContinuingFacilityCodes = Arrays.asList(FacilityTypeCodes.DISTONLINE.getCode(), FacilityTypeCodes.DIST_LEARN.getCode());
var onlineAndContinuingFacilityCodes = Arrays.asList(FacilityTypeCodes.DISTONLINE.getCode(), FacilityTypeCodes.DIST_LEARN.getCode(), FacilityTypeCodes.CONT_ED.getCode());

var shouldExecute = isValidationDependencyResolved("V46", validationErrorsMap) && !onlineAndContinuingFacilityCodes.contains(studentRuleData.getSchool().getFacilityTypeCode());

Expand Down Expand Up @@ -66,9 +66,7 @@ public List<SdcSchoolCollectionStudentValidationIssue> executeValidation(Student

private boolean conditionPassed(StudentRuleData studentRuleData) {
var student = studentRuleData.getSdcSchoolCollectionStudentEntity();
return DOBUtil.isSchoolAged(student.getDob()) && SchoolGradeCodes.get8PlusGradesNoGA().contains(student.getEnrolledGradeCode()) &&
(!studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DISTONLINE.getCode())
&& !studentRuleData.getSchool().getFacilityTypeCode().equalsIgnoreCase(FacilityTypeCodes.DIST_LEARN.getCode()));
return DOBUtil.isSchoolAged(student.getDob()) && SchoolGradeCodes.get8PlusGradesNoGA().contains(student.getEnrolledGradeCode());
}

}

0 comments on commit abd71f9

Please sign in to comment.