public StringBuilder renderDayContents(ExamsMapSlot examsMapSlot, Integer year1, Integer year2, String typeUser,
PageContext pageContext) {
StringBuilder strBuffer = new StringBuilder();
for (int i = 0; i < examsMapSlot.getExams().size(); i++) {
InfoExam infoExam = (InfoExam) examsMapSlot.getExams().get(i);
Integer curicularYear = infoExam.getInfoExecutionCourse().getCurricularYear();
if (curicularYear.equals(year1) || curicularYear.equals(year2)) {
boolean isOnValidWeekDay = onValidWeekDay(infoExam);
InfoExecutionCourse infoExecutionCourse = infoExam.getInfoExecutionCourse();
String courseInitials = infoExam.getInfoExecutionCourse().getSigla();
if (typeUser.equals("sop")) {
strBuffer.append("<a href='showExamsManagement.do?method=edit&"
+ PresentationConstants.EXECUTION_COURSE_OID + "=" + infoExecutionCourse.getExternalId() + "&"
+ PresentationConstants.EXECUTION_PERIOD_OID + "="
+ infoExecutionCourse.getInfoExecutionPeriod().getExternalId() + "&"
+ PresentationConstants.EXECUTION_DEGREE_OID + "="
+ examsMap.getInfoExecutionDegree().getExternalId() + "&"
+ PresentationConstants.CURRICULAR_YEAR_OID + "=" + curicularYear.toString() + "&"
+ PresentationConstants.EXAM_OID + "=" + infoExam.getExternalId() + "'>");
if (isOnValidWeekDay) {
strBuffer.append(courseInitials);
} else {
strBuffer.append("<span class='redtxt'>" + courseInitials + "</span>");
}
} else if (typeUser.equals("public")) {
String siteUrl = infoExecutionCourse.getExecutionCourse().getSiteUrl();
siteUrl = siteUrl == null ? "#" : siteUrl;
strBuffer.append(GenericChecksumRewriter.NO_CHECKSUM_PREFIX);
strBuffer.append("<a href=\"");
strBuffer.append(siteUrl);
strBuffer.append("\">");
strBuffer.append(courseInitials);
}
strBuffer.append("</a>");
if (infoExam.getBeginning() != null) {
boolean isAtValidHour = atValidHour(infoExam);
String hoursText =
infoExam.getBeginning().get(Calendar.HOUR_OF_DAY) + "h"
+ DateFormatUtils.format(infoExam.getBeginning().getTime(), "mm");
strBuffer.append(" ");
strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.as"));
strBuffer.append(" ");
if (isAtValidHour || !typeUser.equals("sop")) {