diff --git a/3rd_party/sources/cpsolver-1.4-SNAPSHOT-sources.jar b/3rd_party/sources/cpsolver-1.4-SNAPSHOT-sources.jar index e1c3505b13..42b6835f14 100644 Binary files a/3rd_party/sources/cpsolver-1.4-SNAPSHOT-sources.jar and b/3rd_party/sources/cpsolver-1.4-SNAPSHOT-sources.jar differ diff --git a/JavaSource/org/unitime/timetable/gwt/resources/StudentSectioningMessages.java b/JavaSource/org/unitime/timetable/gwt/resources/StudentSectioningMessages.java index 0cc72d0104..8d39a24c01 100644 --- a/JavaSource/org/unitime/timetable/gwt/resources/StudentSectioningMessages.java +++ b/JavaSource/org/unitime/timetable/gwt/resources/StudentSectioningMessages.java @@ -3677,4 +3677,7 @@ public interface StudentSectioningMessages extends Messages { @DefaultMessage("For an up to date schedule, please visit {0}.") String textEmailLinkToUniTime(String baseUrl); + + @DefaultMessage("Enrolled in {0} instead.") + String enrolledInAlt(String course); } \ No newline at end of file diff --git a/JavaSource/org/unitime/timetable/reports/studentsct/Reservations.java b/JavaSource/org/unitime/timetable/reports/studentsct/Reservations.java index 613ca28bcd..11da0a610c 100644 --- a/JavaSource/org/unitime/timetable/reports/studentsct/Reservations.java +++ b/JavaSource/org/unitime/timetable/reports/studentsct/Reservations.java @@ -87,7 +87,7 @@ public CSVFile createTable(Assignment assignment, DataPrope Set studentIds = new HashSet(); for (Course course: r.getOffering().getCourses()) for (CourseRequest cr: course.getRequests()) - if (r.isApplicable(cr.getStudent()) && matches(cr)) + if (r.isApplicable(cr.getStudent()) && matches(cr) && matches(offering.getCourse(cr.getStudent()))) studentIds.add(cr.getStudent().getId()); if (studentIds != null && !studentIds.isEmpty()) { int assigned = 0, total = 0; diff --git a/JavaSource/org/unitime/timetable/reports/studentsct/UnusedReservations.java b/JavaSource/org/unitime/timetable/reports/studentsct/UnusedReservations.java index d6efbea970..3e6eb496f3 100644 --- a/JavaSource/org/unitime/timetable/reports/studentsct/UnusedReservations.java +++ b/JavaSource/org/unitime/timetable/reports/studentsct/UnusedReservations.java @@ -153,13 +153,13 @@ public CSVFile createTable(Assignment assignment, DataPrope } else if (reservation instanceof CourseReservation) { studentIds = new HashSet(); for (CourseRequest cr: ((CourseReservation)reservation).getCourse().getRequests()) - if (matches(cr)) + if (matches(cr) && matches(offering.getCourse(cr.getStudent()))) studentIds.add(cr.getStudent().getId()); } else { studentIds = new HashSet(); for (Course course: reservation.getOffering().getCourses()) for (CourseRequest cr: course.getRequests()) - if (reservation.isApplicable(cr.getStudent()) && matches(cr)) + if (reservation.isApplicable(cr.getStudent()) && matches(cr) && matches(offering.getCourse(cr.getStudent()))) studentIds.add(cr.getStudent().getId()); } if (studentIds != null && !studentIds.isEmpty()) { @@ -260,7 +260,12 @@ public int compare(Enrollment o1, Enrollment o2) { }); Hashtable> overlapingSections = new Hashtable>(); List av = courseRequest.getAvaiableEnrollmentsSkipSameTime(assignment); - if (av.isEmpty() || (av.size() == 1 && av.get(0).equals(courseRequest.getInitialAssignment()) && getModel().inConflict(assignment, av.get(0)))) { + if (enrollment != null) { + if (enrollment.getOffering().equals(reservation.getOffering())) + line.add(new CSVFile.CSVField(MSG.reservationNotUsed())); + else + line.add(new CSVFile.CSVField(MSG.enrolledInAlt(enrollment.getCourse().getName()))); + } else if (av.isEmpty() || (av.size() == 1 && av.get(0).equals(courseRequest.getInitialAssignment()) && getModel().inConflict(assignment, av.get(0)))) { if (courseRequest.getCourses().get(0).getLimit() >= 0) line.add(new CSVFile.CSVField(MSG.courseIsFull())); else if (SectioningRequest.hasInconsistentRequirements(courseRequest, null)) @@ -318,10 +323,7 @@ else if (!i.hasNext()) } line.add(new CSVFile.CSVField(message)); } else { - if (courseRequest.getAssignment(assignment) == null) - line.add(new CSVFile.CSVField(MSG.courseNotAssigned())); - else - line.add(new CSVFile.CSVField(MSG.reservationNotUsed())); + line.add(new CSVFile.CSVField(MSG.courseNotAssigned())); } } } diff --git a/WebContent/WEB-INF/lib/cpsolver-1.4-SNAPSHOT.jar b/WebContent/WEB-INF/lib/cpsolver-1.4-SNAPSHOT.jar index 677e37a096..41de121de8 100644 Binary files a/WebContent/WEB-INF/lib/cpsolver-1.4-SNAPSHOT.jar and b/WebContent/WEB-INF/lib/cpsolver-1.4-SNAPSHOT.jar differ