/impl/conf/language/MessageResources.properties |
---|
447,7 → 447,7 |
user.role.courseValidateProgramGPME=Comissão de Curso de Gestão de PME |
user.role.courseValidateProgramCET_TD=Comissão de Curso de CETS de TD |
user.role.courseValidateProgramEI=Comissão de Curso de EI |
user.role.courseValidateProgramEC=Comissão de Curso de EC |
/impl/conf/WEB-INF/web.xml |
---|
132,7 → 132,7 |
<!--SOAP Tutorial--> |
<servlet> |
<servlet-name>hello</servlet-name> |
<servlet-name>ws</servlet-name> |
<servlet-class> |
com.sun.xml.ws.transport.http.servlet.WSServlet |
</servlet-class> |
245,11 → 245,16 |
<!--SOAP Tutorial--> |
<servlet-mapping> |
<servlet-name>hello</servlet-name> |
<servlet-name>ws</servlet-name> |
<url-pattern>/hello</url-pattern> |
</servlet-mapping> |
<servlet-mapping> |
<servlet-name>ws</servlet-name> |
<url-pattern>/ws/api</url-pattern> |
</servlet-mapping> |
<!--SOAP Tutorial--> |
<servlet-mapping> |
<servlet-name>action</servlet-name> |
<url-pattern>*.do</url-pattern> |
/impl/conf/WEB-INF/sun-jaxws.xml |
---|
5,6 → 5,12 |
version="2.0"> |
<endpoint |
name="HelloWorld" |
binding="http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/" |
implementation="pt.estgp.estgweb.web.soap.HelloWorldImpl" |
url-pattern="/hello"/> |
<endpoint |
name="HelloWorld" |
binding="http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/" |
implementation="pt.estgp.estgweb.web.soap.courses.CourseWsImpl" |
url-pattern="/ws/api"/> |
</endpoints> |
/impl/conf/berserk/sd.xml |
---|
814,6 → 814,7 |
<implementationClass>pt.estgp.estgweb.services.courseunits.SaveCourseUnitEvaluation</implementationClass> |
<description>Save course unit evaluation</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>save</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
821,6 → 822,18 |
</service> |
<service> |
<name>OpenCourseUnitEvaluation</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.SaveCourseUnitEvaluation</implementationClass> |
<description>Open course unit evaluation for edition</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>open</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
</filterChains> |
</service> |
<service> |
<name>LoadCourseUnitsBySigesCodes</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitsBySigesCodesService</implementationClass> |
<description>Load course old units</description> |
/impl/src/java/pt/estgp/estgweb/services/courseunits/SaveCourseUnitEvaluation.java |
---|
46,14 → 46,11 |
*/ |
public class SaveCourseUnitEvaluation implements IService |
{ |
private static final Logger logger = Logger.getLogger(SaveCourseUnitEvaluation.class); |
RepositoryService repositoryService = new RepositoryService(); |
public CourseUnitEvaluationView run(CourseUnitEvaluationView cupv, Long coursUnitId, UserSession usession) throws ServiceException, TransformerException, IOException, FOPException { |
public CourseUnitEvaluationView save(CourseUnitEvaluationView cupv, Long coursUnitId, UserSession usession) throws ServiceException, TransformerException, IOException, FOPException { |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(coursUnitId); |
64,6 → 61,7 |
evaluation = new CourseUnitEvaluationImpl(); |
DaoFactory.getCourseUnitEvaluationDaoImpl().save(evaluation); |
c.setCourseUnitEvaluation(evaluation); |
cupv.setCourseUnitEvaluation(evaluation); |
} |
// |
74,6 → 72,7 |
)) |
{ |
cupv.persistViewInObjectTeacher(evaluation); |
cupv.setCourseUnitEvaluation(evaluation); |
} |
if(usession.getUser() instanceof Teacher |
&& (((usession.getUser())).hasRole(c.getCourse().getValidationRole()) |
82,6 → 81,7 |
) |
{ |
cupv.persistViewInObjectTeacher(evaluation); |
cupv.setCourseUnitEvaluation(evaluation); |
} |
List<String> errors = new ArrayList<String>(); |
if(cupv.isFechar()) |
104,6 → 104,26 |
return cupv; |
} |
public CourseUnitEvaluationView open(Long coursUnitId, UserSession usession) throws ServiceException { |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(coursUnitId); |
CourseUnitEvaluation evaluation = c.getCourseUnitEvaluation(); |
if(usession.getUser() instanceof Teacher && |
(((Teacher)usession.getUser()).isTeacherOfCourseUnit(c.getId(),true) |
|| |
c.getResponsableTeacher()!=null && usession.getUser().getId() == c.getResponsableTeacher().getId() |
|| |
usession.getUser().hasRole(c.getCourse().getValidationRole()) |
|| |
((usession.getUser()) == c.getCourse().getCoordinator()) |
)) |
{ |
evaluation.setClosed(false); |
} |
CourseUnitEvaluationView cupv = new CourseUnitEvaluationView(evaluation); |
return cupv; |
} |
public void createPdf(CourseUnitEvaluation cuv, CourseUnit cu, UserSession userSession,List<String> errors) throws IOException, TransformerException, FOPException { |
/impl/src/java/pt/estgp/estgweb/domain/CourseUnitSummaryImpl.java |
---|
2,13 → 2,8 |
import org.apache.log4j.Logger; |
import java.util.List; |
import java.util.Date; |
import java.io.Serializable; |
import pt.estgp.estgweb.domain.enums.AnnouncementStyleEnum; |
import pt.estgp.estgweb.utils.RoleManager; |
/** |
* @author Jorge Machado |
* @date 2/Mar/2008 |
25,4 → 20,6 |
{ |
return getId(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitSummaryView.java |
---|
24,8 → 24,9 |
private int students; |
public CourseUnitSummaryView() { |
} |
public CourseUnitSummaryView(CourseUnitSummary summary) |
{ |
super(summary); |
/impl/src/java/pt/estgp/estgweb/web/soap/courses/CourseWS.java |
---|
New file |
0,0 → 1,22 |
package pt.estgp.estgweb.web.soap.courses; |
import pt.estgp.estgweb.domain.views.serviceviews.CourseViewServ; |
import javax.jws.WebMethod; |
import javax.jws.WebService; |
import javax.jws.soap.SOAPBinding; |
/** |
* Created by jorgemachado on 13/10/15. |
* SOAP Tutorial |
*/ |
//Service Endpoint Interface |
@WebService |
@SOAPBinding(style = SOAPBinding.Style.RPC) |
//@ResponseWrapper(className="pt.estgp.estgweb.domain.views.CourseView"); |
public interface CourseWS { |
@WebMethod |
public CourseViewServ[] listCourses(); |
} |
/impl/src/java/pt/estgp/estgweb/web/soap/courses/CourseWsImpl.java |
---|
New file |
0,0 → 1,46 |
package pt.estgp.estgweb.web.soap.courses; |
import jomm.dao.utils.HibernateUtils; |
import pt.estgp.estgweb.domain.views.CourseView; |
import pt.estgp.estgweb.domain.views.serviceviews.CourseViewServ; |
import pt.estgp.estgweb.services.courses.CoursesService; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import javax.jws.WebService; |
import java.util.List; |
/** |
* SOAP Tutorial |
*/ |
@WebService(endpointInterface = "pt.estgp.estgweb.web.soap.courses.CourseWS") |
public class CourseWsImpl implements CourseWS{ |
@Override |
public CourseViewServ[] listCourses() |
{ |
HibernateUtils.getCurrentSession().beginTransaction(); |
List<CourseView> courses = null; |
try { |
courses = new CoursesService().loadCourses(); |
} catch (ServiceException e) { |
e.printStackTrace(); |
return null; |
} |
CourseViewServ[] courseViews = new CourseViewServ[courses.size()]; |
int i = 0; |
for(CourseView c:courses) |
{ |
courseViews[i] = new CourseViewServ(c); |
i++; |
} |
HibernateUtils.getCurrentSession().getTransaction().commit(); |
return courseViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/web/controllers/courseunits/CourseUnitsEvaluationController.java |
---|
155,5 → 155,40 |
public ActionForward openEvaluation(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws ServletException |
{ |
try |
{ |
CourseUnitEvaluationForm cUF = (CourseUnitEvaluationForm) form; |
long id = cUF.getCourseUnitView().getId(); |
IServiceManager sm = ServiceManager.getInstance(); |
Object[] args = new Object[]{id}; |
sm.execute(RequestUtils.getRequester(request, response), "OpenCourseUnitEvaluation", args); |
CourseUnitView cV = loadCourseUnitView(id,true,false, mapping, request, response); |
cUF.setCourseUnitView(cV); |
request.setAttribute("CourseUnitView", cV); |
addMessage(request,"courseunit.evaluation.success"); |
return mapping.findForward("load"); |
} |
catch (FilterChainFailedException e) |
{ |
return mapping.findForward("error401"); |
} |
catch (NotFoundException e) |
{ |
return mapping.findForward("error404"); |
} |
catch (Throwable e) |
{ |
logger.error(e, e); |
return mapping.findForward("error500"); |
} |
} |
} |
/impl/src/web/user/courseunits/courseunitEvaluation.jsp |
---|
46,18 → 46,22 |
e.printStackTrace(); |
} |
boolean closed = CourseUnitEvaluationForm.getCourseUnitEvaluationView().getCourseUnitEvaluation().isClosed(); |
%> |
<div class="seccao"> |
<h2> |
<bean:message key="courseunit.evaluation"/> - <%=CourseUnitView.getName()%> / <%=CourseUnitView.getImportYear()%> |
</h2> |
<% |
if(!closed) |
{ |
%> |
<p class="WARNING"><bean:message key="courseunit.evaluation.warning"/></p> |
<% |
} |
%> |
<% |
89,7 → 93,7 |
<% |
boolean closed = CourseUnitEvaluationForm.getCourseUnitEvaluationView().getCourseUnitEvaluation().isClosed(); |
//todo é necessário um servico para ver se tem estes papeis |
if((CourseUnitView.getResponsableTeacher() != null && CourseUnitView.getResponsableTeacher().getId() == UserSession.getUser().getId()) |
|| |
99,13 → 103,33 |
UserSession.getUser().hasRole(CourseUnitView.getCourseView().getValidationRole())) |
{ |
%> |
<% |
if(closed) |
{ |
%> |
<h2>Este formulário está FECHADO para edição |
<p class="success">Este formulário foi aceite pela <bean:message key="user.role.${CourseUnitView.courseView.validationRole}"/></p> |
<% |
if(editCoordinatorPart) |
{ |
%> |
<html:form action="/user/courseUnitEvaluationController"> |
<input type="hidden" name="dispatch" value="openEvaluation"> |
<html:hidden property="courseUnitView.id"/> |
</h2> |
<p>Caro <%=UserSession.getName()%>, membro da <bean:message key="user.role.${CourseUnitView.courseView.validationRole}"/>, |
está autorizado a reabrir o relatório de avaliação para o corpo docente da unidade de ${CourseUnitView.name}.</p> |
<input type="submit" value="Reabrir para edição (Comissão de Curso)"/> (Esta operação está disponível apenas a membros da Comissão de Curso) |
</html:form> |
<% |
} |
%> |
<% |
} |
else |
{ |
135,13 → 159,13 |
}); |
</script> |
<div id="formEdit"> |
<html:form action="/user/courseUnitEvaluationController"> |
<input type="hidden" name="dispatch" value="saveEvaluation"> |
<html:hidden property="id"/> |
<html:hidden property="courseUnitView.id"/> |
<div id="formEdit"> |
<html:form action="/user/courseUnitEvaluationController"> |
<input type="hidden" name="dispatch" value="saveEvaluation"> |
<html:hidden property="id"/> |
<html:hidden property="courseUnitView.id"/> |
<%--DOCENTE--%> |
<logic:equal value="true" name="CourseUnitEvaluationForm" property="courseUnitEvaluationView.fechar"> |
152,13 → 176,15 |
if(closed) |
{ |
%> |
<p class="alert-success">Esta avaliação está concluida e aprovada pela comissão de curso</p> |
<% |
if(editCoordinatorPart || editTeacherPart) |
{ |
%> |
<p class="WARNING"> <a href="<%=request.getContextPath()%>/repositoryStream/<%=CourseUnitView.getEvaluationStreamId()%>">Relatório de avaliação em PDF</a></p> |
<p> |
<a href="<%=request.getContextPath()%>/repositoryStream/<%=CourseUnitView.getEvaluationStreamId()%>">Relatório de avaliação em PDF |
<img src="<%=request.getContextPath()%>/imgs/mime/pdf.gif"/> |
</a> |
</p> |
<% |
} |
%> |
/impl/etc/soap/jaxws-ri-2.2.10.zip |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/streambuffer.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/gmbal-api-only.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/stax-ex.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/jaxws-rt.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/policy.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/jaxb-impl.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/jaxws-api.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/soap/jaxws/management-api.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/streambuffer.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/gmbal-api-only.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/stax-ex.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/jaxws-rt.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/policy.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/jaxb-impl.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/jaxws-api.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/etc/jaxws/management-api.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |