private void populateRecipientEmailsForGiver( CourseRoster roster, Map<String, List<StudentAttributes>> teamStudentTable, Set<String> recipientEmailsList, Map<String, Set<String>> responseCommentsAddedTable, FeedbackResponseCommentAttributes frc, FeedbackQuestionAttributes relatedQuestion, FeedbackResponseAttributes relatedResponse) { StudentAttributes giver = roster.getStudentForEmail(relatedResponse.giver); if (giver == null) { return; } if (frc.isVisibleTo(FeedbackParticipantType.GIVER)) { addRecipientEmailsToList( responseCommentsAddedTable, recipientEmailsList, frc.getId().toString(), relatedResponse.giver); } if (relatedQuestion.giverType == FeedbackParticipantType.TEAMS || frc.isVisibleTo(FeedbackParticipantType.OWN_TEAM_MEMBERS)) { addRecipientEmailsForTeam( teamStudentTable, recipientEmailsList, responseCommentsAddedTable, frc.getId().toString(), giver.team); } }
private void populateRecipientEmailsForTeamMember( CourseRoster roster, Map<String, List<StudentAttributes>> teamStudentTable, Set<String> recipientEmailsList, Map<String, Set<String>> responseCommentsAddedTable, FeedbackResponseCommentAttributes frc, FeedbackResponseAttributes relatedResponse) { if (frc.isVisibleTo(FeedbackParticipantType.RECEIVER_TEAM_MEMBERS)) { StudentAttributes studentOfThisEmail = roster.getStudentForEmail(relatedResponse.recipient); if (studentOfThisEmail == null) { addRecipientEmailsForTeam( teamStudentTable, recipientEmailsList, responseCommentsAddedTable, frc.getId().toString(), relatedResponse.recipient); } else { addRecipientEmailsForTeam( teamStudentTable, recipientEmailsList, responseCommentsAddedTable, frc.getId().toString(), studentOfThisEmail.team); } } }
private void populateRecipientEmailsForReceiver( CourseRoster roster, Map<String, List<StudentAttributes>> teamStudentTable, Set<String> recipientEmailsList, Map<String, Set<String>> responseCommentsAddedTable, FeedbackResponseCommentAttributes frc, FeedbackResponseAttributes relatedResponse) { if (frc.isVisibleTo(FeedbackParticipantType.RECEIVER)) { // recipientEmail is email if (roster.getStudentForEmail(relatedResponse.recipient) == null) { addRecipientEmailsForTeam( teamStudentTable, recipientEmailsList, responseCommentsAddedTable, frc.getId().toString(), relatedResponse.recipient); } else { addRecipientEmailsToList( responseCommentsAddedTable, recipientEmailsList, frc.getId().toString(), relatedResponse.recipient); } } }
private void populateRecipientEmailsForAllStudents( List<StudentAttributes> allStudents, Set<String> recipientEmailsList, Map<String, Set<String>> responseCommentsAddedTable, FeedbackResponseCommentAttributes frc) { if (frc.isVisibleTo(FeedbackParticipantType.STUDENTS)) { for (StudentAttributes student : allStudents) { addRecipientEmailsToList( responseCommentsAddedTable, recipientEmailsList, frc.getId().toString(), student.email); } } }