74,7 → 74,7 |
if(u instanceof pt.estgp.estgweb.domain.Teacher) |
{ |
pt.estgp.estgweb.domain.Teacher t = (pt.estgp.estgweb.domain.Teacher) u; |
if(t.isTeacherOfCourseUnit(CourseUnitView.getId())) |
if(t.isTeacherOfCourseUnit(CourseUnitView.getId()) || (CourseUnitView.getResponsableTeacher() != null && CourseUnitView.getResponsableTeacher().getId() == t.getId())) |
{ |
editTeacherPart = true; |
} |
91,7 → 91,7 |
<% |
boolean closed = CourseUnitEvaluationForm.getCourseUnitEvaluationView().getCourseUnitEvaluation().isClosed(); |
//todo é necessário um servico para ver se tem estes papeis |
if(CourseUnitView.getResponsableTeacher().getId() == UserSession.getUser().getId() |
if((CourseUnitView.getResponsableTeacher() != null && CourseUnitView.getResponsableTeacher().getId() == UserSession.getUser().getId()) |
|| |
CourseUnitView.isOwnedBy(UserSession.getUser(),false) |
|| |
102,7 → 102,9 |
if(closed) |
{ |
%> |
<h2>Este formulário está FECHADO para edição</h2> |
<h2>Este formulário está FECHADO para edição |
|
</h2> |
<% |
} |
else |
112,19 → 114,29 |
<% |
} |
|
if(closed) |
{ |
%> |
|
<script> |
$( document ).ready(function() { |
$("#formEdit :input").attr("disabled", true); |
<% |
if(closed) |
{ |
%> |
$("#formEdit :input").attr("disabled", true); |
<% |
} |
if(!editTeacherPart && !editCoordinatorPart) |
{ |
%> |
$("#formEdit :input").attr("disabled", true); |
<% |
} |
%> |
}); |
|
</script> |
<% |
} |
%> |
|
|
<div id="formEdit"> |
<html:form action="/user/courseUnitEvaluationController"> |
<input type="hidden" name="dispatch" value="saveEvaluation"> |
133,9 → 145,27 |
|
<%--DOCENTE--%> |
<logic:equal value="true" name="CourseUnitEvaluationForm" property="courseUnitEvaluationView.fechar"> |
<p class="alert-success">Esta avaliação está publicada no DTP em formato PDF</p> |
<p class="alert-success">Esta avaliação será publicada no DTP em formato PDF após ordens dos orgãos competentes</p> |
</logic:equal> |
|
<% |
if(closed) |
{ |
%> |
|
<p class="alert-success">Esta avaliação está concluida e aprovada pela comissão de curso</p> |
<% |
if(editCoordinatorPart || editTeacherPart) |
{ |
%> |
<p class="alert-success"> <a href="<%=request.getContextPath()%>/repositoryStream/<%=CourseUnitView.getEvaluationStreamId()%>">Relatório de avaliação em PDF</a></p> |
<% |
} |
%> |
<% |
} |
%> |
|
<table class="dataTable tableDisabled" width="100%"> |
<tr> |
<th colspan="2">Dados alterados pelo Docente da Unidade</th> |
251,15 → 281,21 |
<tr> |
<td colspan="2"> |
<% |
if(!closed) |
if(!closed && (editCoordinatorPart || editTeacherPart)) |
{ |
%> |
|
<input type="button" value="<bean:message key="save"/>" onclick="set(form,'saveEvaluation');form.submit()"/> |
<!--<input type="button" value="FECHAR E PUBLICAR" onclick="set(form,'publishEvaluation');form.submit()"/>--> |
|
<% |
} |
if(!closed && editCoordinatorPart) |
{ |
%> |
<input type="button" value="VALIDAR e FECHAR" onclick="set(form,'publishEvaluation');form.submit()"/> |
<% |
} |
%> |
</td> |
|
</tr> |