Skip to content

Commit

Permalink
Fix XML template
Browse files Browse the repository at this point in the history
  • Loading branch information
arybakov-cgi committed Nov 18, 2023
1 parent 00494c1 commit 4c3913c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import ca.bc.gov.educ.api.gradbusiness.util.EducGraduationApiConstants;
import io.github.resilience4j.retry.annotation.Retry;
import jakarta.transaction.Transactional;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -290,11 +289,12 @@ public ResponseEntity<byte[]> getStudentCredentialPDFByType(String pen, String t
public ResponseEntity<byte[]> getStudentTranscriptPDFByType(String pen, String type, String accessToken) {
try {
byte[] reportData = prepareReportDataByPen(pen, type, accessToken).getBody();
boolean isPreview = (StringUtils.isNotBlank(type) && StringUtils.equalsAnyIgnoreCase(type, "xml", "interim"));
StringBuilder reportRequest = new StringBuilder();
String reportOptions = "\"options\": {\n" +
" \"cacheReport\": false,\n" +
" \"convertTo\": \"pdf\",\n" +
" \"preview\": \""+ ((StringUtils.isNotBlank(type) && StringUtils.equalsAnyIgnoreCase(type, "xml")) ? "true" : "false") +"\",\n" +
" \"preview\": \""+ (isPreview ? "true" : "false") +"\",\n" +
" \"overwrite\": false,\n" +
" \"reportName\": \"transcript\",\n" +
" \"reportFile\": \""+pen+" Transcript Report.pdf\"\n" +
Expand Down

0 comments on commit 4c3913c

Please sign in to comment.