Class StudentDropService

java.lang.Object
edu.ucsb.cs156.frontiers.services.StudentDropService

@Service public class StudentDropService extends Object
Carries out everything that needs to happen when roster students are dropped from a course (that is, when their roster status becomes DROPPED, e.g. because they are missing from a newly uploaded or synced roster). Code that drops students should call handleDroppedStudents(List), so that this class is the single place to add any further work that a drop requires.
  • Constructor Details

  • Method Details

    • handleDroppedStudents

      public void handleDroppedStudents(List<RosterStudent> droppedStudents)
      Handles the consequences of dropping the given students. Currently, each student is removed from every team they belong to.

      The team memberships are removed from the given student and team objects as well as from the database. Callers typically hold these objects outside of a transaction and save the students again afterwards (e.g. RemoveStudentsJob does), so the objects must not keep referring to the deleted memberships.

      Parameters:
      droppedStudents - the students who have been dropped from their course