use of teammates.ui.template.InstructorFeedbackSessionActions in project teammates by TEAMMATES.
the class InstructorFeedbackSessionsPageData method convertFeedbackSessionAttributesToSessionRows.
private List<FeedbackSessionsTableRow> convertFeedbackSessionAttributesToSessionRows(List<FeedbackSessionAttributes> sessions, Map<String, InstructorAttributes> instructors, String feedbackSessionNameForSessionList, String courseIdForNewSession) {
List<FeedbackSessionsTableRow> rows = new ArrayList<>();
for (FeedbackSessionAttributes session : sessions) {
String courseId = session.getCourseId();
String name = sanitizeForHtml(session.getFeedbackSessionName());
String submissionsTooltip = getInstructorSubmissionsTooltipForFeedbackSession(session);
String publishedTooltip = getInstructorPublishedTooltipForFeedbackSession(session);
String submissionStatus = getInstructorSubmissionStatusForFeedbackSession(session);
String publishedStatus = getInstructorPublishedStatusForFeedbackSession(session);
String href = getInstructorFeedbackStatsLink(session.getCourseId(), session.getFeedbackSessionName());
InstructorFeedbackSessionActions actions = getInstructorFeedbackSessionActions(session, Const.ActionURIs.INSTRUCTOR_FEEDBACK_SESSIONS_PAGE, instructors.get(courseId));
ElementTag elementAttributes;
if (session.getCourseId().equals(courseIdForNewSession) && session.getFeedbackSessionName().equals(feedbackSessionNameForSessionList)) {
elementAttributes = new ElementTag("class", "sessionsRow warning");
} else {
elementAttributes = new ElementTag("class", "sessionsRow");
}
rows.add(new FeedbackSessionsTableRow(courseId, name, submissionsTooltip, publishedTooltip, submissionStatus, publishedStatus, href, actions, elementAttributes));
}
return rows;
}
Aggregations