Skip to content

Commit

Permalink
Merge pull request #515 from bcgov/grad-release
Browse files Browse the repository at this point in the history
Grad release 1.16.0
  • Loading branch information
githubmamatha authored Mar 26, 2024
2 parents 273cebb + 8cb5605 commit 6df12f5
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 47 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-graduation-api</artifactId>
<version>1.8.53</version>
<version>1.8.54</version>
<name>educ-grad-graduation-api</name>
<description>Ministry of Education GRAD GRADUATION API</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,22 @@ public class GradProgram implements Serializable {

private Code code;

private String expiryDate = "";

public Code getCode() {
return code;
}

public void setCode(Code value) {
this.code = value;
}

public String getExpiryDate() {
return expiryDate;
}

public void setExpiryDate(String value) {
this.expiryDate = value;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private EdwGraduationSnapshot runHypotheticalGradAlgorithm(String pen, Integer g
}
boolean isHypotheticalPass = false;
GraduationData graduationData = null;
if (StringUtils.isNotBlank(gradProgramCode)) {
if (StringUtils.isNotBlank(gradProgramCode) && !"SCCP".equalsIgnoreCase(gradProgramCode)) {
// run hypothetical grad algorithm
graduationData = gradAlgorithmService.runHypotheticalGraduatedAlgorithm(studentID, gradProgramCode, gradYear.toString(), accessToken);
if (graduationData != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,14 +723,15 @@ private GradProgram getGradProgram(ca.bc.gov.educ.api.graduation.model.dto.Gradu
GradProgram gPgm = new GradProgram();
Code code = new Code();
if (graduationDataStatus.getGradStatus().getProgram() != null) {
ca.bc.gov.educ.api.graduation.model.dto.GradProgram gradProgram = webClient.get().uri(String.format(educGraduationApiConstants.getProgramNameEndpoint(), graduationDataStatus.getGradStatus().getProgram()))
GraduationProgramCode gradProgram = webClient.get().uri(String.format(educGraduationApiConstants.getProgramNameEndpoint(), graduationDataStatus.getGradStatus().getProgram()))
.headers(h -> {
h.setBearerAuth(accessToken);
h.set(EducGraduationApiConstants.CORRELATION_ID, ThreadLocalStateUtil.getCorrelationID());
}).retrieve().bodyToMono(ca.bc.gov.educ.api.graduation.model.dto.GradProgram.class).block();
}).retrieve().bodyToMono(GraduationProgramCode.class).block();
if (gradProgram != null) {
code.setDescription(gradProgram.getProgramName());
code.setName(gradProgram.getProgramName());
gPgm.setExpiryDate(EducGraduationApiUtils.formatDate(gradProgram.getExpiryDate()));
}
}
code.setCode(graduationDataStatus.getGradStatus().getProgram());
Expand Down
Loading

0 comments on commit 6df12f5

Please sign in to comment.