Skip to content

Commit

Permalink
Online Student Scheduling: Reload-Offering Notifications
Browse files Browse the repository at this point in the history
- when an offering allows for re-scheduling, notify students that are in a status that does not allow for re-scheduling
  (e.g., because the re-scheduling window has passed)
  • Loading branch information
tomas-muller committed Dec 12, 2023
1 parent ac1cd7a commit f4c58a8
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,15 @@ else if (oldStudent != null)
XCourseRequest newRequest = getRequest(newStudent, course);
XEnrollment newEnrollment = getEnrollment(newRequest, offeringId);
if (oldRequest == null && newRequest == null) continue;
if (!hasReSchedulingStatus(newStudent == null ? oldStudent : newStudent, server)) continue; // no changes for students that cannot be re-scheduled
if (!hasReSchedulingStatus(newStudent == null ? oldStudent : newStudent, server)) {
if (newEnrollment != null && oldEnrollment != null && !isVerySame(newEnrollment.getCourseId(), newOffering.getSections(newEnrollment), oldOffering.getSections(oldEnrollment)))
server.execute(server.createAction(NotifyStudentAction.class)
.forStudent(server.getStudent(oldStudent == null ? newStudent.getStudentId() : oldStudent.getStudentId()))
.fromAction(name())
.withType(NotificationType.CourseChangeSchedule)
.oldEnrollment(oldOffering, course, oldEnrollment), helper.getUser());
continue; // no changes for students that cannot be re-scheduled
}

OnlineSectioningLog.Action.Builder action = helper.addAction(this, server.getAcademicSession());
action.setStudent(
Expand Down

0 comments on commit f4c58a8

Please sign in to comment.