Search in sources :

Example 16 with ElementTag

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();
}
Also used : ElementTag(teammates.ui.template.ElementTag)

Example 17 with ElementTag

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);
}
Also used : ElementTag(teammates.ui.template.ElementTag)

Example 18 with ElementTag

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;
}
Also used : InstructorFeedbackResultsResponseRow(teammates.ui.template.InstructorFeedbackResultsResponseRow) FeedbackQuestionDetails(teammates.common.datatransfer.questions.FeedbackQuestionDetails) ArrayList(java.util.ArrayList) InstructorFeedbackResultsModerationButton(teammates.ui.template.InstructorFeedbackResultsModerationButton) ElementTag(teammates.ui.template.ElementTag)

Example 19 with ElementTag

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);
}
Also used : ElementTag(teammates.ui.template.ElementTag)

Example 20 with ElementTag

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);
}
Also used : ElementTag(teammates.ui.template.ElementTag)

Aggregations

ElementTag (teammates.ui.template.ElementTag)30 ArrayList (java.util.ArrayList)16 CourseAttributes (teammates.common.datatransfer.attributes.CourseAttributes)3 FeedbackQuestionDetails (teammates.common.datatransfer.questions.FeedbackQuestionDetails)3 InstructorFeedbackResultsResponseRow (teammates.ui.template.InstructorFeedbackResultsResponseRow)3 FeedbackSessionAttributes (teammates.common.datatransfer.attributes.FeedbackSessionAttributes)2 FeedbackSessionsTableRow (teammates.ui.template.FeedbackSessionsTableRow)2 InstructorFeedbackResultsModerationButton (teammates.ui.template.InstructorFeedbackResultsModerationButton)2 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 InstructorAttributes (teammates.common.datatransfer.attributes.InstructorAttributes)1 StudentAttributes (teammates.common.datatransfer.attributes.StudentAttributes)1 ActiveCoursesTable (teammates.ui.template.ActiveCoursesTable)1 ActiveCoursesTableRow (teammates.ui.template.ActiveCoursesTableRow)1 ArchivedCoursesTable (teammates.ui.template.ArchivedCoursesTable)1 ArchivedCoursesTableRow (teammates.ui.template.ArchivedCoursesTableRow)1 FeedbackSessionsCopyFromModal (teammates.ui.template.FeedbackSessionsCopyFromModal)1 InstructorFeedbackResultsQuestionTable (teammates.ui.template.InstructorFeedbackResultsQuestionTable)1 InstructorFeedbackSessionActions (teammates.ui.template.InstructorFeedbackSessionActions)1