Skip to content

Commit

Permalink
GRAD2-2128 - HD-19762 New sort for the Adult Graduation Algorithm, ad…
Browse files Browse the repository at this point in the history
…d Course Level
  • Loading branch information
kamal-mohammed committed Jun 28, 2023
1 parent 1c4356b commit 5bd65cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,14 +482,14 @@ private void setCourseAssessmentDataForAlgorithm(CourseAlgorithmData courseAlgDa
private void sortCoursesBasedOnProgram(String program, List<StudentCourse> studentCourses,
List<StudentAssessment> studentAssessments, Date adultStartDate) {
switch (program) {
case "2018-EN" -> {
case "2018-EN", "2023-EN" -> {
studentCourses.sort(new StudentCoursesComparator(program));
studentAssessments.sort(
Comparator.comparing(StudentAssessment::getProficiencyScore, Comparator.nullsLast(Double::compareTo)).reversed()
.thenComparing(StudentAssessment::getSpecialCase, Comparator.nullsLast(String::compareTo))
.thenComparing(StudentAssessment::getSessionDate));
}
case "2018-PF", "2004-EN", "2004-PF" -> studentCourses.sort(new StudentCoursesComparator(program));
case "2018-PF", "2023-PF", "2004-EN", "2004-PF" -> studentCourses.sort(new StudentCoursesComparator(program));
case "1950" -> {
/*
* Split Student courses into 2 parts
Expand Down

0 comments on commit 5bd65cf

Please sign in to comment.