use of teammates.ui.template.HomeFeedbackSessionRow in project teammates by TEAMMATES.
the class StudentHomePageDataTest method testOldCourseTable.
private void testOldCourseTable(CourseDetailsBundle oldCourse, CourseTable courseTable) {
// Sessions in old course have multiple messages in tooltip as their end dates have passed.
assertEquals(oldCourse.feedbackSessions.size(), courseTable.getRows().size());
List<HomeFeedbackSessionRow> sessions = courseTable.getRows();
HomeFeedbackSessionRow publishedRow = sessions.get(0);
HomeFeedbackSessionRow closedRow = sessions.get(1);
HomeFeedbackSessionRow submittedClosedRow = sessions.get(2);
int accumlativeOffset = courses.get(0).feedbackSessions.size();
int index = 0 + accumlativeOffset;
testFeedbackSession(index++, publishedRow, publishedSession, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_PENDING + Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_CLOSED, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_PUBLISHED, "Closed", "Published");
testFeedbackSession(index++, closedRow, closedSession, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_PENDING + Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_CLOSED, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_NOT_PUBLISHED, "Closed", "Not Published");
testFeedbackSession(index++, submittedClosedRow, submittedClosedSession, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_SUBMITTED + Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_CLOSED, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_NOT_PUBLISHED, "Closed", "Not Published");
}
use of teammates.ui.template.HomeFeedbackSessionRow in project teammates by TEAMMATES.
the class StudentHomePageData method createSessionRows.
private List<HomeFeedbackSessionRow> createSessionRows(List<FeedbackSessionDetailsBundle> feedbackSessions, Map<FeedbackSessionAttributes, Boolean> sessionSubmissionStatusMap, int startingSessionIdx) {
List<HomeFeedbackSessionRow> rows = new ArrayList<>();
int sessionIdx = startingSessionIdx;
for (FeedbackSessionDetailsBundle session : feedbackSessions) {
FeedbackSessionAttributes feedbackSession = session.feedbackSession;
String sessionName = feedbackSession.getFeedbackSessionName();
boolean hasSubmitted = sessionSubmissionStatusMap.get(feedbackSession);
rows.add(new StudentHomeFeedbackSessionRow(PageData.sanitizeForHtml(sessionName), getStudentSubmissionsTooltipForSession(feedbackSession, hasSubmitted), getStudentPublishedTooltipForSession(feedbackSession), getStudentSubmissionStatusForSession(feedbackSession, hasSubmitted), getStudentPublishedStatusForSession(feedbackSession), TimeHelper.formatDateTimeForSessions(feedbackSession.getEndTime(), feedbackSession.getTimeZone()), feedbackSession.getEndTimeInIso8601UtcFormat(), getStudentFeedbackSessionActions(feedbackSession, hasSubmitted), sessionIdx));
++sessionIdx;
}
return rows;
}
use of teammates.ui.template.HomeFeedbackSessionRow in project teammates by TEAMMATES.
the class StudentHomePageDataTest method testNewCourseTable.
private void testNewCourseTable(CourseDetailsBundle newCourse, CourseTable courseTable) {
assertEquals(newCourse.feedbackSessions.size(), courseTable.getRows().size());
List<HomeFeedbackSessionRow> sessions = courseTable.getRows();
HomeFeedbackSessionRow submittedRow = sessions.get(0);
HomeFeedbackSessionRow pendingRow = sessions.get(1);
HomeFeedbackSessionRow awaitingRow = sessions.get(2);
int index = 0;
testFeedbackSession(index++, submittedRow, submittedSession, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_SUBMITTED, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_NOT_PUBLISHED, "Submitted", "Not Published");
testFeedbackSession(index++, pendingRow, pendingSession, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_PENDING, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_NOT_PUBLISHED, "Pending", "Not Published");
testFeedbackSession(index++, awaitingRow, awaitingSession, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_AWAITING, Const.Tooltips.STUDENT_FEEDBACK_SESSION_STATUS_NOT_PUBLISHED, "Awaiting", "Not Published");
}
use of teammates.ui.template.HomeFeedbackSessionRow in project teammates by TEAMMATES.
the class InstructorHomeCourseAjaxPageData method createSessionRows.
private List<HomeFeedbackSessionRow> createSessionRows(List<FeedbackSessionAttributes> sessions, InstructorAttributes instructor) {
List<HomeFeedbackSessionRow> rows = new ArrayList<>();
for (FeedbackSessionAttributes session : sessions) {
InstructorHomeFeedbackSessionRow row = new InstructorHomeFeedbackSessionRow(sanitizeForHtml(session.getFeedbackSessionName()), getInstructorSubmissionsTooltipForFeedbackSession(session), getInstructorPublishedTooltipForFeedbackSession(session), getInstructorSubmissionStatusForFeedbackSession(session), getInstructorPublishedStatusForFeedbackSession(session), TimeHelper.formatDateTimeForInstructorHomePage(session.getStartTimeLocal()), session.getStartTimeInIso8601UtcFormat(), TimeHelper.formatDateTimeForSessions(session.getStartTime(), session.getTimeZone()), TimeHelper.formatDateTimeForInstructorHomePage(session.getEndTimeLocal()), session.getEndTimeInIso8601UtcFormat(), TimeHelper.formatDateTimeForSessions(session.getEndTime(), session.getTimeZone()), getInstructorFeedbackStatsLink(session.getCourseId(), session.getFeedbackSessionName()), getInstructorFeedbackSessionActions(session, Const.ActionURIs.INSTRUCTOR_HOME_PAGE, instructor));
rows.add(row);
}
return rows;
}
Aggregations