use of teammates.ui.template.ElementTag in project teammates by TEAMMATES.
the class FeedbackRankRecipientsQuestionDetails method getSubmissionOptionsHtmlForRankingRecipients.
private String getSubmissionOptionsHtmlForRankingRecipients(int totalNumRecipients, int rankGiven) {
StringBuilder result = new StringBuilder(100);
ElementTag option = PageData.createOption("", "", rankGiven == Const.INT_UNINITIALIZED);
result.append("<option" + option.getAttributesToString() + ">" + option.getContent() + "</option>");
for (int i = 1; i <= totalNumRecipients; i++) {
option = PageData.createOption(String.valueOf(i), String.valueOf(i), rankGiven == i);
result.append("<option" + option.getAttributesToString() + ">" + option.getContent() + "</option>");
}
return result.toString();
}
use of teammates.ui.template.ElementTag in project teammates by TEAMMATES.
the class InstructorFeedbackResultsPageData method buildTableColumnHeaderForGiverQuestionRecipientView.
private void buildTableColumnHeaderForGiverQuestionRecipientView(List<ElementTag> columnTags, Map<String, Boolean> isSortable) {
ElementTag photoElement = new ElementTag("Photo");
ElementTag recipientTeamElement = new ElementTag("Team", "id", "button_sortFromTeam", "class", "button-sort-ascending toggle-sort", "style", "width: 15%; min-width: 67px;");
ElementTag recipientElement = new ElementTag("Recipient", "id", "button_sortTo", "class", "button-sort-none toggle-sort", "style", "width: 15%; min-width: 90px;");
ElementTag responseElement = new ElementTag("Feedback", "id", "button_sortFeedback", "class", "button-sort-none toggle-sort", "style", "min-width: 95px;");
columnTags.add(photoElement);
columnTags.add(recipientTeamElement);
columnTags.add(recipientElement);
columnTags.add(responseElement);
isSortable.put(photoElement.getContent(), false);
isSortable.put(recipientTeamElement.getContent(), true);
isSortable.put(recipientElement.getContent(), true);
isSortable.put(responseElement.getContent(), true);
}
use of teammates.ui.template.ElementTag in project teammates by TEAMMATES.
the class InstructorFeedbackResultsPageData method buildMissingResponseRowsBetweenGiverAndPossibleRecipients.
/**
* Construct missing response rows between the giver identified by {@code giverIdentifier} and
* {@code possibleReceivers}.
*/
private List<InstructorFeedbackResultsResponseRow> buildMissingResponseRowsBetweenGiverAndPossibleRecipients(FeedbackQuestionAttributes question, List<String> possibleReceivers, String giverIdentifier, String giverName, String giverTeam) {
List<InstructorFeedbackResultsResponseRow> missingResponses = new ArrayList<>();
FeedbackQuestionDetails questionDetails = questionToDetailsMap.get(question);
for (String possibleRecipient : possibleReceivers) {
if (questionDetails.shouldShowNoResponseText(question)) {
String textToDisplay = questionDetails.getNoResponseTextInHtml(giverIdentifier, possibleRecipient, bundle, question);
String possibleRecipientName = bundle.getFullNameFromRoster(possibleRecipient);
String possibleRecipientTeam = bundle.getTeamNameFromRoster(possibleRecipient);
InstructorFeedbackResultsModerationButton moderationButton = buildModerationButtonForGiver(question, giverIdentifier, "btn btn-default btn-xs", MODERATE_SINGLE_RESPONSE);
InstructorFeedbackResultsResponseRow missingResponse = new InstructorFeedbackResultsResponseRow(giverName, giverTeam, possibleRecipientName, possibleRecipientTeam, textToDisplay, moderationButton, true);
missingResponse.setRowAttributes(new ElementTag("class", "pending_response_row"));
configureResponseRow(giverIdentifier, possibleRecipient, missingResponse);
missingResponses.add(missingResponse);
}
}
return missingResponses;
}
use of teammates.ui.template.ElementTag in project teammates by TEAMMATES.
the class InstructorFeedbackResultsPageData method buildTableColumnHeaderForRecipientQuestionGiverView.
private void buildTableColumnHeaderForRecipientQuestionGiverView(List<ElementTag> columnTags, Map<String, Boolean> isSortable) {
ElementTag photoElement = new ElementTag("Photo");
ElementTag giverTeamElement = new ElementTag("Team", "id", "button_sortFromTeam", "class", "button-sort-ascending toggle-sort", "style", "width: 15%; min-width: 67px;");
ElementTag giverElement = new ElementTag("Giver", "id", "button_sortFromName", "class", "button-sort-none toggle-sort", "style", "width: 15%; min-width: 65px;");
ElementTag responseElement = new ElementTag("Feedback", "id", "button_sortFeedback", "class", "button-sort-none toggle-sort", "style", "min-width: 95px;");
ElementTag actionElement = new ElementTag("Actions", "class", "action-header");
columnTags.add(photoElement);
columnTags.add(giverTeamElement);
columnTags.add(giverElement);
columnTags.add(responseElement);
columnTags.add(actionElement);
isSortable.put(photoElement.getContent(), false);
isSortable.put(giverTeamElement.getContent(), true);
isSortable.put(giverElement.getContent(), true);
isSortable.put(responseElement.getContent(), true);
isSortable.put(actionElement.getContent(), false);
}
use of teammates.ui.template.ElementTag in project teammates by TEAMMATES.
the class InstructorFeedbackResultsPageData method buildTableColumnHeaderForQuestionView.
private void buildTableColumnHeaderForQuestionView(List<ElementTag> columnTags, Map<String, Boolean> isSortable) {
ElementTag giverTeamElement = new ElementTag("Team", "id", "button_sortFromTeam", "class", "button-sort-none toggle-sort", "style", "width: 10%; min-width: 67px;");
ElementTag giverElement = new ElementTag("Giver", "id", "button_sortFromName", "class", "button-sort-none toggle-sort", "style", "width: 10%; min-width: 65px;");
ElementTag recipientTeamElement = new ElementTag("Team", "id", "button_sortToTeam", "class", "button-sort-ascending toggle-sort", "style", "width: 10%; min-width: 67px;");
ElementTag recipientElement = new ElementTag("Recipient", "id", "button_sortToName", "class", "button-sort-none toggle-sort", "style", "width: 10%; min-width: 90px;");
ElementTag responseElement = new ElementTag("Feedback", "id", "button_sortFeedback", "class", "button-sort-none toggle-sort", "style", "width: 45%; min-width: 95px;");
ElementTag actionElement = new ElementTag("Actions", "class", "action-header", "style", "width: 15%; min-width: 75px;");
columnTags.add(giverTeamElement);
columnTags.add(giverElement);
columnTags.add(recipientTeamElement);
columnTags.add(recipientElement);
columnTags.add(responseElement);
columnTags.add(actionElement);
isSortable.put(giverElement.getContent(), true);
isSortable.put(giverTeamElement.getContent(), true);
isSortable.put(recipientElement.getContent(), true);
isSortable.put(responseElement.getContent(), true);
isSortable.put(actionElement.getContent(), false);
}
Aggregations