Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop/alex grad2 2580 #261

Merged
merged 4 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ public class StudentSearchRequest implements Serializable {
LocalDate gradDateTo;

Boolean validateInput;
String activityCode;

}
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ public boolean updateStudentCredentialPosting(UUID studentID, String credentialT

public List<StudentCredentialDistribution> getStudentCredentialsForUserRequestDisRun(String credentialType, StudentSearchRequest studentSearchRequest, boolean onlyWithNullDistributionDate, String accessToken) {
List<StudentCredentialDistribution> scdList = new ArrayList<>();
if(StringUtils.isBlank(studentSearchRequest.getActivityCode())) {
studentSearchRequest.setActivityCode("USERDIST");
}
List<UUID> studentIDs = studentSearchRequest.getStudentIDs();
if(studentIDs == null || studentIDs.isEmpty()) {
studentIDs = getStudentsForSpecialGradRun(studentSearchRequest, accessToken);
Expand Down Expand Up @@ -535,8 +538,8 @@ private void processCertificate(List<List<UUID>> partitions, StudentSearchReques
gradStudentCertificatesRepository.findRecordsForUserRequestByStudentIdOnly(subList);
} else {
scdSubList = onlyWithNullDistributionDate?
gradStudentTranscriptsRepository.findRecordsWithNullDistributionDateForUserRequest(subList)
: gradStudentTranscriptsRepository.findRecordsForUserRequest(subList);
gradStudentCertificatesRepository.findRecordsWithNullDistributionDateForUserRequest(subList)
infstar marked this conversation as resolved.
Show resolved Hide resolved
: gradStudentCertificatesRepository.findRecordsForUserRequest(subList);
}
if (!scdSubList.isEmpty()) {
scdList.addAll(scdSubList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,8 @@ public void testGetStudentCredentialsForUserRequestDisRun_OC_SearchRequest() {
List<StudentCredentialDistribution> result = commonService.getStudentCredentialsForUserRequestDisRun("OC",searchRequest,true,"accessToken");
assertThat(result).isNotEmpty();

searchRequest.setActivityCode("USERDIST");

result = commonService.getStudentCredentialsForUserRequestDisRun("OT",searchRequest,false,"accessToken");
assertThat(result).isNotEmpty();

Expand Down
Loading