ExecutionSemester executionSemester) {
if (degreeCurricularPlan.isPast() || degreeCurricularPlan.isEmpty()) {
return new HtmlText(degreeCurricularPlan.getName());
}
final HtmlLink result = new HtmlLink();
result.setText(degreeCurricularPlan.getName());
result.setModuleRelative(false);
result.setTarget("_blank");
if (degreeCurricularPlan.isBoxStructure()) {
result.setUrl("/publico/degreeSite/showDegreeCurricularPlanBolonha.faces");
result.setParameter("organizeBy", "groups");
result.setParameter("showRules", "false");
result.setParameter("hideCourses", "false");
} else {
result.setUrl("/publico/prepareConsultCurricularPlanNew.do");
result.setParameter("method", "prepare");
result.setParameter("degreeInitials", degreeCurricularPlan.getDegree().getSigla());
}
result.setParameter("degreeID", degreeCurricularPlan.getDegree().getExternalId().toString());
result.setParameter("degreeCurricularPlanID", degreeCurricularPlan.getExternalId().toString());
result.setParameter("executionPeriodOID", executionSemester.getExternalId().toString());
return result;
}