Skip to content

Commit

Permalink
Merge pull request #598 from bcgov/feature/Grad2-2341RecordAuditHisto…
Browse files Browse the repository at this point in the history
…ryStudentFlagsEdit

Grad2-2341 Flip updating flags for students
  • Loading branch information
arybakov-cgi authored Dec 6, 2023
2 parents fbb0630 + b1e0b93 commit dd75e14
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
validation.stopOnErrors();
return Pair.of(new GraduationStudentRecord(), null);
}
if(hasDataChanged.hasDataChanged() && !sourceObject.getProgram().equalsIgnoreCase(gradEntity.getProgram())) {
if(hasDataChanged.hasDataChanged()) {
deleteStudentOptionalPrograms(sourceObject.getStudentID());
deleteStudentCareerPrograms(sourceObject.getStudentID());
if(gradEntity.getProgram().equalsIgnoreCase("SCCP")) {
Expand All @@ -220,19 +220,17 @@ public Pair<GraduationStudentRecord, GradStatusEvent> updateGraduationStatus(UUI
} else {
deleteStudentAchievements(sourceObject.getStudentID(), accessToken);
}
}

if("".equals(sourceObject.getRecalculateGradStatus()) || "N".equalsIgnoreCase(sourceObject.getRecalculateGradStatus())) {
gradEntity.setRecalculateGradStatus(null);
}
else {
gradEntity.setRecalculateGradStatus(sourceObject.getRecalculateGradStatus());
}
if ("".equals(sourceObject.getRecalculateProjectedGrad()) || "N".equalsIgnoreCase(sourceObject.getRecalculateProjectedGrad())) {
gradEntity.setRecalculateProjectedGrad(null);
}
else {
gradEntity.setRecalculateProjectedGrad(sourceObject.getRecalculateProjectedGrad());
} else {
if ("".equals(sourceObject.getRecalculateGradStatus()) || "N".equalsIgnoreCase(sourceObject.getRecalculateGradStatus())) {
gradEntity.setRecalculateGradStatus(null);
} else {
gradEntity.setRecalculateGradStatus(sourceObject.getRecalculateGradStatus());
}
if ("".equals(sourceObject.getRecalculateProjectedGrad()) || "N".equalsIgnoreCase(sourceObject.getRecalculateProjectedGrad())) {
gradEntity.setRecalculateProjectedGrad(null);
} else {
gradEntity.setRecalculateProjectedGrad(sourceObject.getRecalculateProjectedGrad());
}
}


Expand Down

0 comments on commit dd75e14

Please sign in to comment.