use of teammates.ui.template.FeedbackSubmissionEditQuestion in project teammates by TEAMMATES.
the class FeedbackSubmissionEditPageData method createQuestionsWithResponses.
private void createQuestionsWithResponses() {
questionsWithResponses = new ArrayList<>();
int qnIndx = 1;
for (FeedbackQuestionAttributes questionAttributes : bundle.getSortedQuestions()) {
int numOfResponseBoxes = questionAttributes.numberOfEntitiesToGiveFeedbackTo;
int maxResponsesPossible = bundle.recipientList.get(questionAttributes.getId()).size();
if (numOfResponseBoxes == Const.MAX_POSSIBLE_RECIPIENTS || numOfResponseBoxes > maxResponsesPossible) {
numOfResponseBoxes = maxResponsesPossible;
}
FeedbackSubmissionEditQuestion question = createQuestion(questionAttributes, qnIndx);
List<FeedbackSubmissionEditResponse> responses = createResponses(questionAttributes, qnIndx, numOfResponseBoxes);
questionsWithResponses.add(new StudentFeedbackSubmissionEditQuestionsWithResponses(question, responses, numOfResponseBoxes, maxResponsesPossible));
qnIndx++;
}
}
Aggregations