/impl/conf/app.properties |
---|
460,9 → 460,9 |
siges.degree.4=M |
siges.degree.8=C |
national.institution.code=3122 |
siges.institution.code=1 |
ws.siges.wsdl=@ws.siges.wsdl@ |
# DONT USE ANY MORE NOW IS IN CONFIGURATION DAO national.institution.code=3122 |
# DONT USE ANY MORE NOW IS IN CONFIGURATION DAO siges.institution.code=1 |
# DONT USE ANY MORE NOW IS IN CONFIGURATION DAO ws.siges.wsdl=@ws.siges.wsdl@ |
ws.siges.target.namespace=@ws.siges.target.namespace@ |
ws.siges.secret=deptal1232007estg. |
/impl/conf/berserk/sd.xml |
---|
266,7 → 266,20 |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerAnnouncementsMax</name> |
<implementationClass>pt.estgp.estgweb.services.announcements.LoadOwnerAnnouncements</implementationClass> |
<description>Load owner Blogs</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<!--Teste--> |
<service> |
<name>TesteSaver</name> |
421,7 → 434,20 |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadEditableBlogsMax</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadEditableBlogs</implementationClass> |
<description>Load editable Blogs</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogs</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogs</implementationClass> |
<description>Load owner Blogs</description> |
433,6 → 459,18 |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogsMax</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogs</implementationClass> |
<description>Load owner Blogs</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogPosts</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogPosts</implementationClass> |
<description>Load owner Blog Posts</description> |
443,6 → 481,18 |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
<service> |
<name>LoadOwnerBlogPostsMax</name> |
<implementationClass>pt.estgp.estgweb.services.blogs.LoadOwnerBlogPosts</implementationClass> |
<description>Load owner Blog Posts</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadMax</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="AuthenticatedUsers"/> |
</filterChains> |
</service> |
/impl/src/java/pt/estgp/estgweb/Globals.java |
---|
4,7 → 4,6 |
import pt.estgp.estgweb.services.directories.DirectoryService; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import java.math.BigDecimal; |
import java.util.HashMap; |
import java.util.List; |
import java.util.Map; |
162,9 → 161,10 |
public static final List<String> DEPARTAMENTOS = ConfigProperties.getListValues("departamento"); |
/*SIGES WEB SERVICES*/ |
public static final BigDecimal NATIONAL_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("national.institution.code")); |
public static final BigDecimal SIGES_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("siges.institution.code")); |
public static final String SIGES_WEBSERVICE_WSDL = ConfigProperties.getProperty("ws.siges.wsdl"); |
//NAO É URGENTE PARA ACTUALIZACOES VAMOS DEIXAR CARREGAR DA BD E NAS ACTUALIZAÇOES MUDA AQUI |
//public static BigDecimal NATIONAL_INSTITUTION_CODE = new BigDecimal(DaoFactory.getConfigurationDaoImpl().getNationalInstitutionCodeCreateTransaction()); |
// DONT USE NOW IN CONFIGURATION DAO public static final BigDecimal SIGES_INSTITUTION_CODE = new BigDecimal(ConfigProperties.getIntProperty("siges.institution.code")); |
// DONT USE ANY MORE NOW IS IN CONFIGURATION DAOpublic static final String SIGES_WEBSERVICE_WSDL = ConfigProperties.getProperty("ws.siges.wsdl"); |
public static final String SIGES_WEBSERVICE_TARGET_NAMESPACE = ConfigProperties.getProperty("ws.siges.target.namespace"); |
public static final String SIGES_WEBSERVICE_SECRET = ConfigProperties.getProperty("ws.siges.secret"); |
/impl/src/java/pt/estgp/estgweb/services/courseunits/SaveCourseUnitEvaluation.java |
---|
87,10 → 87,17 |
if(cupv.isFechar()) |
{ |
evaluation.setClosed(true); |
evaluation.setTeacherComplete(true); |
} |
else if(cupv.isTeacherComplete()) |
{ |
evaluation.setTeacherComplete(true); |
} |
else |
{ |
evaluation.setClosed(false); |
//TODO TIRAR ISTO NO PROXIMO ANO |
evaluation.setTeacherComplete(true); |
} |
createPdf(evaluation,c,usession,errors); |
124,6 → 131,41 |
return cupv; |
} |
//TODO TEACHER COMPLETE OPEN |
public CourseUnitEvaluationView setTeacherIncomplete(Long coursUnitId, UserSession usession) throws ServiceException { |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(coursUnitId); |
CourseUnitEvaluation evaluation = c.getCourseUnitEvaluation(); |
//So responsaveis e profs desdemente que a avaliação nao esteja fechada |
//caso contrario so coordenadores |
boolean isTeacherOfCourseUnitAndEvaluationNotClosed = |
usession.getUser() instanceof Teacher |
&& |
( |
((Teacher)usession.getUser()).isTeacherOfCourseUnit(c.getId(),true) |
|| |
c.getResponsableTeacher()!=null && usession.getUser().getId() == c.getResponsableTeacher().getId() |
) |
&& !evaluation.isClosed(); |
boolean isCoordinatorOrCourseCommission = |
usession.getUser() instanceof Teacher |
&& |
( |
usession.getUser().hasRole(c.getCourse().getValidationRole()) |
|| |
((usession.getUser()) == c.getCourse().getCoordinator()) |
); |
if(isTeacherOfCourseUnitAndEvaluationNotClosed || isCoordinatorOrCourseCommission) |
{ |
evaluation.setTeacherComplete(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/services/courseunits/CreateCourseUnitAdminService.java |
---|
1,7 → 1,6 |
package pt.estgp.estgweb.services.courseunits; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.CourseUnit; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.UserSession; |
49,7 → 48,7 |
} |
cUV.persistViewAdminInObject(courseUnit); |
courseUnit.setInstitutionCode("" + Globals.SIGES_INSTITUTION_CODE.intValue()); |
courseUnit.setInstitutionCode("" + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()); |
//por o curso |
//por os profs |
//por alunos |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportGradesService.java |
---|
22,6 → 22,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.*; |
44,15 → 45,16 |
public ILogMessages run(String year) throws ServiceException |
{ |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.grades", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.grades", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
logger.info("starting grades import"); |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
60,7 → 62,7 |
logger.fatal(e, e); |
return logMessages; |
} |
ArrayOfNota arrayOfNotas = service.getSiGesWEBSoap().getNotas(Globals.SIGES_INSTITUTION_CODE, year); |
ArrayOfNota arrayOfNotas = service.getSiGesWEBSoap().getNotas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
List<Nota> notas = arrayOfNotas.getNota(); |
int i = 0; |
for (Nota nota : notas) |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportSumaries.java |
---|
24,6 → 24,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.ArrayList; |
49,15 → 50,16 |
public ILogMessages run(String year) throws ServiceException |
{ |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
logger.info("starting summaries import"); |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
87,7 → 89,7 |
//comentario de teste |
try |
{ |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, year,c.getCode(),DatesUtils.getSemestre()); |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year,c.getCode(),DatesUtils.getSemestre()); |
break; |
} |
catch(Throwable t) |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportStudentsService.java |
---|
70,15 → 70,16 |
logger.info(msgS); |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.students", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.students", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
try |
{ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
88,7 → 89,7 |
return logMessages; |
} |
ArrayOfDecimal codigosAlunos = service.getSiGesWEBSoap().getCodigosAlunosInscritosDaInstituicao(Globals.SIGES_INSTITUTION_CODE, year); |
ArrayOfDecimal codigosAlunos = service.getSiGesWEBSoap().getCodigosAlunosInscritosDaInstituicao(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
List<BigDecimal> codigos = codigosAlunos.getDecimal(); |
int i = 1; |
103,7 → 104,7 |
AbstractDao.getCurrentSession().beginTransaction(); |
} |
Aluno alunoSiges = service.getSiGesWEBSoap().getAlunoInscrito(c, Globals.SIGES_INSTITUTION_CODE, year); |
Aluno alunoSiges = service.getSiGesWEBSoap().getAlunoInscrito(c, new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
User u = DaoFactory.getUserDaoImpl().loadByUsernameOrSigesCode(alunoSiges.getCodigo().intValue()); |
Student s = null; |
boolean newUser = false; |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/LoadSumariesToPDF.java |
---|
24,6 → 24,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.ArrayList; |
66,7 → 67,7 |
} |
AbstractDao.getCurrentSession().beginTransaction(); |
CourseUnit c = DaoFactory.getCourseUnitDaoImpl().get(courseUnitId); |
ArrayOfAula arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, c.getImportYear(),c.getCode(),c.getSemestre()); |
ArrayOfAula arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), c.getImportYear(),c.getCode(),c.getSemestre()); |
if(arrayOfAulas != null && arrayOfAulas.getAula() != null) |
{ |
99,15 → 100,16 |
public ILogMessages run(String year) throws ServiceException |
{ |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
logger.info("starting summaries import"); |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
137,7 → 139,7 |
//comentario de teste |
try |
{ |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, year,c.getCode(),DatesUtils.getSemestre()); |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year,c.getCode(),DatesUtils.getSemestre()); |
break; |
} |
catch(Throwable t) |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/SincronizeLastYearCourseUnitProgramsService.java |
---|
3,7 → 3,6 |
import jomm.dao.impl.AbstractDao; |
import org.apache.fop.apps.FOPException; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.CourseUnitView; |
77,7 → 76,7 |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
try |
{ |
logMessages.addMessage(new DefaultLogMessage("courseunitprograms.sincronization", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("courseunitprograms.sincronization", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
serviceLogInfo(logMessages.getLastMessage()); |
int i = 0; |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportTeachersService.java |
---|
73,15 → 73,16 |
logger.info(msgS); |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.teachers", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.teachers", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
try |
{ |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
SiGesWEB service; |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
90,7 → 91,7 |
serviceLogFatal(logMessages.getLastMessage(), e); |
return logMessages; |
} |
ArrayOfDecimal codigosDocentes = service.getSiGesWEBSoap().getCodigosDocentesInscritosDaInstituicao(Globals.SIGES_INSTITUTION_CODE, year); |
ArrayOfDecimal codigosDocentes = service.getSiGesWEBSoap().getCodigosDocentesInscritosDaInstituicao(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
List<BigDecimal> codigos = codigosDocentes.getDecimal(); |
int i = 1; |
107,7 → 108,7 |
} |
Docente d = service.getSiGesWEBSoap().getDocente(c, Globals.SIGES_INSTITUTION_CODE, year); |
Docente d = service.getSiGesWEBSoap().getDocente(c, new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year); |
logger.info("Codigo Funcionario Importado: SIGES(" + d.getCodigoFuncionario().intValue() + ") email IPP SIGES: " + d.getEmail()); |
logger.info("SIGES IMPORTED INFO: " + docenteToString(d)); |
Teacher t = DaoFactory.getTeacherDaoImpl().loadBySigesCode(d.getCodigoFuncionario().intValue()); |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportCourseService.java |
---|
25,6 → 25,7 |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import javax.xml.namespace.QName; |
import java.math.BigDecimal; |
import java.net.MalformedURLException; |
import java.net.URL; |
import java.util.*; |
52,7 → 53,7 |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
try |
{ |
logMessages.addMessage(new DefaultLogMessage("import.semestre.separated", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.semestre.separated", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
serviceLogInfo(logMessages.getLastMessage()); |
HashMap<String, Disciplina> disciplinasMap = new HashMap<String, Disciplina>(); |
65,10 → 66,11 |
* Build Course Units Maps |
*/ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
182,7 → 184,7 |
logMessages.addMessage(new DefaultLogMessage("import.semestre.course.units." + semestre, LogMessageTypeEnum.INFO)); |
serviceLogInfo("importing " + semestre + " course units"); |
logger.info("importing " + semestre + " course units"); |
ArrayOfDisciplina arrayOfDisciplina = service.getSiGesWEBSoap().getDisciplinasDaInstituicaoSemestre(Globals.SIGES_INSTITUTION_CODE, year, semestre); |
ArrayOfDisciplina arrayOfDisciplina = service.getSiGesWEBSoap().getDisciplinasDaInstituicaoSemestre(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year, semestre); |
List<Disciplina> disciplinas = arrayOfDisciplina.getDisciplina(); |
for (Disciplina d : disciplinas) |
{ |
224,7 → 226,7 |
newUnits++; |
} |
c.setName(d.getNome()); |
c.setInstitutionCode("" + Globals.SIGES_INSTITUTION_CODE); |
c.setInstitutionCode("" + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()); |
c.setCode("" + d.getCodigo().intValue()); |
c.setCourseCode("" + d.getCodigoCurso()); |
c.setCourseName("" + d.getNomeCurso()); |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportSumariesJson.java |
---|
39,6 → 39,7 |
import java.io.FileInputStream; |
import java.io.FileOutputStream; |
import java.io.IOException; |
import java.math.BigDecimal; |
import java.net.URL; |
import java.util.ArrayList; |
import java.util.HashMap; |
71,7 → 72,7 |
logger.info(msgS); |
DefaultLogMessages logMessages = new DefaultLogMessages(); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + Globals.SIGES_INSTITUTION_CODE)); |
logMessages.addMessage(new DefaultLogMessage("import.summaries", LogMessageTypeEnum.INFO, "instituicao " + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode())); |
serviceLogInfo(logMessages.getLastMessage()); |
85,10 → 86,11 |
{ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
serviceLogInfo("STARTING WEB SERVICE AT " + Globals.SIGES_WEBSERVICE_WSDL); |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
serviceLogInfo("STARTING WEB SERVICE AT " + WSDL); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (Throwable e) |
{ |
130,7 → 132,7 |
//comentario de teste |
try |
{ |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(Globals.SIGES_INSTITUTION_CODE, year,c.getCode(),semestre); |
arrayOfAulas = service.getSiGesWEBSoap().getAulas(new BigDecimal(DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()), year,c.getCode(),semestre); |
break; |
} |
catch(Throwable t) |
/impl/src/java/pt/estgp/estgweb/services/sms/SmsService.java |
---|
1,5 → 1,6 |
package pt.estgp.estgweb.services.sms; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.Globals; |
26,9 → 27,10 |
try |
{ |
SiGesWEB service; |
String WSDL = DaoFactory.getConfigurationDaoImpl().getSigesWebServicesWsdl(); |
try |
{ |
service = new SiGesWEB(new URL(Globals.SIGES_WEBSERVICE_WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
service = new SiGesWEB(new URL(WSDL), new QName(Globals.SIGES_WEBSERVICE_TARGET_NAMESPACE, "SiGesWEB")); |
} |
catch (MalformedURLException e) |
{ |
/impl/src/java/pt/estgp/estgweb/services/blogs/LoadEditableBlogs.java |
---|
1,16 → 1,15 |
package pt.estgp.estgweb.services.blogs; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.domain.views.BlogView; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.Globals; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
34,4 → 33,18 |
} |
return blogViews; |
} |
public List<BlogView> loadMax(Integer max,UserSession userSession) throws ServiceException |
{ |
boolean internal = true; |
if (userSession.getUser() == null) |
internal = false; |
List<BlogImpl> blogs = DaoFactory.getBlogDaoImpl().findBlogs(userSession.getUser().getRolesList(), internal,max); |
List<BlogView> blogViews = new ArrayList<BlogView>(); |
for(BlogImpl b: blogs) |
{ |
blogViews.add(new BlogView(b)); |
} |
return blogViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/blogs/LoadOwnerBlogs.java |
---|
30,4 → 30,14 |
} |
return blogViews; |
} |
public List<BlogView> loadMax(Integer max, UserSession userSession) throws ServiceException |
{ |
List<BlogImpl> blogs = DaoFactory.getBlogDaoImpl().loadOwnedBlogs(userSession.getUser().getId(),max); |
List<BlogView> blogViews = new ArrayList<BlogView>(); |
for(BlogImpl b: blogs) |
{ |
blogViews.add(new BlogView(b)); |
} |
return blogViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/blogs/LoadOwnerBlogPosts.java |
---|
1,17 → 1,15 |
package pt.estgp.estgweb.services.blogs; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.domain.views.BlogPostView; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.BlogPostImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.BlogPostImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.BlogPostView; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
32,4 → 30,15 |
} |
return blogViews; |
} |
public List<BlogPostView> loadMax(Integer max, UserSession userSession) throws ServiceException |
{ |
List<BlogPostImpl> blogs = DaoFactory.getBlogPostDaoImpl().loadOwnedBlogPostsMax(userSession.getUser().getId(), max); |
List<BlogPostView> blogViews = new ArrayList<BlogPostView>(); |
for(BlogPostImpl b: blogs) |
{ |
blogViews.add(new BlogPostView(b)); |
} |
return blogViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/services/announcements/LoadOwnerAnnouncements.java |
---|
1,18 → 1,16 |
package pt.estgp.estgweb.services.announcements; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.domain.AnnouncementImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.services.blogs.LoadBlogService; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.AnnouncementImpl; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import org.apache.log4j.Logger; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.ArrayList; |
/** |
* @author Jorge Machado |
33,4 → 31,16 |
} |
return announcementViews; |
} |
public List<AnnouncementView> loadMax(Integer max, UserSession userSession) throws ServiceException |
{ |
List<AnnouncementImpl> announcements = DaoFactory.getAnnouncementDaoImpl().loadOwnedAnnouncements(userSession.getUser().getId(),max); |
List<AnnouncementView> announcementViews = new ArrayList<AnnouncementView>(); |
for(AnnouncementImpl announcement: announcements) |
{ |
announcementViews.add(new AnnouncementView(announcement)); |
} |
return announcementViews; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/CourseUnitProgramImpl.java |
---|
5,7 → 5,6 |
import org.dom4j.*; |
import org.hibernate.NonUniqueResultException; |
import org.hibernate.Session; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.courseunits.SaveCourseUnitProgram; |
624,7 → 623,7 |
cu.setCode(line.codigoSIGESUnidade); |
cu.setCourseCode(line.codigoCurso); |
cu.setName(line.nomeUnidadeCurricular); |
cu.setInstitutionCode("" + Globals.SIGES_INSTITUTION_CODE); |
cu.setInstitutionCode("" + DaoFactory.getConfigurationDaoImpl().getSigesInstitutionCode()); |
setCourse(cu, line); |
DaoFactory.getCourseUnitDaoImpl().save(cu); |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitEvaluationView.java |
---|
18,6 → 18,7 |
private CourseUnitEvaluation courseUnitEvaluation; |
private boolean fechar = false; |
private boolean teacherComplete = false; |
public Class getReferenceClass() |
{ |
74,4 → 75,12 |
public void setFechar(boolean fechar) { |
this.fechar = fechar; |
} |
public boolean isTeacherComplete() { |
return teacherComplete; |
} |
public void setTeacherComplete(boolean teacherComplete) { |
this.teacherComplete = teacherComplete; |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitView.java |
---|
483,6 → 483,7 |
*/ |
int lateSummaries = 0; |
List<String> lateSummariesDates = new ArrayList<String>(); |
public synchronized List<CourseUnitSummaryView> getSummariesFromJson() { |
if(summariesFromJson != null) |
508,8 → 509,9 |
CourseUnitSummaryView view = new CourseUnitSummaryView(sum); |
if(view.getNumber() < 0 && view.getOriginalDate().getTime() < System.currentTimeMillis()) |
{ |
System.out.println(view.getNumber() + " " + view.getDate() + " " + view.getOriginalDate()); |
//System.out.println(view.getNumber() + " " + view.getDate() + " " + view.getOriginalDate()); |
lateSummaries++; |
lateSummariesDates.add(view.getDate()); |
} |
} |
} |
532,6 → 534,10 |
return null; |
} |
public List<String> getLateSummariesDates() { |
return lateSummariesDates; |
} |
public int getLateSummaries() |
{ |
getSummariesFromJson(); |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/BlogPostDaoImpl.java |
---|
1,23 → 1,20 |
package pt.estgp.estgweb.domain.dao.impl; |
import pt.estgp.estgweb.domain.BlogImpl; |
import jomm.utils.MyCalendar; |
import org.hibernate.Criteria; |
import org.hibernate.Query; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import pt.estgp.estgweb.domain.BlogPost; |
import pt.estgp.estgweb.domain.BlogPostImpl; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.BlogPost; |
import pt.estgp.estgweb.domain.dao.DaoUtils; |
import pt.estgp.estgweb.services.common.SearchTypeEnum; |
import java.util.ArrayList; |
import java.util.Calendar; |
import java.util.List; |
import java.util.Calendar; |
import java.util.Iterator; |
import java.util.ArrayList; |
import static org.hibernate.criterion.Restrictions.*; |
import org.hibernate.criterion.Order; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.Query; |
import org.hibernate.Criteria; |
import jomm.utils.MyCalendar; |
/** |
* @author Jorge Machado |
39,12 → 36,18 |
{ |
return createCriteria().add(eq("owner.id", ownerId)).list(); |
} |
public List<BlogPostImpl> loadOwnedBlogPostsMax(long ownerId,int max) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).addOrder(Order.desc("updateDate")).setMaxResults(max).list(); |
} |
public List<BlogPostImpl> loadOwnedBlogPosts(long ownerId, long blogId) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).add(eq("blog.id",blogId)).list(); |
} |
public List<BlogPostImpl> loadBlogPosts(long blogId, int month, int year) |
{ |
Calendar bottom = new MyCalendar(year,month,1); |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/ConfigurationDaoImpl.java |
---|
6,6 → 6,9 |
import java.util.Date; |
import java.util.List; |
//TODO PRECISA DE CHAMAR UM SERVICO EM VEZ DE SER ASSIM porque esta a abrir transacoes por todo lado |
//PRECISA DE SE FAZER UM CHECK A TODO O CODIGO QUE ABRE TRANSACOES FORA DOS SERVICOS |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
29,8 → 32,10 |
Configuration configuration = new ConfigurationImpl(); |
configuration.setInterfaceImportYear("201516"); |
configuration.setImportsDefaultImportYear("201516"); |
configuration.setCourseUnitEvaluationActiveYear(null); |
configuration.setImportsDefaultImportYear("http://172.20.100.5:8080/SigesWeb/SiGesWEB.asmx?wsdl"); |
configuration.setCourseUnitEvaluationActiveYear("201415"); |
configuration.setSaveDate(new Date()); |
configuration.setSigesInstitutionCode(1); |
save(configuration); |
return configuration; |
} |
149,4 → 154,84 |
getCurrentSession().getTransaction().commit(); |
} |
public int getSigesInstitutionCode() |
{ |
return load().getSigesInstitutionCode(); |
} |
public int getInstitutionCodeCreateTransaction() |
{ |
getCurrentSession().beginTransaction(); |
int code = getSigesInstitutionCode(); |
getCurrentSession().getTransaction().commit(); |
return code; |
} |
public void updateSigesInstitutionCode(int instCode) |
{ |
Configuration config = load(); |
config.setSigesInstitutionCode(instCode); |
} |
public void updateSigesInstitutionCodeCreateTransaction(int instCode) |
{ |
getCurrentSession().beginTransaction(); |
updateSigesInstitutionCode(instCode); |
getCurrentSession().getTransaction().commit(); |
} |
public int getNationalInstitutionCode() |
{ |
return load().getNationalInstitutionCode(); |
} |
/** |
* This method only creates transaction if not already active |
* @return |
*/ |
public int getNationalInstitutionCodeCreateTransaction() |
{ |
//boolean alreadyActive = getCurrentSession().getTransaction().isActive(); |
//if(!alreadyActive) |
getCurrentSession().beginTransaction(); |
int code = getNationalInstitutionCode(); |
//if(!alreadyActive) |
getCurrentSession().getTransaction().commit(); |
return code; |
} |
/** |
* Not problematic update only for interfaces |
* Will not work only in MultiWebServer environment |
* in that case needs a restart |
* @param instCode |
*/ |
public void updateNationalInstitutionCode(int instCode) |
{ |
Configuration config = load(); |
config.setNationalInstitutionCode(instCode); |
//Globals.NATIONAL_INSTITUTION_CODE = new BigDecimal(instCode); |
} |
/** |
* Not problematic update only for interfaces |
* Will not work only in MultiWebServer environment |
* in that case needs a restart |
* @param instCode |
*/ |
public void updateNationalInstitutionCodeCreateTransaction(int instCode) |
{ |
getCurrentSession().beginTransaction(); |
updateNationalInstitutionCode(instCode); |
//Globals.NATIONAL_INSTITUTION_CODE = new BigDecimal(instCode); |
getCurrentSession().getTransaction().commit(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/BlogDaoImpl.java |
---|
1,23 → 1,17 |
package pt.estgp.estgweb.domain.dao.impl; |
import pt.estgp.estgweb.domain.User; |
import org.hibernate.Criteria; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.BlogImpl; |
import pt.estgp.estgweb.domain.Blog; |
import pt.estgp.estgweb.domain.Announcement; |
import pt.estgp.estgweb.domain.dao.DaoUtils; |
import pt.estgp.estgweb.services.common.SearchTypeEnum; |
import java.util.ArrayList; |
import java.util.List; |
import java.util.Date; |
import java.util.ArrayList; |
import java.io.Serializable; |
import org.hibernate.HibernateException; |
import org.hibernate.Criteria; |
import static org.hibernate.criterion.Restrictions.*; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import jomm.dao.DaoException; |
/** |
* @author Jorge Machado |
43,12 → 37,27 |
return createCriteria().add(eq("owner.id", ownerId)).list(); |
} |
public List<BlogImpl> loadOwnedBlogs(long ownerId, int max) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).addOrder(Order.desc("updateDate")).setMaxResults(max).list(); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal) |
{ |
return findBlogs(roles,internal,null); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal, int max) |
{ |
return findBlogs(roles,internal,null,max); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal, String type) |
{ |
return findBlogs(roles,internal,type,-1); |
} |
public List<BlogImpl> findBlogs(List<String> roles, boolean internal, String type, int max) |
{ |
if (roles == null) |
{ |
roles = new ArrayList<String>(); |
69,11 → 78,13 |
if (co != null) |
criteria.add(co); |
criteria.add(eq("status", true)) |
.addOrder(Order.desc("title")); |
.addOrder(Order.desc("updateDate")); |
if(type != null) |
criteria.add(eq("type",type)); |
else |
criteria.add(isNull("type")); |
if(max > 0) |
criteria.setMaxResults(max); |
return criteria.list(); |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/AnnouncementDaoImpl.java |
---|
372,8 → 372,13 |
return createCriteria().add(eq("owner.id", ownerId)).addOrder(Order.desc("updateDate")).list(); |
} |
public List<AnnouncementImpl> loadOwnedAnnouncements(long ownerId, int size) |
{ |
return createCriteria().add(eq("owner.id", ownerId)).setMaxResults(size).addOrder(Order.desc("updateDate")).list(); |
} |
public List<Announcement> loadInvalidAnnouncements() |
{ |
Criteria c = createCriteria() |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitDaoImpl.java |
---|
495,13 → 495,17 |
public List<CourseUnit> loadMissingEvaluationValidateGivenCourse(long courseId) |
{ |
if(DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear()==null) |
return new ArrayList<CourseUnit>(); |
return createCriteria() |
.createAlias("course", "c") |
.createAlias("courseUnitEvaluation", "ce") |
.add(eq("c.id", courseId)) |
.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
.add(ge("importYear", "201415")) |
.add(eq("importYear", DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear())) |
//.add(ge("importYear", "201415"))//FirstYear where there was configurations |
.add((eq("ce.closed", false))) |
.add((eq("ce.teacherComplete", true))) |
.list(); |
} |
528,12 → 532,19 |
public List<CourseUnit> loadMissingEvaluation(long courseId) |
{ |
if(DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear()==null) |
return new ArrayList<CourseUnit>(); |
return createCriteria() |
.createAlias("course", "c") |
.createAlias("courseUnitEvaluation", "ce") |
.add(eq("c.id", courseId)) |
.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
.add(ge("importYear", "201415" )) |
.add(isNull("courseUnitEvaluation")) |
.add(eq("importYear", DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear())) |
//.add(not(eq("importYear", DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear()))) |
//.add(ge("importYear", "201415" )) |
//.add(isNull("courseUnitEvaluation")) |
//todo novo testar |
.add(or(isNull("courseUnitEvaluation"),(eq("ce.teacherComplete", false)))) |
.list(); |
} |
/impl/src/updates/version/release2015-11.txt |
---|
45,3 → 45,32 |
- todo tirar os todo job dos envios de emails e sends to ionline |
- todo Configurações possiveis de ir para BD |
- todo relembrar |
AVALIACAO CURRICULAR |
- ANO DE AVALIACAO CURRICULAR ATIVO |
- FALTA METER OS IF NAS PAGINAS DE EDIÇAO PARA nao deixar ng mecher se o ano nao estiver ativo |
- falta testar os DAO par as queries que mudaram para uso da variavel ano ativo |
- Falta actualizar base de dados com o campo novo do ATIVO |
- Falta meter a amarelo os relatorios do Ano Activo e meter qq coisa como so consulta nos nao ativos |
- Falta meter IF's na home para não aparecer nada de trabalho relacionado com o s lembreter dos programas |
-FALTA o SEMESTRE ACTIVO na avaliação que deverá ter TODOS, S1, S2, A, S1 A ou S2 A |
- campo teacherComplete default TRUE não incfluencia as queries porque estará sempre a true e nunca e metido a false |
a menos que seja a pedido especifico do DOCENTE frase no JSP CANCELAR ENTREGA MAS PARA JA BOTAO DESAPARECE e depois volta a ser aberto |
-query de por validar obriga teacherComplete a ser true no CourseUnitDao |
loadMissingEvaluationValidateGivenCourse |
e na outra query loadMissingEvaluation |
de não feitos passou a ser or NULL or teacherComplete = false neste momento falta testar o metodo onde a query hibernte |
tem o seguinte: |
.add(or(isNull("courseUnitEvaluation"),(eq("courseUnitEvaluation.teacherComplete", false)))) |
meter ftp server ionline configurável |
ver o que fazer com o POP se vai ou nao ao gmail |
/impl/src/hbm/pt/estgp/estgweb/domain/CourseUnit.hbm.xml |
---|
246,6 → 246,10 |
<timestamp source="db" name="updateDate" unsaved-value="null"/> |
<property name="saveDate" type="timestamp"/> |
<property name="closed" type="boolean"/> |
<!-- todo update aos do ano anterior para meter todos os evaluations salvos com teacherComplete = true --> |
<property name="teacherComplete" type="boolean"> |
<column name="teacherComplete" default="true"/> |
</property> |
<property name="numAlunosInscritos" type="text"/> |
<property name="numAlunosSemElementosAvaliacao" type="integer"/> |
/impl/src/hbm/pt/estgp/estgweb/domain/Configuration.hbm.xml |
---|
14,8 → 14,18 |
<timestamp source="db" name="updateDate" unsaved-value="null"/> |
<property name="saveDate" type="timestamp"/> |
<property name="interfaceImportYear" type="string"/> |
<!-- IMPORTS CONFIGS --> |
<property name="importsDefaultImportYear" type="string"/> |
<property name="sigesWebServicesWsdl" type="string"/> |
<property name="sigesWebServicesWsdl" type="string"> |
<column name="sigesWebServicesWsdl" default="http://172.20.100.5:8080/SigesWeb/SiGesWEB.asmx?wsdl"/> |
</property> |
<property name="sigesInstitutionCode" type="integer"> |
<column name="sigesInstitutionCode" default="1"/> |
</property> |
<property name="nationalInstitutionCode" type="integer"> |
<column name="nationalInstitutionCode" default="3122"/> |
</property> |
<!--CourseUnitEvaluation formatImportYear--> |
<property name="courseUnitEvaluationActiveYear" type="string"/> |
/impl/src/web/imgs/preencher.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |
/impl/src/web/public/courses/courseSeparators.jsp |
---|
1,5 → 1,7 |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page import="pt.estgp.estgweb.web.WebProxy" %> |
<%@ page import="java.math.BigDecimal" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
10,7 → 12,7 |
<jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/> |
<div class="seccao"> |
<h2>${CourseView.name} (<%=Globals.NATIONAL_INSTITUTION_CODE%> / ${CourseView.code})</h2> |
<h2>${CourseView.name} (<%=DaoFactory.getConfigurationDaoImpl().getNationalInstitutionCodeCreateTransaction()%> / ${CourseView.code})</h2> |
<logic:notEmpty name="CourseView" property="formatedDescription"><p>${CourseView.formatedDescription}</p></logic:notEmpty> |
/impl/src/web/public/courses/courseList.jsp |
---|
1,6 → 1,8 |
<%@ page import="pt.estgp.estgweb.domain.views.CourseView" %> |
<%@ page import="pt.estgp.estgweb.web.WebProxy" %> |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page import="java.math.BigDecimal" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
15,7 → 17,7 |
<logic:notEmpty name="courseView" property="studiesPlanStreamId"> |
<li> |
<%--<p><a href="javascript:showOrHideOne(${courseView.id})">${courseView.name}</a> - <%=Globals.NATIONAL_INSTITUTION_CODE%>/${courseView.code} - (<a href="<%=request.getContextPath() + "/startLoadCourse.do?type=" + request.getAttribute("type") + "&courseView.id=" + courseView.getId()%>"><bean:message key="course.studies.plan.users"/> </a>)</p>--%> |
<p><a href="<%=request.getContextPath() + "/startLoadCourseSeparators.do?type=" + request.getAttribute("type") + "&courseView.id=" + courseView.getId()%>">${courseView.name}</a> - <%=Globals.NATIONAL_INSTITUTION_CODE%>/${courseView.code} </a></p> |
<p><a href="<%=request.getContextPath() + "/startLoadCourseSeparators.do?type=" + request.getAttribute("type") + "&courseView.id=" + courseView.getId()%>">${courseView.name}</a> - <%=DaoFactory.getConfigurationDaoImpl().getNationalInstitutionCodeCreateTransaction()%>/${courseView.code} </a></p> |
<%--<div style="padding-left:20px;">--%> |
<%--<div class="seccao borderLeft" style="display:none;" id="${courseView.id}">--%> |
/impl/src/web/public/courses/course.jsp |
---|
1,5 → 1,7 |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page import="pt.estgp.estgweb.web.WebProxy" %> |
<%@ page import="java.math.BigDecimal" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
10,7 → 12,7 |
<jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/> |
<div class="seccao"> |
<h2>${CourseView.name} (<%=Globals.NATIONAL_INSTITUTION_CODE%> / ${CourseView.code})</h2> |
<h2>${CourseView.name} (<%=DaoFactory.getConfigurationDaoImpl().getNationalInstitutionCodeCreateTransaction()%> / ${CourseView.code})</h2> |
<logic:empty name="CourseView" property="cacheWebDocument"> |
<div class="seccao"> |
/impl/src/web/public/courses/courseMenuList.jsp |
---|
1,4 → 1,6 |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page import="java.math.BigDecimal" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
17,7 → 19,7 |
<logic:iterate id="courseView" name="courses" type="pt.estgp.estgweb.domain.views.CourseView"> |
<logic:notEmpty name="courseView" property="studiesPlanStreamId"> |
<li> |
<html:link action="/startLoadCourse?type=${type}&courseView.id=${courseView.id}">${courseView.name} (<%=Globals.NATIONAL_INSTITUTION_CODE%>/${courseView.code})</html:link> |
<html:link action="/startLoadCourse?type=${type}&courseView.id=${courseView.id}">${courseView.name} (<%=DaoFactory.getConfigurationDaoImpl().getNationalInstitutionCodeCreateTransaction()%>/${courseView.code})</html:link> |
</li> |
</logic:notEmpty> |
</logic:iterate> |
/impl/src/web/user/courseunits/courseunit.jsp |
---|
1,6 → 1,8 |
<%@ page import="pt.estgp.estgweb.domain.Teacher" %> |
<%@ page import="pt.estgp.estgweb.domain.TeacherImpl" %> |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.impl.ConfigurationDaoImpl" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
26,6 → 28,10 |
} |
request.setAttribute("user", user); |
request.setAttribute("fromAction", fromAction); |
String activeEvaluationYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYearCreateTransaction(); |
%> |
<jomm:messages/> |
37,30 → 43,35 |
<td valign="top" class="seccao"> |
<baco:isAuthenticated> |
<% |
if(activeEvaluationYear != null) |
{ |
%> |
<% |
if((CourseUnitView.getResponsableTeacher() != null && CourseUnitView.getResponsableTeacher().getId() == UserSession.getUser().getId()) |
|| |
CourseUnitView.isOwnedBy(UserSession.getUser(),false) |
|| |
//Validation Role e o papel da comissão de curso |
UserSession.getUser().hasRole(CourseUnitView.getCourseView().getValidationRole())) |
{ |
if(CourseUnitView.isValidEvaluation()) |
if((CourseUnitView.getResponsableTeacher() != null && CourseUnitView.getResponsableTeacher().getId() == UserSession.getUser().getId()) |
|| |
CourseUnitView.isOwnedBy(UserSession.getUser(),false) |
|| |
//Validation Role e o papel da comissão de curso |
UserSession.getUser().hasRole(CourseUnitView.getCourseView().getValidationRole())) |
{ |
if(CourseUnitView.isValidEvaluation()) |
{ |
%> |
<p> |
<label class="INFO"> <a href="<%=request.getContextPath()%>/repositoryStream/<%=CourseUnitView.getEvaluationStreamId()%>">Relatório de avaliação em PDF</a></label> |
</p> |
<% |
} |
else |
{ |
} |
else |
{ |
%> |
<p> |
<label class="WARNING">Atenção o relatório de avaliação deve ser preenchido no ano 2014-2015 (Entrar no 2014-2015 pelo menu lateral esquerdo antes de clicar em relatório de avaliação e confirmar no titulo da unidade).</label> |
<label class="WARNING">Atenção o relatório de avaliação deve ser preenchido no ano <%=activeEvaluationYear%> (Entrar no <%=activeEvaluationYear%> pelo menu lateral esquerdo antes de clicar em relatório de avaliação e confirmar no titulo da unidade).</label> |
</p> |
<% |
} |
} |
} |
%> |
263,14 → 274,24 |
<div class="seccao"> |
<h2><bean:message key="courseunit.summaries"/></h2> |
<logic:notEmpty name="CourseUnitView" property="summariesFromJson"> |
<p><a href="<%=request.getContextPath()%>/ftpProxyStream/ionline${CourseUnitView.sumariosPathFileIntranet}">Descarregar PDF</a></p> |
<logic:greaterThan value="0" name="CourseUnitView" property="lateSummaries"> |
<p style="background-color: yellow">Tem <bean:write name="CourseUnitView" property="lateSummaries"/> |
<logic:equal name="CourseUnitView" property="lateSummaries" value="1">Sumário</logic:equal> |
<logic:greaterThan name="CourseUnitView" property="lateSummaries" value="1">Sumários</logic:greaterThan> |
por preencher. |
<a target="_blank" href="http://netpa.ipportalegre.pt">Aceda ao NETPA para regularizar</a></p> |
</logic:greaterThan> |
<baco:hasRole role="teacher"> |
<p><a href="<%=request.getContextPath()%>/ftpProxyStream/ionline${CourseUnitView.sumariosPathFileIntranet}">Descarregar PDF</a></p> |
<logic:greaterThan value="0" name="CourseUnitView" property="lateSummaries"> |
<p style="background-color: yellow">Tem <bean:write name="CourseUnitView" property="lateSummaries"/> |
<logic:equal name="CourseUnitView" property="lateSummaries" value="1">Sumário</logic:equal> |
<logic:greaterThan name="CourseUnitView" property="lateSummaries" value="1">Sumários</logic:greaterThan> |
por preencher. |
<a target="_blank" href="http://netpa.ipportalegre.pt">Aceda ao NETPA para regularizar</a> |
ou ligue para o Sr José Luis para confirmar a situação:</a> |
</p> |
<ul> |
<logic:iterate id="sumLate" name="CourseUnitView" property="lateSummariesDates"> |
<li>Por lançar: <bean:write name="sumLate"/></li> |
</logic:iterate> |
</ul> |
</logic:greaterThan> |
</baco:hasRole> |
</logic:notEmpty> |
/impl/src/web/user/courseunits/menu.jsp |
---|
20,6 → 20,7 |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<% |
String activeEvaluationYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYearCreateTransaction(); |
try{ |
if (request.getAttribute("BlogView") != null) |
{ |
78,8 → 79,18 |
) |
{ |
%> |
<li> |
<html:link action="/user/startLoadCourseUnitEvaluation.do?courseUnitId=${CourseUnitView.id}"><bean:message key="courseunit.menu.evaluation"/></html:link> |
<li style="vertical-align: middle"> |
<html:link action="/user/startLoadCourseUnitEvaluation.do?courseUnitId=${CourseUnitView.id}"><bean:message key="courseunit.menu.evaluation"/> |
<% |
if(activeEvaluationYear != null && activeEvaluationYear.equals(CourseUnitView.getImportYear())) |
{ |
%> |
<img src="<%=request.getContextPath()%>/imgs/preencher.gif" width="35px"/> |
<% |
} |
%> |
</html:link> |
</li> |
<% |
} |
/impl/src/web/user/serviceZone/serviceZone.jsp |
---|
24,12 → 24,13 |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{}; |
Object[] argsAn = new Object[]{10}; |
List<AnnouncementView> ownerAnnouncement = null; |
if (Globals.MODULE_STATUS_ANNOUNCEMENTS) |
{ |
ownerAnnouncement = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadOwnerAnnouncements", args, names); |
ownerAnnouncement = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadOwnerAnnouncementsMax", argsAn); |
request.setAttribute("OwnerAnnouncements", ownerAnnouncement); |
} |
39,13 → 40,14 |
if (Globals.MODULE_STATUS_BLOGS) |
{ |
editableBlogs = (List<BlogView>) sm.execute(RequestUtils.getRequester(request, response), "LoadEditableBlogs", args, names); |
editableBlogs = (List<BlogView>) sm.execute(RequestUtils.getRequester(request, response), "LoadEditableBlogsMax", argsAn); |
request.setAttribute("EditableBlogs", editableBlogs); |
ownerBlogs = (List<BlogView>) sm.execute(RequestUtils.getRequester(request, response), "LoadOwnerBlogs", args, names); |
ownerBlogs = (List<BlogView>) sm.execute(RequestUtils.getRequester(request, response), "LoadOwnerBlogsMax", argsAn); |
request.setAttribute("OwnerBlogs", ownerBlogs); |
ownerBlogPosts = (List<BlogPostView>) sm.execute(RequestUtils.getRequester(request, response), "LoadOwnerBlogPosts", args, names); |
ownerBlogPosts = (List<BlogPostView>) sm.execute(RequestUtils.getRequester(request, response), "LoadOwnerBlogPostsMax", argsAn); |
request.setAttribute("OwnerBlogPosts", ownerBlogPosts); |
} |
/impl/build-web-services.xml |
---|
14,48 → 14,48 |
<target name="ws.generate-siges-client" depends="initDirs"> |
<copy file="${ws.client.binding.dir}/${ws.siges.binding.file}" todir="${build.dir.ws}" overwrite="true"/> |
<replace file="${build.dir.ws}/${ws.siges.binding.file}" encoding="UTF-8"> |
<replacefilter token="@wsdl.client@" value="${ws.siges.wsdl}"/> |
<replacefilter token="@target.namespace@" value="${ws.siges.target.namespace}"/> |
<replacefilter token="@ws.package@" value="${ws.siges.package}"/> |
</replace> |
<wsimport |
debug="${ws.debug}" |
verbose="${ws.verbose}" |
keep="${ws.keep}" |
extension="${ws.extension}" |
destdir="${gen.dir.java}" |
wsdl="${ws.siges.wsdl}"> |
<binding dir="${build.dir.ws}" includes="${ws.client.binding.file}"/> |
</wsimport> |
<delete> |
<fileset dir="${gen.dir.java}"> |
<include name="**/*.class"/> |
</fileset> |
</delete> |
</target> |
<replacefilter token="@wsdl.client@" value="${ws.siges.wsdl}"/> |
<replacefilter token="@target.namespace@" value="${ws.siges.target.namespace}"/> |
<replacefilter token="@ws.package@" value="${ws.siges.package}"/> |
</replace> |
<wsimport |
debug="${ws.debug}" |
verbose="${ws.verbose}" |
keep="${ws.keep}" |
extension="${ws.extension}" |
destdir="${gen.dir.java}" |
wsdl="${ws.siges.wsdl}"> |
<binding dir="${build.dir.ws}" includes="${ws.client.binding.file}"/> |
</wsimport> |
<delete> |
<fileset dir="${gen.dir.java}"> |
<include name="**/*.class"/> |
</fileset> |
</delete> |
</target> |
<!-- <target name="ws.generate-google-client"> |
<property name="config_target" location="${ws.conf.dir}"/> |
<copy file="${ws.conf.dir}/GoogleSearch-config.xml" tofile="${build.dir.ws}/GoogleSearch-config.xml" filtering="on" encoding="UTF-8" overwrite="true"> |
<filterset> |
<filter token="CONFIG_ABSOLUTE_PATH" value="${config_target}"/> |
<filter token="package" value="${ws.google.package}"/> |
</filterset> |
</copy> |
<wscompile |
verbose="true" |
debug="true" |
xPrintStackTrace="true" |
xSerializable="true" |
optimize="true" |
fork="true" |
keep="true" |
client="true" |
import="false" |
base="${build.dir.classes}" sourceBase="${gen.dir.java}" mapping="${build.dir.ws}/GoogleSearch-mapping.xml" config="${build.dir.ws}/GoogleSearch-config.xml"> |
<classpath refid="pathToToolsLib"/> |
</wscompile> |
</target>--> |
<property name="config_target" location="${ws.conf.dir}"/> |
<copy file="${ws.conf.dir}/GoogleSearch-config.xml" tofile="${build.dir.ws}/GoogleSearch-config.xml" filtering="on" encoding="UTF-8" overwrite="true"> |
<filterset> |
<filter token="CONFIG_ABSOLUTE_PATH" value="${config_target}"/> |
<filter token="package" value="${ws.google.package}"/> |
</filterset> |
</copy> |
<wscompile |
verbose="true" |
debug="true" |
xPrintStackTrace="true" |
xSerializable="true" |
optimize="true" |
fork="true" |
keep="true" |
client="true" |
import="false" |
base="${build.dir.classes}" sourceBase="${gen.dir.java}" mapping="${build.dir.ws}/GoogleSearch-mapping.xml" config="${build.dir.ws}/GoogleSearch-config.xml"> |
<classpath refid="pathToToolsLib"/> |
</wscompile> |
</target>--> |
<target name="test"> |
<java classname="pt.ipp.siges.web.services.clients.Test" classpath="${build.dir.classes}" classpathref="pathToToolsLibRoutines"/> |
/impl/build.properties |
---|
172,8 → 172,10 |
ws.client.features=explicitcontext,useonewayoperations |
#Siges Service Specific Configuration |
ws.siges.package=pt.ipp.siges.web.services.clients |
#ws.siges.wsdl=http://172.20.100.5:8080/SigesWeb/SiGesWEB.asmx?wsdl |
ws.siges.wsdl=http://localhost:8080/SigesWeb/SiGesWEB.asmx?wsdl |
#DONT USE ANY MORE NOW IS IN CONFIGURATION DATABASE ONLY FOR BUILD WEB-SERVICES |
ws.siges.wsdl=http://172.20.100.5:8080/SigesWeb/SiGesWEB.asmx?wsdl |
#DONT USE ANY MORE NOW IS IN CONFIGURATION DATABASE |
#ws.siges.wsdl=http://localhost:8080/SigesWeb/SiGesWEB.asmx?wsdl |
ws.siges.target.namespace=http://www.ipportalegre.pt/siges/web/services |
ws.siges.binding.file=siges-client.xml |
/impl/build.xml |
---|
424,7 → 424,7 |
<replacefilter token="@email.templates.dir@" value="${email.templates.dir}"/> |
<replacefilter token="@use.ldap@" value="${use.ldap}"/> |
<replacefilter token="@site.url@" value="${site.url}"/> |
<replacefilter token="@ws.siges.wsdl@" value="${ws.siges.wsdl}"/> |
<!-- DONT USE ANY MORE NOW IS IN CONFIGURATION DAO <replacefilter token="@ws.siges.wsdl@" value="${ws.siges.wsdl}"/>--> |
<replacefilter token="@ws.siges.target.namespace@" value="${ws.siges.target.namespace}"/> |
<replacefilter token="@intranet.setup.folders.file@" value="${build.dir.relative.intranet.setup.folders.file}"/> |
<replacefilter token="@intranet.setup.folders.filename@" value="${intranet.setup.folders.filename}"/> |