String fromStudentName = "";
String toStudentName = "";
String fromStudentComments = null;
String toStudentComments = null;
Student student = null;
float pointsBumpRatio = 0;
Courses courses = Courses.inst();
List<Student> studentList = courses.getStudentList(courseID);
for (Submission s : submissionList) {
student = null;
// search for student
for (Student stu : studentList) {
if (stu.getEmail().equals(s.getFromStudent())) {
student = stu;
}
}
if (student == null) {
fromStudentName = "[deleted]" + s.getFromStudent();
fromStudentComments = "";
} else {
fromStudentName = student.getName();
fromStudentComments = student.getComments();
}
student = courses.getStudentWithEmail(courseID, s.getToStudent());
if (student == null) {
toStudentName = "[deleted]" + s.getToStudent();
toStudentComments = ("");
} else {
toStudentName = student.getName();
toStudentComments = student.getComments();
}
// filter submisstion list by fromStudent
List<Submission> fromList = new LinkedList<Submission>();
for (Submission fs : submissionList) {