Search in sources :

Example 6 with StudentResultSummary

use of teammates.common.datatransfer.StudentResultSummary in project teammates by TEAMMATES.

the class FeedbackContributionQuestionDetails method getStudentResults.

private Map<String, StudentResultSummary> getStudentResults(Map<String, List<String>> teamMembersEmail, Map<String, TeamEvalResult> teamResults) {
    Map<String, StudentResultSummary> studentResults = new LinkedHashMap<>();
    teamResults.forEach((key, teamResult) -> {
        List<String> teamEmails = teamMembersEmail.get(key);
        int i = 0;
        for (String studentEmail : teamEmails) {
            StudentResultSummary summary = new StudentResultSummary();
            summary.claimedToInstructor = teamResult.normalizedClaimed[i][i];
            summary.perceivedToInstructor = teamResult.normalizedAveragePerceived[i];
            studentResults.put(studentEmail, summary);
            i++;
        }
    });
    return studentResults;
}
Also used : StudentResultSummary(teammates.common.datatransfer.StudentResultSummary) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

StudentResultSummary (teammates.common.datatransfer.StudentResultSummary)6 TeamEvalResult (teammates.common.datatransfer.TeamEvalResult)4 FeedbackResponseAttributes (teammates.common.datatransfer.attributes.FeedbackResponseAttributes)4 LinkedHashMap (java.util.LinkedHashMap)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Map (java.util.Map)2 FeedbackParticipantType (teammates.common.datatransfer.FeedbackParticipantType)2