Courses courses = Courses.inst();
List<Student> studentList = courses.getStudentList(courseID);
// Filter out students who have submitted the evaluation
Evaluations evaluations = Evaluations.inst();
Evaluation evaluation = evaluations.getEvaluation(courseID,
evaluationName);
if (evaluation == null) {
System.err
.println(String
.format("Evaluation not found. CourseID = %s. Evaluation Name = %s",
courseID, evaluationName));
return;
}
List<Student> studentsToRemindList = new ArrayList<Student>();
for (Student s : studentList) {
if (!evaluations.isEvaluationSubmitted(evaluation, s.getEmail())) {
studentsToRemindList.add(s);
}
}
Date deadline = evaluation.getDeadline();
evaluations.remindStudents(studentsToRemindList, courseID,
evaluationName, deadline);
}