%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@page import="net.sourceforge.fenixedu._development.PropertiesManager"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="net.sourceforge.fenixedu.domain.inquiries.InquiryResponsePeriod"%>
<%@page import="net.sourceforge.fenixedu.domain.ExecutionSemester"%>
<%@page import="net.sourceforge.fenixedu.domain.inquiries.teacher.InquiryResponsePeriodType"%>
<%@page import="net.sourceforge.fenixedu.domain.ExecutionYear"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/fenix-renderers.tld" prefix="fr"%>
<%
final ExecutionSemester executionSemester = executionCourse.getExecutionPeriod();
final ExecutionYear executionYear = executionSemester.getExecutionYear();
final int year = executionYear.getBeginDateYearMonthDay().getYear();
// TODO: Refactor this... instead check if it is before now and has no response period defined.
if (year < 2007 || (year == 2007 && executionSemester.getSemester().intValue() == 1)) {
%>
<%
} else {
final InquiryResponsePeriod inquiryResponsePeriod = executionSemester.getInquiryResponsePeriod(InquiryResponsePeriodType.TEACHING);
if (inquiryResponsePeriod == null) {
%>
">
!
<%
} else if (!inquiryResponsePeriod.getEnd().isBeforeNow()) {
%>
<%
} else {
%>
<%
if (executionCourse.getAvailableForInquiries().booleanValue()) {
%>
<%
} else {
%>
<%
}
%>
<% %>
-
" target="_blank">
-
<%
}
}
%>
<%
String port = request.getServerPort() == 80 || request.getServerPort() == 443 ? "" : ":" + request.getServerPort();
String value = request.getScheme() + "://" + request.getServerName()
+ port + request.getContextPath() + executionCourse.getSite().getReversePath() + "/resultados-quc";
session.setAttribute("ORIGINAL_REQUEST", Boolean.TRUE);
session.setAttribute("ORIGINAL_URI", value);
Map map = new HashMap();
map.put("service", value);
session.setAttribute("ORIGINAL_PARAMETER_MAP", map);
session.setAttribute("ORIGINAL_ATTRIBUTE_MAP", map);
boolean isCasEnabled = PropertiesManager.getBooleanProperty("cas.enabled");
if (isCasEnabled) {
String casValue = request.getScheme() + "://" + request.getServerName()
+ port + request.getContextPath() + "/loginCAS.do";
String urlSuffix = "?service=" + casValue;
String loginPage = PropertiesManager.getProperty("cas.loginUrl") + urlSuffix;
%>
Login
<%
} else {
String urlSuffix = "?service=" + value;
String loginPage = PropertiesManager.getProperty("login.page") + urlSuffix;
%>
Login
<%
}
%>