use of teammates.ui.template.FeedbackResultsQuestionDetails in project teammates by TEAMMATES.
the class StudentFeedbackResultsPageData method createFeedbackResultsQuestionsWithResponses.
/**
* Parses the contents of the map and keeps only those data which will be displayed on the browser.
* @param questionsWithResponses Question with all responses
*/
private void createFeedbackResultsQuestionsWithResponses(Map<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> questionsWithResponses) {
feedbackResultsQuestionsWithResponses = new ArrayList<>();
int questionIndex = 1;
for (Map.Entry<FeedbackQuestionAttributes, List<FeedbackResponseAttributes>> questionWithResponses : questionsWithResponses.entrySet()) {
FeedbackQuestionAttributes question = questionWithResponses.getKey();
List<FeedbackResponseAttributes> responsesBundle = questionWithResponses.getValue();
FeedbackQuestionDetails questionDetailsBundle = question.getQuestionDetails();
/* Contain only those attributes which will be displayed on the page */
FeedbackResultsQuestionDetails questionDetails = createQuestionDetails(questionIndex, question, questionDetailsBundle, responsesBundle);
List<FeedbackResultsResponseTable> responseTables = createResponseTables(question, responsesBundle);
feedbackResultsQuestionsWithResponses.add(new StudentFeedbackResultsQuestionWithResponses(questionDetails, responseTables));
questionIndex++;
}
}
Aggregations