/impl/conf/language/MessageResourcesCourse.properties |
---|
35,6 → 35,9 |
course.M=Mestrado |
course.P=Pós Graduação |
course.E=CET |
course.C=Acções de Formação de Curta Duração |
course.A=Formações Avançadas |
course.O=Outras Formações |
course.Bs=Bacharlatos |
course.Ls=Lincenciaturas |
/impl/conf/WEB-INF/struts/struts-courses.xml |
---|
23,6 → 23,9 |
<action path="/courses" forward="page.courses"/> |
<action path="/coursesFromStudentPortal" forward="page.alunosInformacaoAcademicaPortalMenu.courses"/> |
<action path="/startLoadCourse" forward="/courseController.do?dispatch=load"/> |
<action path="/courseController" |
type="pt.estgp.estgweb.web.controllers.courses.CoursesController" |
/impl/conf/WEB-INF/struts/tiles-courses.xml |
---|
13,6 → 13,12 |
<put name="body" value="/public/courses/index.jsp"/> |
</definition> |
<definition name="page.alunosInformacaoAcademicaPortalMenu.courses" extends="page.alunosInformacaoAcademicaPortalMenu.proxy"> |
<put name="title" value="Cursos"/> |
<put name="body" value="/public/courses/index.jsp"/> |
</definition> |
<definition name="page.load.course" extends="base.layout1"> |
<put name="title" value="Curso"/> |
<put name="topnav" value="/public/courses/topnavCourse.jsp"/> |
/impl/conf/WEB-INF/struts/struts-default.xml |
---|
152,6 → 152,8 |
<forward name="utilsLayoutIOnlineConfigurable.ftp" path="page.utilsLayoutIOnlineConfigurable.proxy.ftp"/> |
</action> |
<!--Portal Forward--> |
<action path="/student" forward="page.portal.student"/> |
<action path="/futureStudent" forward="page.portal.futureStudent"/> |
/impl/conf/app.properties |
---|
30,6 → 30,9 |
email.courseunit.announcement.subject.pt={0}: {1} (ESTG) |
email.courseunit.announcement.subject.en={0}: {1} (ESTG) |
email.courseunit.work.subject.pt={0}: {1} (ESTG) |
email.courseunit.work.subject.en={0}: {1} (ESTG) |
email.courseunit.blogpost.subject.pt={0}: {1} (ESTG) |
email.courseunit.blogpost.subject.en={0}: {1} (ESTG) |
299,6 → 302,9 |
######################################################################### |
# Imports SIGoES |
# |
siges.degree.1=L |
national.institution.code=3122 |
siges.institution.code=1 |
ws.siges.wsdl=@ws.siges.wsdl@ |
398,4 → 404,11 |
######################################## |
# trabalhos |
# |
######################################### |
#number of days to reminder be present in home tasks after expired work. |
work.reminder.unntil.days.after.expired=10 |
/impl/conf/template/email/courseUnitWork_en.txt |
---|
New file |
0,0 → 1,23 |
# 0 : Course Unit Name |
# 1 : Title |
# 2 : Text |
# 3 : Teacher |
# |
# Course Unit Assignement |
# |
Dear Student |
A new work has been added in: |
{0} |
{1} |
{2} |
Best Regards {3} |
--------------------------------------------- |
Escola Superior de Tecnologia e Gestão |
Instituto Politécnico de Portalegre |
http://www.estgp.pt |
/impl/conf/template/email/courseUnitWork_pt.txt |
---|
New file |
0,0 → 1,23 |
# 0 : Course Unit Name |
# 1 : Title |
# 2 : Text |
# 3 : Teacher |
# |
# Course Unit Assignement |
# |
Caro estudante |
Um novo trabalho foi adicionado na unidade: |
{0} |
{1} |
{2} |
Com os melhores cumprimentos {3} |
--------------------------------------------- |
Escola Superior de Tecnologia e Gestão |
Instituto Politécnico de Portalegre |
http://www.estgp.pt |
/impl/conf/template/email/courseUnitAnnouncement_en.txt |
---|
1,3 → 1,4 |
# 0 : Course Unit Name |
# 1 : Title |
# 2 : Text |
/impl/conf/template/email/courseUnitAnnouncement_pt.txt |
---|
1,4 → 1,5 |
# 0 : Course Unit Name |
|
# 0 : Course Unit Name |
# 1 : Title |
# 2 : Text |
# 3 : Teacher |
/impl/conf/berserk/sd.xml |
---|
1161,6 → 1161,16 |
<chain name="Logger"/> |
</filterChains> |
</service> |
<service> |
<name>LoadCoursesImportYearByType</name> |
<implementationClass>pt.estgp.estgweb.services.courses.CoursesService</implementationClass> |
<description>Load All Courses</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>loadCoursesImportYearByType</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
</filterChains> |
</service> |
/impl/src/java/pt/estgp/estgweb/utils/Email.java |
---|
27,6 → 27,7 |
private String subject; |
private List<String> recipients; |
private Message.RecipientType type = Message.RecipientType.TO; |
private String from; |
private String emailTemplateName; |
private List<String> arguments; |
41,7 → 42,17 |
this.arguments = arguments; |
} |
public Email(String subject, List<String> recipients, String from, String mailTemplateName, List<String> arguments, Message.RecipientType type) |
{ |
this.type = type; |
this.subject = subject; |
this.recipients = recipients; |
this.from = from; |
this.emailTemplateName = mailTemplateName; |
this.arguments = arguments; |
} |
public String getSubject() |
{ |
return subject; |
90,4 → 101,15 |
System.out.println(validEmail("e@e.pt")); |
System.out.println(validEmail("jmachado@estgp.pt")); |
} |
public Message.RecipientType getType() |
{ |
return type; |
} |
public void setType(Message.RecipientType type) |
{ |
this.type = type; |
} |
} |
/impl/src/java/pt/estgp/estgweb/Globals.java |
---|
166,6 → 166,7 |
public static final String INTRANET_SETUP_FILE_NAME = ConfigProperties.getProperty("intranet.setup.filename"); |
public static final int COURSEUNIT_ASSIGNEMENT_NUMBER_DAYS_REMINDER_AFTER_EXPIRED = ConfigProperties.getIntProperty("work.reminder.unntil.days.after.expired"); |
public static final String COURSEUNIT_ASSIGNEMENT_TYPE_NO_FILE = "nofile"; |
public static final String PROFILE_SCHOLAR_DEGREE_SUPERIOR = "superior"; |
218,6 → 219,11 |
public static final String EMAIL_COURSEUNIT_ANNOUNCEMENT_TEMPLATE_PT = "courseUnitAnnouncement_pt.txt"; |
public static final String EMAIL_COURSEUNIT_ANNOUNCEMENT_TEMPLATE_EN = "courseUnitAnnouncement_en.txt"; |
public static final String EMAIL_COURSEUNIT_WORK_SUBJECT_PT = ConfigProperties.getProperty("email.courseunit.work.subject.pt"); |
public static final String EMAIL_COURSEUNIT_WORK_SUBJECT_EN = ConfigProperties.getProperty("email.courseunit.work.subject.en"); |
public static final String EMAIL_COURSEUNIT_WORK_TEMPLATE_PT = "courseUnitWork_pt.txt"; |
public static final String EMAIL_COURSEUNIT_WORK_TEMPLATE_EN = "courseUnitWork_en.txt"; |
public static final String EMAIL_COURSEUNIT_BLOGPOST_SUBJECT_PT = ConfigProperties.getProperty("email.courseunit.blogpost.subject.pt"); |
public static final String EMAIL_COURSEUNIT_BLOGPOST_SUBJECT_EN = ConfigProperties.getProperty("email.courseunit.blogpost.subject.en"); |
public static final String EMAIL_COURSEUNIT_BLOGPOST_TEMPLATE_PT = "courseUnitBlogPost_pt.txt"; |
/impl/src/java/pt/estgp/estgweb/services/courses/CoursesService.java |
---|
1,34 → 1,30 |
package pt.estgp.estgweb.services.courses; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import jomm.utils.FilesUtils; |
import org.apache.log4j.Logger; |
import org.dom4j.Document; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.Course; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
import pt.estgp.estgweb.domain.RepositoryFileImpl; |
import pt.estgp.estgweb.domain.UserSession; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.views.CourseView; |
import pt.estgp.estgweb.filters.chains.ResourceAccessControlEnum; |
import pt.estgp.estgweb.services.data.IRepositoryFile; |
import pt.estgp.estgweb.services.data.RepositoryService; |
import pt.estgp.estgweb.services.data.IRepositoryFile; |
import pt.estgp.estgweb.services.courseunits.LoadCourseUnitAnnouncements; |
import pt.estgp.estgweb.services.courseunits.LoadCourseUnitService; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.domain.views.CourseUnitView; |
import pt.estgp.estgweb.domain.views.AnnouncementView; |
import pt.estgp.estgweb.domain.views.CourseView; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.filters.chains.ResourceAccessControlEnum; |
import pt.estgp.estgweb.utils.DatesUtils; |
import pt.estgp.estgweb.utils.Dom4jUtil; |
import pt.estgp.estgweb.utils.DatesUtils; |
import pt.estgp.estgweb.Globals; |
import org.apache.log4j.Logger; |
import org.dom4j.Document; |
import org.dom4j.DocumentException; |
import pt.utl.ist.berserk.logic.serviceManager.IService; |
import java.util.List; |
import java.util.ArrayList; |
import java.io.IOException; |
import java.io.InputStream; |
import java.io.PrintWriter; |
import java.io.StringWriter; |
import java.io.IOException; |
import java.net.MalformedURLException; |
import java.util.ArrayList; |
import java.util.List; |
import jomm.utils.FilesUtils; |
/* |
* @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
* |
170,7 → 166,7 |
public List<CourseView> loadCoursesImportYearArea(String importYear, String area) throws ServiceException |
{ |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAllOrderByName(importYear,area); |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAllOrderByName(importYear,area,null); |
List<CourseView> courseViews = new ArrayList<CourseView>(); |
for(Course c: courses) |
{ |
192,6 → 188,18 |
} |
return courseViews; |
} |
public List<CourseView> loadCoursesImportYearByType(String type) throws ServiceException |
{ |
String importYearIntranet = DatesUtils.getImportYear(); |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAllOrderByName(importYearIntranet,null,type); |
List<CourseView> courseViews = new ArrayList<CourseView>(); |
for(Course c: courses) |
{ |
CourseView courseView = new CourseView(c); |
courseViews.add(courseView); |
} |
return courseViews; |
} |
/impl/src/java/pt/estgp/estgweb/services/courseunits/DirectedCoordinatedUnitsService.java |
---|
119,7 → 119,7 |
} |
else |
{ |
courses = DaoFactory.getCourseDaoImpl().findAllOrderByName(importYear,area); |
courses = DaoFactory.getCourseDaoImpl().findAllOrderByName(importYear,area,null); |
} |
List<CourseView> courseViews = new ArrayList<CourseView>(); |
/impl/src/java/pt/estgp/estgweb/services/courseunits/CourseUnitWorkService.java |
---|
6,12 → 6,18 |
import pt.estgp.estgweb.domain.views.CourseUnitDeliverableView; |
import pt.estgp.estgweb.domain.views.BlogView; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.enums.LangEnum; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.expceptions.ServiceException; |
import pt.estgp.estgweb.services.data.RepositoryService; |
import pt.estgp.estgweb.services.blogs.CreateBlogService; |
import pt.estgp.estgweb.services.email.SendEmailService; |
import pt.estgp.estgweb.services.email.EMAILJob; |
import pt.estgp.estgweb.services.jobs.JobScheduleService; |
import pt.estgp.estgweb.filters.chains.ResourceAccessControlEnum; |
import pt.estgp.estgweb.filters.exceptions.AccessDeniedException; |
import pt.estgp.estgweb.utils.Email; |
import pt.estgp.estgweb.Globals; |
import org.apache.log4j.Logger; |
import java.util.List; |
73,10 → 79,31 |
repositoryService.updateRepositoryFile(assignement.getRepositoryStream(), file, contentType, extension, size, name, "courseunit.assignement.file " + courseUnit.getName() + " of " + userSession.getUser().getUsername(), ResourceAccessControlEnum.courseunitDomain); |
} |
if(assignement.isStatus()) |
trySendWorkEmail(assignement,userSession); |
return loadCourseUnitWorks(id,userSession); |
} |
private void trySendWorkEmail(CourseUnitAssignement assignement, UserSession userSession) |
{ |
CourseUnit c = assignement.getCourseUnit(); |
List<User> users = new ArrayList<User>(); |
if(c.getStudents() != null) |
users.addAll(c.getStudents()); |
if(c.getTeachers() != null) |
users.addAll(c.getTeachers()); |
sendWorkEmail(assignement,c.getNormalizedName(), userSession, users); |
} |
SendEmailService sendEmailService = new SendEmailService(); |
private void sendWorkEmail(CourseUnitAssignement a, String desc, UserSession userSession, List<User> users) |
{ |
Email e = sendEmailService.getCourseUnitWorkEmail(a, LangEnum.PORTUGUESE,userSession,users); |
EMAILJob emailJob = new EMAILJob(e); |
JobScheduleService.getInstance().scheduleNow(emailJob,"CourseUnit Assignement Email:" + desc,userSession); |
} |
public CourseUnitView loadCourseUnitWorks(long id, UserSession userSession) throws ServiceException |
{ |
CourseUnitView cV = loadCourseUnitService.run(id,false,false,false,userSession); |
/impl/src/java/pt/estgp/estgweb/services/email/SendEmailService.java |
---|
53,7 → 53,7 |
if(Email.validEmail(recipient)) |
{ |
valid=true; |
message.addRecipient(Message.RecipientType.TO,new InternetAddress(recipient)); |
message.addRecipient(email.getType(),new InternetAddress(recipient)); |
} |
} |
if(valid) |
152,10 → 152,15 |
{ |
if(Email.validEmail(u.getEmail())) |
recipients.add(u.getEmail()); |
if(Email.validEmail(u.getOutEmail())) |
recipients.add(u.getOutEmail()); |
} |
String subject = java.text.MessageFormat.format(subjectTxt,new String[]{announcement.getCourseUnit().getNormalizedName(),announcement.getTitle()}); |
return new Email(subject ,recipients, Globals.SYSTEM_EMAIL_BOX,template,arguments); |
String fromEmail = Globals.SYSTEM_EMAIL_BOX; |
if(announcement.getOwner() != null && Email.validEmail(announcement.getOwner().getEmail())) |
fromEmail = announcement.getOwner().getEmail(); |
return new Email(subject ,recipients,fromEmail,template,arguments,Message.RecipientType.BCC); |
} |
public Email getCourseUnitBlogPostEmail(BlogPost post, LangEnum langEnum, String from, List<User> users) |
185,13 → 190,61 |
{ |
if(Email.validEmail(u.getEmail())) |
recipients.add(u.getEmail()); |
if(Email.validEmail(u.getOutEmail())) |
recipients.add(u.getOutEmail()); |
} |
String subject = java.text.MessageFormat.format(subjectTxt,new String[]{((CourseUnitBlog)post.getBlog()).getCourseUnit().getNormalizedName(),post.getTitle()}); |
return new Email(subject ,recipients, Globals.SYSTEM_EMAIL_BOX,template,arguments); |
String fromEmail = Globals.SYSTEM_EMAIL_BOX; |
if(post.getOwner() != null && Email.validEmail(post.getOwner().getEmail())) |
fromEmail = post.getOwner().getEmail(); |
return new Email(subject ,recipients, fromEmail, template,arguments,Message.RecipientType.BCC); |
} |
public Email getCourseUnitWorkEmail(CourseUnitAssignement assignement, LangEnum langEnum, UserSession userSession, List<User> users) |
{ |
List<String> arguments = new ArrayList<String>(); |
arguments.add(assignement.getCourseUnit().getName()); |
arguments.add(assignement.getTitle()); |
arguments.add(assignement.getDescription()); |
if(userSession != null && userSession.getName() != null) |
arguments.add(userSession.getName()); |
else |
arguments.add("unknown"); |
String subjectTxt; |
String template; |
if(langEnum == LangEnum.PORTUGUESE) |
{ |
template = Globals.EMAIL_COURSEUNIT_WORK_TEMPLATE_PT; |
subjectTxt = Globals.EMAIL_COURSEUNIT_WORK_SUBJECT_PT; |
} |
else |
{ |
template = Globals.EMAIL_COURSEUNIT_WORK_TEMPLATE_EN; |
subjectTxt = Globals.EMAIL_COURSEUNIT_WORK_SUBJECT_EN; |
} |
List<String> recipients = new ArrayList<String>(); |
for(User u: users) |
{ |
if(Email.validEmail(u.getEmail())) |
recipients.add(u.getEmail()); |
if(Email.validEmail(u.getOutEmail())) |
recipients.add(u.getOutEmail()); |
} |
String subject = java.text.MessageFormat.format(subjectTxt,new String[]{assignement.getCourseUnit().getNormalizedName(),assignement.getTitle()}); |
String fromEmail = Globals.SYSTEM_EMAIL_BOX; |
if(userSession!= null && userSession.getUser() != null && Email.validEmail(userSession.getUser().getEmail())) |
fromEmail = userSession.getUser().getEmail(); |
return new Email(subject ,recipients,fromEmail,template,arguments,Message.RecipientType.BCC); |
} |
public Email getNewGradesEmail(List<String[]> grades, LangEnum langEnum, String studentEmail, String studentName) |
{ |
List<String> arguments = new ArrayList<String>(); |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportStudentsService.java |
---|
72,26 → 72,53 |
} |
Aluno d = service.getSiGesWEBSoap().getAlunoInscrito(c, Globals.SIGES_INSTITUTION_CODE, year); |
Student t = DaoFactory.getStudentDaoImpl().loadBySigesCode(d.getCodigo().intValue()); |
User u = DaoFactory.getUserDaoImpl().loadByUsernameOrSigesCode(d.getCodigo().intValue()); |
Student s = null; |
boolean newUser = false; |
if (t == null) |
if(u != null && !(u instanceof Student)) |
{ |
t = DomainObjectFactory.createStudentImpl(); |
DaoFactory.getStudentDaoImpl().save(t); |
logger.warn("Student " + u.getUsername() + "already exist in system, will merge both users"); |
// Set<Record> records = u.getCreatorRecords(); |
DaoFactory.getUserDaoImpl().delete(u); |
logger.warn("Student " + u.getUsername() + "1"); |
i = 0; |
AbstractDao.getCurrentSession().getTransaction().commit(); |
AbstractDao.getCurrentSession().beginTransaction(); |
logger.warn("Student " + u.getUsername() + "2"); |
s = DomainObjectFactory.createStudentImpl(); |
DaoFactory.getStudentDaoImpl().save(s); |
// for(Record r:records) |
// { |
// r.setOwner(null); |
// DaoFactory.getRecordDaoImpl().reattach(r); |
// r.setOwner(s); |
// } |
newUser = true; |
} |
persist(d, t); |
else if(u != null) |
{ |
s = DaoFactory.getStudentDaoImpl().load(u.getId()); |
} |
if (s == null) |
{ |
s = DomainObjectFactory.createStudentImpl(); |
DaoFactory.getStudentDaoImpl().save(s); |
newUser = true; |
} |
persist(d, s); |
//Advising CommonsServicesManager before change password |
if (newUser) |
CommonServicesManager.getInstance().adviseNew(t); |
CommonServicesManager.getInstance().adviseNew(s); |
else |
{ |
String password = t.getPassword(); |
t.setPassword(null); |
CommonServicesManager.getInstance().adviseUpdate(t); |
t.setPassword(password); |
String password = s.getPassword(); |
s.setPassword(null); |
CommonServicesManager.getInstance().adviseUpdate(s); |
s.setPassword(password); |
} |
} |
logMessages.addMessage(new DefaultLogMessage("import.students.terminating", LogMessageTypeEnum.INFO)); |
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportCourseService.java |
---|
4,6 → 4,7 |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.utils.DatesUtils; |
import pt.estgp.estgweb.utils.ConfigProperties; |
import pt.estgp.estgweb.domain.Course; |
import pt.estgp.estgweb.domain.CourseUnit; |
import pt.estgp.estgweb.domain.DomainObjectFactory; |
86,7 → 87,9 |
// DaoFactory.getCourseDaoImpl().save(c); |
} |
c.setName(d.getNomeCurso()); |
c.setDegree(d.getGrauCurso()); |
String grauBaco = ConfigProperties.getProperty("siges.degree."+d.getGrauCurso()); |
if(c.getDegree() == null) |
c.setDegree(grauBaco); |
c.setCode("" + d.getCodigoCurso().intValue()); |
c.setImportYear(year); |
c.setInstitutionalCode("" + d.getCodigoInstituicao().intValue()); |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseDaoImpl.java |
---|
86,17 → 86,21 |
.list(); |
} |
public List<Course> findAllOrderByName(String importYear, String area) |
public List<Course> findAllOrderByName(String importYear, String area, String type) |
{ |
Criteria c = createCriteria(); |
if (importYear != null && importYear.length() > 0) |
c.add(eq("importYear", importYear)); |
if (area != null && area.length() > 0) |
c.add(eq("area", area)); |
if (type != null && type.length() > 0) |
c.add(eq("degree", type)); |
return c.addOrder(Order.asc("name")) |
.list(); |
} |
public List<String> loadImportYears() |
{ |
Query q = createQuery("select distinct c.importYear from c in class " + Course.class.getName() + " order by c.importYear desc"); |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/UserDaoImpl.java |
---|
210,4 → 210,9 |
{ |
return createCriteria().add(or(or(or(eq("email",email),eq("outEmail",email)),eq("gmail",email)),eq("msn",email))).list(); |
} |
public User loadByUsernameOrSigesCode(int sigesCode) |
{ |
return (User) createCriteria().add(or(eq("sigesCode",sigesCode),eq("username","a" + sigesCode))).uniqueResult(); |
} |
} |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/StudentDaoImpl.java |
---|
28,6 → 28,8 |
return (Student) createCriteria().add(eq("sigesCode",sigesCode)).uniqueResult(); |
} |
public Student loadBySigesCode(String sigesCode) |
{ |
return (Student) createCriteria().add(eq("sigesCode",sigesCode)).uniqueResult(); |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitAssignementDaoImpl.java |
---|
4,9 → 4,13 |
import org.hibernate.Query; |
import pt.estgp.estgweb.domain.CourseUnitAssignement; |
import pt.estgp.estgweb.domain.CourseUnitAssignementImpl; |
import pt.estgp.estgweb.Globals; |
import java.util.List; |
import java.util.Date; |
import jomm.dao.impl.AbstractDao; |
/** |
* @author Jorge Machado |
* @date 28/Fev/2008 |
30,13 → 34,26 |
public List<CourseUnitAssignementImpl> loadActiveAssignements(long userID) |
{ |
Date now = new Date(); |
Date dDaysBefore = new Date(now.getTime() - (Globals.COURSEUNIT_ASSIGNEMENT_NUMBER_DAYS_REMINDER_AFTER_EXPIRED * 24 * 60 * 60 * 1000 )); |
return createCriteria() |
.add(ge("deliverDate",dDaysBefore)) |
.createAlias("courseUnit","cu") |
.createAlias("cu.students","cus") |
.add(eq("status",true)) |
.add(eq("cus.id",userID)).list(); |
} |
public static void main(String [] args) |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
List<CourseUnitAssignementImpl> l = new CourseUnitAssignementDaoImpl().loadActiveAssignements(524); |
for(CourseUnitAssignement a:l) |
System.out.println(a.getTitle() + ":"+ a.getCourseUnit().getName()); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
public List<CourseUnitAssignementImpl> loadDeliveredAssignements(long userID) |
{ |
return createCriteria() |
/impl/src/web/admin/courses/course.jsp |
---|
57,6 → 57,9 |
<html:option value="M"><bean:message key="course.M"/></html:option> |
<html:option value="P"><bean:message key="course.P"/></html:option> |
<html:option value="E"><bean:message key="course.E"/></html:option> |
<html:option value="A"><bean:message key="course.A"/></html:option> |
<html:option value="C"><bean:message key="course.C"/></html:option> |
<html:option value="O"><bean:message key="course.O"/></html:option> |
</html:select> |
* SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Confirmar Mestrados e Pos graduacoes e informar equipa de desenvolvimento |
</td> |
/impl/src/web/css/style.css |
---|
85,12 → 85,39 |
font-size: 1.2em; |
margin: 0; |
} |
.seccao h1 { |
border-bottom:1px solid black; |
padding:3px; |
font-size: 1.3em; |
margin: 0; |
font-weight:bold; |
} |
h2 { |
margin: 0; |
.seccao h2 { |
background-color: #8ec73f; |
padding:2px; |
border-bottom:1px solid black; |
margin: 0; |
font-size: 1em; |
font-weight:normal; |
padding-left:10px; |
} |
.seccao h3 { |
padding:2px; |
border-bottom:1px solid black; |
font-size: 0.96em; |
padding-left:20px; |
} |
.seccao h4 { |
padding:2px; |
border-bottom:1px solid black; |
font-size: 0.9em; |
font-weight:normal; |
padding-left:35px; |
} |
.pFooter { |
background-color: #8EC73F; |
font-size: 0.8em; |
219,7 → 246,7 |
text-align:left; |
} |
#content a, .files a |
#content a, .files a, a |
/*, .content a:visited*/ |
{ |
color: #4d4d4d; |
1378,6 → 1405,25 |
} |
table.quadro |
{ |
width:650px; |
border: 1px solid black; |
padding: 10px; |
} |
.quadro td |
{ |
text-align:center; |
} |
table.quadro th |
{ |
padding-bottom:5px; |
} |
table.quadro th.side |
{ |
padding:0px; |
text-align:left; |
} |
/*.messages td*/ |
.dataTable |
{ |
/impl/src/web/layout/navigationTop.jsp |
---|
58,10 → 58,10 |
<ul class="menu"> |
<li><html:link action="/courses?type=L"><bean:message key="course.Ls"/></html:link></li> |
<li><html:link action="/courses?type=M"><bean:message key="course.Ms"/></html:link></li> |
<li><a href="http://www.ipportalegre.pt/html1/3Cursos/8Acções%20de%20Formação.aspx ">Acções de Formação de Curta Duração</a></li> |
<li><a href="<%=request.getContextPath()%>/proxy/layout4/estgp/public/portal/ensinoCET.html">CET</a></li> |
<li><a href="<%=request.getContextPath()%>/proxy/layout4/estgp/public/portal/ensinoFomacoesAvancadas.html">Formações Avançadas </a></li> |
<li><a href="<%=request.getContextPath()%>/proxy/layout4/estgp/public/portal/ensinoPosGraduacoes.html">Pós Graduações </a></li> |
<li><html:link action="/courses?type=C"><bean:message key="course.C"/></html:link></li> |
<li><html:link action="/courses?type=E"><bean:message key="course.E"/></html:link></li> |
<li><html:link action="/courses?type=A"><bean:message key="course.A"/></html:link></li> |
<li><html:link action="/courses?type=P"><bean:message key="course.P"/></html:link></li> |
</ul> |
</div> |
</li> |
/impl/src/web/public/courses/index.jsp |
---|
15,81 → 15,17 |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<% |
String type = request.getParameter("type"); |
request.setAttribute("type",type); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{}; |
Object[] args = new Object[]{type}; |
List<CourseView> courses = (List<CourseView>) sm.execute(RequestUtils.getRequester(request, response), "LoadCoursesImportYear", args, names); |
request.setAttribute("Courses", courses); |
List<CourseView> courses = (List<CourseView>) sm.execute(RequestUtils.getRequester(request, response), "LoadCoursesImportYearByType", args, names); |
request.setAttribute("courses", courses); |
List<CourseView> bs = new ArrayList<CourseView>(); |
List<CourseView> ls = new ArrayList<CourseView>(); |
List<CourseView> ms = new ArrayList<CourseView>(); |
List<CourseView> ps = new ArrayList<CourseView>(); |
List<CourseView> es = new ArrayList<CourseView>(); |
for (CourseView cv : courses) |
{ |
if (cv.getDegree().equals("B")) |
bs.add(cv); |
else if (cv.getDegree().equals("L")) |
ls.add(cv); |
else if (cv.getDegree().equals("M")) |
ms.add(cv); |
else if (cv.getDegree().equals("P")) |
ps.add(cv); |
else if (cv.getDegree().equals("E")) |
es.add(cv); |
} |
String type = request.getParameter("type"); |
request.setAttribute("type",type); |
if(type != null && type.equals("B")) |
request.setAttribute("bs",bs); |
if(type != null && type.equals("L")) |
request.setAttribute("ls",ls); |
if(type != null && type.equals("M")) |
request.setAttribute("ms",ms); |
if(type != null && type.equals("P")) |
request.setAttribute("ps",ps); |
if(type != null && type.equals("E")) |
request.setAttribute("es",es); |
%> |
<div class="seccao" > |
<logic:notEmpty name="bs"> |
<a name="B"></a> |
<h2><bean:message key="course.Bs"/></h2> |
<% |
request.setAttribute("courses",bs); |
%> |
<jsp:include page="courseList.jsp"/> |
</logic:notEmpty> |
<logic:notEmpty name="ls"> |
<a name="L"></a> |
<h2><bean:message key="course.Ls"/></h2> |
<% |
request.setAttribute("courses",ls); |
%> |
<jsp:include page="courseList.jsp"/> |
</logic:notEmpty> |
<logic:notEmpty name="ms"> |
<a name="M"></a> |
<h2><bean:message key="course.Ms"/></h2> |
<% |
request.setAttribute("courses",ms); |
%> |
<jsp:include page="courseList.jsp"/> |
</logic:notEmpty> |
<logic:notEmpty name="ps"> |
<a name="P"></a> |
<h2><bean:message key="course.Ps"/></h2> |
<% |
request.setAttribute("courses",ps); |
%> |
<jsp:include page="courseList.jsp"/> |
</logic:notEmpty> |
<h2><bean:message key="course.${type}"/></h2> |
<jsp:include page="courseList.jsp"/> |
</div> |
/impl/src/web/public/courses/courses.jsp |
---|
16,73 → 16,12 |
request.setAttribute("type",type); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{}; |
Object[] args = new Object[]{}; |
List<CourseView> courses = (List<CourseView>) sm.execute(RequestUtils.getRequester(request, response), "LoadCoursesImportYear", args, names); |
request.setAttribute("Courses", courses); |
List<CourseView> bs = new ArrayList<CourseView>(); |
List<CourseView> ls = new ArrayList<CourseView>(); |
List<CourseView> ms = new ArrayList<CourseView>(); |
List<CourseView> ps = new ArrayList<CourseView>(); |
List<CourseView> es = new ArrayList<CourseView>(); |
Object[] args = new Object[]{type}; |
List<CourseView> courses = (List<CourseView>) sm.execute(RequestUtils.getRequester(request, response), "LoadCoursesImportYearByType", args, names); |
request.setAttribute("courses", courses); |
request.setAttribute("typeKey","course." + type); |
for (CourseView cv : courses) |
{ |
if (cv.getDegree().equals("B")) |
bs.add(cv); |
else if (cv.getDegree().equals("L")) |
ls.add(cv); |
else if (cv.getDegree().equals("M")) |
ms.add(cv); |
else if (cv.getDegree().equals("P")) |
ps.add(cv); |
else if (cv.getDegree().equals("E")) |
es.add(cv); |
} |
request.setAttribute("bs", bs); |
request.setAttribute("ls", ls); |
request.setAttribute("ms", ms); |
request.setAttribute("ps", ps); |
request.setAttribute("es", es); |
%> |
<jsp:include page="courseMenuList.jsp"/> |
<logic:equal value="B" name="type"> |
<logic:notEmpty name="bs"> |
<% |
request.setAttribute("typeKey","course.Bs"); |
request.setAttribute("courses",bs); |
%> |
<jsp:include page="courseMenuList.jsp"/> |
</logic:notEmpty> |
</logic:equal> |
<logic:equal value="L" name="type"> |
<logic:notEmpty name="ls"> |
<% |
request.setAttribute("typeKey","course.Ls"); |
request.setAttribute("courses",ls); |
%> |
<jsp:include page="courseMenuList.jsp"/> |
</logic:notEmpty> |
</logic:equal> |
<logic:equal value="M" name="type"> |
<logic:notEmpty name="ms"> |
<% |
request.setAttribute("typeKey","course.Ms"); |
request.setAttribute("courses",ms); |
%> |
<jsp:include page="courseMenuList.jsp"/> |
</logic:notEmpty> |
</logic:equal> |
<logic:equal value="P" name="type"> |
<logic:notEmpty name="ps"> |
<% |
request.setAttribute("typeKey","course.Ps"); |
request.setAttribute("courses",ps); |
%> |
<jsp:include page="courseMenuList.jsp"/> |
</logic:notEmpty> |
</logic:equal> |
/impl/src/web/public/portals/alunos/informacaoAcademicaLinks.jsp |
---|
7,10 → 7,10 |
topNav.setTitle("portal.informacao.academica"); |
String startLink = Globals.getStartLinkPortalMenu("informacaoAcademicaAlunosPortalMenu"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaCalendarioEscolar.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.calendario.escolar"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaLicenciaturas.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.licenciaturas"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaMestrados.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.mestrados"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaPosGraduacoes.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.pos.graduacoes"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaCets.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.cets"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=L", "portal.informacao.academica.licenciaturas"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=M", "portal.informacao.academica.mestrados"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=P", "portal.informacao.academica.pos.graduacoes"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=E", "portal.informacao.academica.cets"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaMaiores23.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.maiores.23"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaOutrasFormacoes.html"+Globals.PORTAL_ROLE_VIEW_STUDENT, "portal.informacao.academica.outras.formacoes"); |
%> |
/impl/src/web/public/portals/Docentes/informacaoAcademicaLinks.jsp |
---|
7,8 → 7,8 |
topNav.setTitle("portal.informacao.academica"); |
String startLink = Globals.getStartLinkPortalMenu("informacaoAcademicaDocentesPortalMenu"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaCalendarioEscolar.html"+Globals.PORTAL_ROLE_VIEW_TEACHER, "portal.informacao.academica.calendario.escolar"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaLicenciaturas.html"+Globals.PORTAL_ROLE_VIEW_TEACHER, "portal.informacao.academica.licenciaturas"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaMestrados.html"+Globals.PORTAL_ROLE_VIEW_TEACHER, "portal.informacao.academica.mestrados"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaPosGraduacoes.html"+Globals.PORTAL_ROLE_VIEW_TEACHER, "portal.informacao.academica.pos.graduacoes"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaCets.html"+Globals.PORTAL_ROLE_VIEW_TEACHER, "portal.informacao.academica.cets"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=L", "portal.informacao.academica.licenciaturas"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=M", "portal.informacao.academica.mestrados"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=P", "portal.informacao.academica.pos.graduacoes"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=E", "portal.informacao.academica.cets"); |
%> |
/impl/src/web/public/portals/futurosAlunos/informacaoAcademicaLinks.jsp |
---|
7,10 → 7,10 |
topNav.setTitle("portal.informacao.academica"); |
String startLink = Globals.getStartLinkPortalMenu("informacaoAcademicaFuturosAlunosPortalMenu"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaCalendarioEscolar.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.calendario.escolar"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaLicenciaturas.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.licenciaturas"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaMestrados.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.mestrados"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaPosGraduacoes.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.pos.graduacoes"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaCets.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.cets"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=L", "portal.informacao.academica.licenciaturas"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=M", "portal.informacao.academica.mestrados"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=P", "portal.informacao.academica.pos.graduacoes"); |
topNav.addNavPlace("/coursesFromStudentPortal.do" + Globals.PORTAL_ROLE_VIEW_STUDENT + "&type=E", "portal.informacao.academica.cets"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaMaiores23.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.maiores.23"); |
topNav.addNavPlace(startLink + "/informacaoAcademicaOutrasFormacoes.html"+Globals.PORTAL_ROLE_VIEW_FUTURE_STUDENT, "portal.informacao.academica.outras.formacoes"); |
%> |
/impl/src/web/user/ftpclient/ftpclient.jsp |
---|
151,55 → 151,55 |
|
<% |
if (i.getName().endsWith("doc") || i.getName().endsWith("rtf")) |
if (i.getName().toLowerCase().endsWith("doc") || i.getName().endsWith("rtf")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/doc.gif"> |
<% |
} |
else if (i.getName().endsWith("pdf")) |
else if (i.getName().toLowerCase().endsWith("pdf")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/pdf.gif"> |
<% |
} |
else if (i.getName().endsWith("ppt")) |
else if (i.getName().toLowerCase().endsWith("ppt")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/ppt.gif"> |
<% |
} |
else if (i.getName().endsWith("zip") || i.getName().endsWith(".gz") || i.getName().endsWith("tgz")) |
else if (i.getName().toLowerCase().endsWith("zip") || i.getName().endsWith(".gz") || i.getName().endsWith("tgz")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/zip.gif"> |
<% |
} |
else if (i.getName().endsWith("rar")) |
else if (i.getName().toLowerCase().endsWith("rar")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/rar.gif"> |
<% |
} |
else if (i.getName().endsWith("html") || i.getName().endsWith("htm")) |
else if (i.getName().toLowerCase().endsWith("html") || i.getName().endsWith("htm")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/html.gif"> |
<% |
} |
else if (i.getName().endsWith("xls") || i.getName().endsWith("xlsx")) |
else if (i.getName().toLowerCase().endsWith("xls") || i.getName().endsWith("xlsx")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/xls.gif"> |
<% |
} |
else if (i.getName().endsWith("txt")) |
else if (i.getName().toLowerCase().endsWith("txt")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/txt.gif"> |
<% |
} |
else if (i.getName().endsWith("xml")) |
else if (i.getName().toLowerCase().endsWith("xml")) |
{ |
%> |
<img alt="<%=i.getCompleteUrl()%>" src="<%=request.getContextPath()%>/imgs/mime/xml.gif"> |
/common/commons/commons-fileupload-1.2.1.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+ application/octet-stream |