示例#1
0
  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);
    }
  }
示例#2
0
 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);
     }
   }
 }
示例#3
0
 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);
     }
   }
 }
示例#4
0
 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);
     }
   }
 }