Skip to content

Commit

Permalink
Merge pull request #324 from bcgov/GRAD2-2465-km
Browse files Browse the repository at this point in the history
GRAD2-2465 - Delete a student and related data
  • Loading branch information
kamal-mohammed authored Mar 18, 2024
2 parents 3c51b17 + 72b8a46 commit 4ad8cbd
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,30 @@ Delete All student related data ({STUDENT_API}/api/v1/student/conv/studentid/{st
STUDENT_RECORD_NOTE, STUDENT_CAREER_PROGRAMS, STUDENT_OPTIONAL_PROGRAM_HISTORY,
STUDENT_OPTIONAL_PROGRAM, GRADUATION_STUDENT_RECORD_HISTORY, GRADUATION_STUDENT_RECORD
*/
restUtils.removeAllStudentRelatedData(UUID.fromString(studentID), accessToken);
try {
restUtils.removeAllStudentRelatedData(UUID.fromString(studentID), accessToken);
} catch (Exception e) {
logger.info("Exception thrown when trying to delete student related data from grad student API.");
}

/*
Delete all Student certificates, transcripts and reports from API_GRAD_REPORT schema
Tables: STUDENT_CERTIFICATE, STUDENT_TRANSCRIPT and STUDENT_REPORT
*/
restUtils.removeAllStudentAchievements(UUID.fromString(studentID), accessToken);
try {
restUtils.removeAllStudentAchievements(UUID.fromString(studentID), accessToken);
} catch (Exception e) {
logger.info("Exception thrown when trying to delete student achievements.");
}

/*
Update TRAX_STUDENT_NO status to NULL
*/
restUtils.updateTraxStudentNo(new TraxStudentNo(pen, null, null), accessToken);
try {
restUtils.updateTraxStudentNo(new TraxStudentNo(pen, null, null), accessToken);
} catch (Exception e) {
logger.info("Exception thrown when trying to update TraxStudentNo.");
}
}
return pen;
}
Expand Down

0 comments on commit 4ad8cbd

Please sign in to comment.