/impl/conf/language/MessageResourcesIntranet.properties |
---|
51,12 → 51,14 |
intranet.home.curricular=Consulta de Material Curricular |
intranet.quotas.error=<p class="statusERROR">Serviço de quotas de impressão não disponível</p> |
intranet.quotas.impressoras=Impressoras |
intranet.quotas.disponiveis=Quotas Disponíveis |
intranet.quotas.donaldPreto=Donald (Preto) |
intranet.quotas.billCor=Bill (Cor) |
/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/language/MessageResourcesProfile.properties |
---|
77,6 → 77,7 |
profile.record.deleted.sucess=Registo apagado com sucesso |
profile.email.change=*Para alterar o seu email dirija-se aos serviços centrais |
profile.record.confirm.delete=Tem a certeza que deseja apagar esta entrada do curriculum? |
profile.confirm.delete=Tem a certeza que deseja apagar este utilizador, (Se for aluno os seus trabalhos de unidades irão manter-se no sistema)? |
#Dublin Core Fields |
profile.record.file=Ficheiro Electrónico |
profile.record.file.access=Acesso ao Ficheiro |
/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/WEB-INF/web.xml |
---|
208,6 → 208,10 |
<servlet-name>repositoryStream</servlet-name> |
<servlet-class>pt.estgp.estgweb.web.RepositoryStream</servlet-class> |
</servlet> |
<servlet> |
<servlet-name>ServicosImpressao</servlet-name> |
<servlet-class>pt.estgp.estgweb.web.ajaxapis.ServicosImpressao</servlet-class> |
</servlet> |
272,6 → 276,10 |
<servlet-name>BlogServlet</servlet-name> |
<url-pattern>/blogspot/*</url-pattern> |
</servlet-mapping> |
<servlet-mapping> |
<servlet-name>ServicosImpressao</servlet-name> |
<url-pattern>/user/ajaxapis/ServicosImpressao</url-pattern> |
</servlet-mapping> |
<!--START FILES--> |
<welcome-file-list> |
/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) |
60,7 → 63,7 |
module.intranet=true |
module.profile=true |
module.sms=false |
module.quotasImpressao=true |
################################################## |
# SMS |
# |
246,6 → 249,7 |
url.stat.ignore.prefix.6=/js/ |
url.stat.ignore.prefix.7=/auth/ |
url.stat.ignore.prefix.8=/imageStream |
url.stat.ignore.prefix.9=/ajaxapis |
275,6 → 279,7 |
filter.ignore.prefix.4=/css |
filter.ignore.prefix.5=/imageStream |
filter.ignore.prefix.6=/imgs |
filter.ignore.prefix.7=/ajaxapis |
#See java.text.SimpleDateFormat |
299,6 → 304,9 |
######################################################################### |
# Imports SIGoES |
# |
siges.degree.1=L |
national.institution.code=3122 |
siges.institution.code=1 |
ws.siges.wsdl=@ws.siges.wsdl@ |
398,4 → 406,23 |
######################################## |
# trabalhos |
# |
######################################### |
#number of days to reminder be present in home tasks after expired work. |
work.reminder.until.days.after.expired=10 |
home.courseunit.last.anouncements.expired.in.days=60 |
home.courseunit.last.anouncements.max=3 |
######################################### |
# Servicos de Impressao API |
# |
######################################## |
impressao.servicos.api=http://www.global.estgp.pt/API/XMLImpressao.asp |
impressao.servicos.auth=true |
impressao.servicos.auth.user.property=ionline.user |
impressao.servicos.auth.pass.property=ionline.pass |
impressao.servicos.auth.user= |
impressao.servicos.auth.pass= |
/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 |
---|
49,8 → 49,34 |
} |
} |
public static final String INTRANET_IMPRESSAO_SERVICO_API = ConfigProperties.getProperty("impressao.servicos.api"); |
public static final boolean INTRANET_IMPRESSAO_SERVICO_AUTH = ConfigProperties.getBooleanProperty("impressao.servicos.auth"); |
public static final String INTRANET_IMPRESSAO_SERVICO_AUTH_USER_PROPERTY = ConfigProperties.getProperty("impressao.servicos.auth.user.property"); |
public static final String INTRANET_IMPRESSAO_SERVICO_AUTH_PASS_PROPERTY = ConfigProperties.getProperty("impressao.servicos.auth.pass.property"); |
public static String INTRANET_IMPRESSAO_SERVICO_AUTH_USER = ConfigProperties.getProperty("impressao.servicos.auth.user"); |
public static String INTRANET_IMPRESSAO_SERVICO_AUTH_PASS = ConfigProperties.getProperty("impressao.servicos.auth.pass"); |
static |
{ |
if(INTRANET_IMPRESSAO_SERVICO_AUTH) |
{ |
if(INTRANET_IMPRESSAO_SERVICO_AUTH_USER_PROPERTY != null && INTRANET_IMPRESSAO_SERVICO_AUTH_USER_PROPERTY.length() > 0) |
{ |
INTRANET_IMPRESSAO_SERVICO_AUTH_USER = ConfigProperties.getProperty(INTRANET_IMPRESSAO_SERVICO_AUTH_USER_PROPERTY); |
INTRANET_IMPRESSAO_SERVICO_AUTH_PASS = ConfigProperties.getProperty(INTRANET_IMPRESSAO_SERVICO_AUTH_PASS_PROPERTY); |
} |
else |
{ |
INTRANET_IMPRESSAO_SERVICO_AUTH_USER = ConfigProperties.getProperty("impressao.servicos.auth.user"); |
INTRANET_IMPRESSAO_SERVICO_AUTH_PASS = ConfigProperties.getProperty("impressao.servicos.auth.pass"); |
} |
} |
} |
public static final String INTRANET_CONTENTS = ConfigProperties.getProperty("intranet.contents.dir"); |
public static final String INTRANET_GRADES = ConfigProperties.getProperty("intranet.grades.dir"); |
public static final String INTRANET_PRESENCES = ConfigProperties.getProperty("intranet.presences.dir"); |
82,7 → 108,7 |
public static final int NUMBER_ANNOUNCEMENT_TYPE_BOTTOM_FLASH_NEWS_INDEX = 2; |
public static final int ANNOUNCEMENT_TYPE_TOP_FLASH_NEWS_TIMEOUT = ConfigProperties.getIntProperty("announcements.top.flash.news.timeout.miliseconds"); |
public static final List<String> ANNOUNCEMENT_NOT_STANDARD = ConfigProperties.getListValues("announcements.not.standard"); |
public static final int HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS = 3; |
public static List<String> USER_ROLES = ConfigProperties.getListValues("user.role"); |
public static final String STUDENT_ROLE = ConfigProperties.getProperty("user.student"); |
166,6 → 192,9 |
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.until.days.after.expired"); |
public static final int HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS = ConfigProperties.getIntProperty("home.courseunit.last.anouncements.max"); |
public static final int HOME_COURSE_UNIT_ANNOUNCEMENTS_EXPIRED_DAYS = ConfigProperties.getIntProperty("home.courseunit.last.anouncements.expired.in.days"); |
public static final String COURSEUNIT_ASSIGNEMENT_TYPE_NO_FILE = "nofile"; |
public static final String PROFILE_SCHOLAR_DEGREE_SUPERIOR = "superior"; |
218,6 → 247,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/LoadTeachedUnitsAnnouncementsService.java |
---|
6,6 → 6,7 |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.courseunits.impl.DefaultCourseUnitAnnouncements; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.utils.DatesUtils; |
import java.util.List; |
import java.util.ArrayList; |
25,17 → 26,28 |
return courseUnitAnnouncementsLst; |
Teacher t = DaoFactory.getTeacherDaoImpl().load(userSession.getUser().getId()); |
Set<CourseUnit> units = t.getTeachedUnits(); |
DatesUtils.SemestreModerate semestreModerate = DatesUtils.getSemestreModerate(); |
String semestre = null; |
if(semestreModerate == DatesUtils.SemestreModerate.S1) |
semestre = "S1"; |
else if(semestreModerate == DatesUtils.SemestreModerate.S2) |
semestre = "S2"; |
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadTeachedImportYearSemestreUnits(t.getId(), DatesUtils.getImportYear(),semestre); |
if(units == null) |
return courseUnitAnnouncementsLst; |
for(CourseUnit c: units) |
{ |
if(c.getAnnouncements() != null && c.getAnnouncements().size()>0) |
List<Announcement> announcements = DaoFactory.getCourseUnitAnnouncementDaoImpl().loadLastAnnouncements(c.getId(),Globals.HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS,Globals.HOME_COURSE_UNIT_ANNOUNCEMENTS_EXPIRED_DAYS); |
if(announcements != null && announcements.size()>0) |
{ |
DefaultCourseUnitAnnouncements courseUnitAnnouncements = new DefaultCourseUnitAnnouncements(); |
courseUnitAnnouncements.setCourseUnit(c); |
List<AnnouncementView> announcementViews = new ArrayList<AnnouncementView>(); |
for(Announcement a :c.getAnnouncements()) |
for(Announcement a :announcements) |
{ |
if(announcementViews.size() > Globals.HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS) |
break; |
/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); |
156,16 → 183,30 |
String identifier = repositoryService.storeRepositoryFile(file, contentType, extension, size, name, "courseunit.assignement " + assignement.getCourseUnit().getName() + " of " + userSession.getUser().getUsername(), ResourceAccessControlEnum.courseunitDeliverableDomain,userSession); |
deliverable.setDeliverableRepositoryStream(identifier); |
deliverable.setCourseUnitAssignement(assignement); |
deliverable.setStudent((Student) userSession.getUser()); |
setStudentWorkDetails(deliverable,userSession); |
DaoFactory.getCourseUnitDeliverableDaoImpl().save(deliverable); |
} |
else |
{ |
setStudentWorkDetails(deliverable,userSession); |
repositoryService.updateRepositoryFile(deliverable.getDeliverableRepositoryStream(), file, contentType, extension, size, name, "courseunit.assignement " + assignement.getCourseUnit().getName() + " of " + userSession.getUser().getUsername(), ResourceAccessControlEnum.courseunitDeliverableDomain); |
} |
deliverable.setDeliverDate(new Date()); |
return loadCourseUnitWorks(courseUnitId,userSession); |
} |
private void setStudentWorkDetails(CourseUnitDeliverable deliverable, UserSession userSession) |
{ |
deliverable.setStudent((Student) userSession.getUser()); |
deliverable.setStudentId(userSession.getUser().getId()); |
deliverable.setStudentUsername(userSession.getUsername()); |
deliverable.setStudentName(userSession.getUser().getName()); |
if(userSession.getUser() instanceof SigesUser) |
deliverable.setStudentCode("" + ((SigesUser)userSession.getUser()).getSigesCode()); |
else |
logger.error("BACO APPLICATION ERROR Student should be of type SigesUser"); |
} |
//todo alterar o dominio de filtragem |
/impl/src/java/pt/estgp/estgweb/services/courseunits/LoadSubscribedUnitsAnnouncementsService.java |
---|
9,6 → 9,7 |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.services.courseunits.impl.DefaultCourseUnitAnnouncements; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.utils.DatesUtils; |
import java.util.Set; |
import java.util.List; |
28,17 → 29,26 |
return courseUnitAnnouncementsLst; |
Student t = DaoFactory.getStudentDaoImpl().load(userSession.getUser().getId()); |
Set<CourseUnit> units = t.getSubscribedUnits(); |
DatesUtils.SemestreModerate semestreModerate = DatesUtils.getSemestreModerate(); |
String semestre = null; |
if(semestreModerate == DatesUtils.SemestreModerate.S1) |
semestre = "S1"; |
else if(semestreModerate == DatesUtils.SemestreModerate.S2) |
semestre = "S2"; |
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadSubscribedImportYearSemestreUnits(t.getId(), DatesUtils.getImportYear(),semestre); |
if(units == null) |
return courseUnitAnnouncementsLst; |
for(CourseUnit c: units) |
{ |
if(c.getAnnouncements() != null && c.getAnnouncements().size() > 0) |
List<Announcement> announcements = DaoFactory.getCourseUnitAnnouncementDaoImpl().loadLastAnnouncements(c.getId(),Globals.HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS,Globals.HOME_COURSE_UNIT_ANNOUNCEMENTS_EXPIRED_DAYS); |
if(announcements != null && announcements.size() > 0) |
{ |
DefaultCourseUnitAnnouncements courseUnitAnnouncements = new DefaultCourseUnitAnnouncements(); |
courseUnitAnnouncements.setCourseUnit(c); |
List<AnnouncementView> announcementViews = new ArrayList<AnnouncementView>(); |
for(Announcement a :c.getAnnouncements()) |
List<AnnouncementView> announcementViews = new ArrayList<AnnouncementView>(); |
for(Announcement a :announcements) |
{ |
if(announcementViews.size() > Globals.HOME_MAX_COURSE_UNIT_ANNOUNCEMENTS) |
break; |
/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/services/ftpservices/FtpService.java |
---|
72,7 → 72,27 |
{ |
for(FileItem item: ftpRequestForm.getFilesToImport()) |
{ |
if(!client.storeFile(item.getName(),item.getInputStream())) |
String name = item.getName(); |
if(name != null) |
{ |
if(name.length() > 2 && name.charAt(1)==':') |
{ |
String[] names = name.split("\\\\"); |
name = names[names.length - 1]; |
} |
else |
{ |
name = new File(item.getName()).getName(); |
} |
} |
if(!client.storeFile(name,item.getInputStream())) |
result = "errors.ftp.no.permission"; |
} |
} |
/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/CourseUnitAnnouncementDaoImpl.java |
---|
47,4 → 47,12 |
.addOrder(Order.desc("saveDate")).list(); |
} |
public List<Announcement> loadLastAnnouncements(long courseUnitId, int max, int maxExpiredDays) |
{ |
Date daysBefore = new Date(new Date().getTime() - (maxExpiredDays * 24 * 60 * 60 * 1000)); |
return createCriteria() |
.add(Restrictions.eq("courseUnit.id", courseUnitId)) |
.add(Restrictions.ge("saveDate",daysBefore)) |
.addOrder(Order.desc("saveDate")).list(); |
} |
} |
/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/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitDeliverableDaoImpl.java |
---|
2,6 → 2,7 |
import org.hibernate.Query; |
import static org.hibernate.criterion.Restrictions.*; |
import org.hibernate.criterion.Order; |
import pt.estgp.estgweb.domain.CourseUnitDeliverable; |
/** |
41,7 → 42,10 |
(CourseUnitDeliverable) |
createCriteria() |
.add(eq("courseUnitAssignement.id",workId)) |
.add(eq("student.id",studentId)).uniqueResult(); |
.add(eq("student.id",studentId)) |
.addOrder(Order.desc("deliverDate")) |
.setMaxResults(1) |
.uniqueResult(); |
} |
public CourseUnitDeliverable loadDeliverableByRepositoryId(String repositoryStreamId) |
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitDaoImpl.java |
---|
9,6 → 9,7 |
import pt.estgp.estgweb.utils.DatesUtils; |
import pt.estgp.estgweb.Globals; |
import static org.hibernate.criterion.Restrictions.*; |
import static org.hibernate.criterion.Restrictions.eq; |
import org.hibernate.criterion.Criterion; |
import org.hibernate.criterion.Order; |
import org.hibernate.Criteria; |
70,6 → 71,16 |
.createAlias("students", "st") |
.add(eq("st.id", studentId)).addOrder(Order.asc("name")).list(); |
} |
public List<CourseUnit> loadSubscribedImportYearSemestreUnits(long studentId, String importYear, String semestre) |
{ |
Criteria c =createCriteria() |
.add(eq("importYear", importYear)) |
.createAlias("students", "st") |
.add(eq("st.id", studentId)); |
if(semestre != null) |
c.add(eq("semestre", semestre)); |
return c.addOrder(Order.asc("name")).list(); |
} |
public List<CourseUnit> loadSubscribedOtherImportYearUnits(long studentId, String importYear) |
{ |
85,6 → 96,20 |
.add(eq("st.id", teacherId)).addOrder(Order.asc("importYear")).addOrder(Order.asc("name")).list(); |
} |
public List<CourseUnit> loadTeachedImportYearSemestreUnits(long teacherId, String importYear, String semestre) |
{ |
Criteria c =createCriteria() |
.add(eq("importYear", importYear)) |
.createAlias("teachers", "st") |
.add(eq("st.id", teacherId)) |
.add(eq("st.id", teacherId)); |
if(semestre != null) |
c.add(eq("semestre", semestre)); |
return c.addOrder(Order.asc("name")).list(); |
} |
public CourseUnit loadBySigesCodeUnique(String sigesCode) |
{ |
return (CourseUnit) createCriteria().add(eq("code", sigesCode)).uniqueResult(); |
/impl/src/java/pt/estgp/estgweb/domain/views/UserView.java |
---|
56,6 → 56,9 |
private String scholarDegree; |
private String academicDegree; |
//This field should be set true when a user View is representing a deleted user |
private boolean deleted = false; |
private List<RecordView> creatorRecords; |
private List<RecordView> contributorRecords; |
69,6 → 72,11 |
public UserView(User user) |
{ |
super(user); |
if(user == null) |
{ |
this.deleted = true; |
return; |
} |
this.user = user; |
this.id = user.getId(); |
this.name=user.getName(); |
339,7 → 347,12 |
} |
public String getName() { |
return name; |
if(deleted) |
{ |
return "(Apagado do Sistema) " + name; |
} |
else |
return name; |
} |
public void setName(String name) { |
624,6 → 637,16 |
this.ext = ext; |
} |
public boolean isDeleted() |
{ |
return deleted; |
} |
public void setDeleted(boolean deleted) |
{ |
this.deleted = deleted; |
} |
// public List<Course> getCourses() |
// { |
// if(courses == null) |
/impl/src/java/pt/estgp/estgweb/domain/views/DomainObjectView.java |
---|
33,8 → 33,8 |
public DomainObjectView(DomainObject obj) |
{ |
this.saveDate = obj.getSaveDate(); |
if(obj != null) |
this.saveDate = obj.getSaveDate(); |
} |
public String getFormatedSaveDate() |
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitDeliverableView.java |
---|
55,8 → 55,17 |
this.fileStreamId = courseUnitDeliverable.getDeliverableRepositoryStream(); |
this.deliverDate = courseUnitDeliverable.getDeliverDate(); |
this.deliverDateStr = DatesUtils.getStringFromDate(deliverDate); |
if(courseUnitDeliverable.getStudent() != null) |
this.student = new UserView(courseUnitDeliverable.getStudent()); |
//if is null will create a userview even if deleted |
this.student = new UserView(courseUnitDeliverable.getStudent()); |
if(this.student.isDeleted() && courseUnitDeliverable.getStudentId() > 0) |
{ |
this.student.setDeleted(true); |
this.student.setId(courseUnitDeliverable.getStudentId()); |
this.student.setUsername(courseUnitDeliverable.getStudentUsername()); |
this.student.setName(courseUnitDeliverable.getStudentName()); |
if(courseUnitDeliverable.getStudentCode() != null) |
this.student.setCode(Integer.parseInt(courseUnitDeliverable.getStudentCode())); |
} |
this.courseUnitAssignementView = courseUnitAssignementView; |
} |
/impl/src/java/pt/estgp/estgweb/web/ajaxapis/ServicosImpressao.java |
---|
New file |
0,0 → 1,120 |
package pt.estgp.estgweb.web.ajaxapis; |
import jomm.utils.StreamsUtils; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.web.UserSessionProxy; |
import javax.servlet.ServletException; |
import javax.servlet.http.HttpServlet; |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import java.io.*; |
import java.net.MalformedURLException; |
import org.apache.log4j.Logger; |
/** |
* @author Jorge |
* @date 24/Mar/2009 |
* @time 3:25:40 |
*/ |
public class ServicosImpressao extends HttpServlet |
{ |
private static final Logger logger = Logger.getLogger(ServicosImpressao.class); |
protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException |
{ |
doPost(httpServletRequest, httpServletResponse); |
} |
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException |
{ |
StringBuffer sbResponse = new StringBuffer(); |
DataOutputStream out; |
try |
{ |
sbResponse = new StringBuffer(); |
java.net.URL programUrl = new java.net.URL(Globals.INTRANET_IMPRESSAO_SERVICO_API + "?username=" + UserSessionProxy.loadUserSession(request,response).getUsername()); |
java.net.HttpURLConnection connection = (java.net.HttpURLConnection)programUrl.openConnection(); |
if(Globals.INTRANET_IMPRESSAO_SERVICO_AUTH) |
{ |
String user = Globals.INTRANET_IMPRESSAO_SERVICO_AUTH_USER; |
String pass = Globals.INTRANET_IMPRESSAO_SERVICO_AUTH_PASS; |
String encoding = new sun.misc.BASE64Encoder().encode((user + ":" + pass).getBytes()); |
connection.setRequestProperty ("Authorization", "Basic " + encoding); |
} |
(connection).setRequestMethod("POST"); |
connection.setDoOutput(true); |
connection.setDoInput(true); //Only if you expect to read a response... |
connection.setUseCaches(false); //Highly recommended... |
connection.setAllowUserInteraction(true); |
connection.setFollowRedirects(true); |
connection.setInstanceFollowRedirects(true); |
connection.setRequestProperty ("Content-Type", |
"application/x-www-form-urlencoded"); |
// System.out.println(request.getParameter("request")); |
// System.out.println(request.getParameter("showmap")); |
// out = new DataOutputStream(connection.getOutputStream()); |
// String content = "request=" + URLEncoder.encode (request.getParameter("request")) |
// + "&showmap=" + URLEncoder.encode (request.getParameter("showmap")); |
System.out.println("\n" + "sending form to HTTP server ..."); |
// out.writeBytes (content); |
// out.flush (); |
// out.close (); |
// PrintWriter output = new PrintWriter(new OutputStreamWriter(connection.getOutputStream())); |
// output.print("request="+ URIUtil.encodeQuery(request.getParameter("request"))); |
// output.print("&showmap=" + URIUtil.encodeQuery(request.getParameter("showmap"))); |
// //output.flush(); |
// output.close(); |
BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); |
String line; |
while ((line = rd.readLine()) != null) |
{ |
sbResponse.append(line); |
} |
rd.close(); |
} catch (MalformedURLException e) |
{ |
sbResponse.setLength(0); |
sbResponse.append(e.getMessage()); |
e.printStackTrace(); |
response.sendError(500); |
} catch (IOException e) |
{ |
e.printStackTrace(); |
sbResponse.setLength(0); |
sbResponse.append(e.getMessage()); |
response.sendError(500); |
} |
catch (Throwable throwable) |
{ |
logger.error(throwable,throwable); |
response.sendError(500); |
} |
response.setContentType("text/xml"); |
PrintWriter pw = new PrintWriter(response.getOutputStream()); |
pw.write(sbResponse.toString()); |
pw.close(); |
} |
} |
/impl/src/updates/db/update3.sql |
---|
New file |
0,0 → 1,2 |
ALTER TABLE `courseunitdeliverable` ADD COLUMN `studentId` BIGINT(20) NOT NULL default '0' AFTER `obs` , ADD COLUMN `studentUsername` VARCHAR(255) AFTER `studentId`, ADD COLUMN `studentCode` VARCHAR(255) AFTER `studentUsername`, ADD COLUMN `studentName` VARCHAR(255) AFTER `studentCode`, ADD INDEX `studentUsernameIndex`(`studentUsername`), ADD INDEX `studentNameIndex`(`studentName`), ADD INDEX `studentCodeIndex`(`studentCode`); |
/impl/src/hbm/pt/estgp/estgweb/domain/GenericUser.hbm.xml |
---|
94,6 → 94,10 |
<key column="student"/> |
<one-to-many class="pt.estgp.estgweb.domain.CourseUnitGrade"/> |
</set> |
<set name="deliverables" lazy="true" order-by="deliverDate asc"> |
<key column="student"/> |
<one-to-many class="pt.estgp.estgweb.domain.CourseUnitDeliverable"/> |
</set> |
<subclass name="pt.estgp.estgweb.domain.StudentImpl" discriminator-value="StudentImpl"/> |
</subclass> |
<subclass name="pt.estgp.estgweb.domain.Teacher"> |
/impl/src/hbm/pt/estgp/estgweb/domain/CourseUnit.hbm.xml |
---|
113,6 → 113,10 |
<property name="deliverDate" type="timestamp"/> |
<property name="grade" type="string"/> |
<property name="obs" type="text"/> |
<property name="studentId" type="long"/> |
<property name="studentUsername" type="string"/> |
<property name="studentCode" type="string"/> |
<property name="studentName" type="string"/> |
<property name="deliverableRepositoryStream" type="string" index="deliverableRepositoryStreamIndex"/> |
<many-to-one name="courseUnitAssignement" class="pt.estgp.estgweb.domain.CourseUnitAssignement" lazy="false" outer-join="true"/> |
<many-to-one name="student" class="pt.estgp.estgweb.domain.Student" lazy="false" outer-join="true"/> |
/impl/src/web/admin/profile/profilePersonalData.jsp |
---|
161,7 → 161,7 |
</td> |
</tr> |
</baco:hasNotRole> |
<baco:hasRole role="teacher"> |
<baco:isAdmin> |
<tr> |
<th> |
<bean:message key="profile.academic.degree"/> |
175,7 → 175,7 |
</html:select> |
</td> |
</tr> |
</baco:hasRole> |
</baco:isAdmin> |
<tr> |
<th> |
<bean:message key="bi"/> |
/impl/src/web/admin/profile/findUser.jsp |
---|
51,7 → 51,7 |
<td>${userView.name}</td> |
<td>${userView.email}</td> |
<td><html:link action="/user/startProfileFromSearchUsers?id=${userView.id}"><bean:message key="edit"/></html:link></td> |
<td><html:link action="/user/startDeleteProfileFromSearchUsers?id=${userView.id}"><bean:message key="delete"/></html:link></td> |
<td><a href="<%=request.getContextPath()%>/user/startDeleteProfileFromSearchUsers.do?id=${userView.id}" onclick="return confirm('<bean:message key="profile.confirm.delete"/>')"><bean:message key="delete"/></a></td> |
<td></td> |
</tr> |
</logic:iterate> |
/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 |
{ |
1441,11 → 1487,12 |
{ |
border-top:1px solid #8ec73f; |
} |
.remindersContainer |
.remindersContainer, .quotasImpressaoContainer |
{ |
vertical-align:top; |
} |
.remindersContainer input { width:85px } |
.reminders |
{ |
vertical-align:top; |
1455,7 → 1502,7 |
padding:0; |
margin:0; |
} |
.reminders #reminderForm |
.reminders #reminderForm, #quotasImpressao |
{ |
border: 1px solid #8ec73f; |
margin-top:4px; |
/impl/src/web/js/ajax.js |
---|
33,7 → 33,7 |
return; |
} |
var finalParams = ""; |
var url= navjsp; |
var url = location.href.substring(0,location.href.indexOf('/',location.href.indexOf("://")+3)) + navjsp; |
if(params != null && params.length > 0) |
{ |
//url=url+"?"+ params; |
42,7 → 42,8 |
var paramsArray = params.split("&"); |
var i; |
var union = ''; |
for(i = 0; i < paramsArray.length; i++){ |
for(i = 0; i < paramsArray.length; i++) |
{ |
var parameter = paramsArray[i].split("="); |
if(parameter.length == 2) |
{ |
445,10 → 446,84 |
} |
/****************************** |
* Cotas de Impressao |
******************************/ |
var quotasDiv; |
var xmlHttpQuotas; |
var quotasErrorMsg; |
var impressorasMsg; |
var quotasDisponiveisMsg; |
var donaldPretoMsg; |
var billCorMsg; |
function loadQuotas(div,action,_quotasErrorMsg, _impressorasMsg, _quotasDisponiveisMsg, _donaldPretoMsg, _billCorMsg) |
{ |
quotasDiv = div; |
quotasErrorMsg = _quotasErrorMsg; |
impressorasMsg = _impressorasMsg; |
quotasDisponiveisMsg = _quotasDisponiveisMsg; |
donaldPretoMsg = _donaldPretoMsg; |
billCorMsg = _billCorMsg; |
if(!xmlHttpQuotas) |
xmlHttpQuotas = GetXmlHttpObject(stateChangedLoadQuotasCall); |
startRequest(xmlHttpQuotas,"","",stateChangedLoadQuotasCall,"",action); |
} |
function stateChangedLoadQuotasCall() |
{ |
if (xmlHttpQuotas.readyState==4 || xmlHttpQuotas.readyState=="complete") |
{ |
putQuotasImpressao(xmlHttpQuotas.responseXML); |
} |
} |
function putQuotasImpressao(xmlData) |
{ |
if(xmlData == null) |
{ |
getObjectById(quotasDiv).innerHTML=quotasErrorMsg; |
} |
else |
{ |
var pretoTr = xmlData.getElementsByTagName('preto')[0].getElementsByTagName("tr")[0]; |
var corTr = xmlData.getElementsByTagName('cor')[0].getElementsByTagName("tr")[0]; |
if(pretoTr == null || corTr == null) |
{ |
getObjectById(quotasDiv).innerHTML=quotasErrorMsg; |
} |
else |
{ |
var copiasImpressasPreto = pretoTr.getElementsByTagName('td')[1].textContent; |
var copiasDisponiveisPreto = pretoTr.getElementsByTagName('td')[2].textContent; |
var copiasImpressasCor = corTr.getElementsByTagName('td')[1].textContent; |
var copiasDisponiveisCor = corTr.getElementsByTagName('td')[2].textContent; |
var response = ""; |
response += "<table class=\"dataTable\">\n"; |
response += " <tr>\n"; |
response += " <th>" + impressorasMsg + "</th>\n"; |
response += " <th>" + quotasDisponiveisMsg + "</th>\n"; |
response += " </tr>\n"; |
response += " <tr>\n"; |
response += " <th>" + donaldPretoMsg + "</th>\n"; |
if(copiasDisponiveisPreto == '0') |
response += "<td align=\"right\" style=\"color:red\">"+ copiasDisponiveisPreto +"</td>\n" |
else |
response += "<td align=\"right\" style=\"color:green\">"+ copiasDisponiveisPreto +"</td>\n" |
response += " </tr>\n"; |
response += " <tr>\n"; |
response += " <th>" + billCorMsg + "</th>\n"; |
if(copiasDisponiveisCor == '0') |
response += "<td align=\"right\" style=\"color:red\">"+ copiasDisponiveisCor +"</td>\n" |
else |
response += "<td align=\"right\" style=\"color:green\">"+ copiasDisponiveisCor +"</td>\n" |
response += " </tr>\n"; |
response += "</table>\n"; |
getObjectById(quotasDiv).innerHTML=response; |
} |
} |
} |
460,3 → 535,7 |
/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/profile/profileHome.jsp |
---|
64,6 → 64,7 |
if(ProfileForm.getUserView().getUser() instanceof Teacher && ProfileForm.getUserView().getAcademicDegree() != null && ProfileForm.getUserView().getAcademicDegree().trim().length() > 0) |
{ |
%> |
<baco:isAdmin> |
<tr> |
<th> |
<bean:message key="profile.academic.degree"/> |
72,6 → 73,7 |
<bean:message key="profile.academic.degree.${ProfileForm.userView.academicDegree}"/> |
</td> |
</tr> |
</baco:isAdmin> |
<% |
} |
%> |
/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/public/announcements/announcementsPortalRight.jsp |
---|
40,6 → 40,11 |
<table> |
<baco:isAuthenticated> |
<tr> |
<td colspan="2" class="quotasImpressaoContainer"> |
<jsp:include page="/user/quotasImpressao/quotasImpressao.jsp"/> |
</td> |
</tr> |
<tr> |
<td colspan="2" class="remindersContainer"> |
<jsp:include page="/user/reminders/reminders.jsp"/> |
</td> |
/impl/src/web/user/quotasImpressao/quotasImpressao.jsp |
---|
New file |
0,0 → 1,19 |
<%@ 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-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<baco:isModuleOn module="quotasImpressao"> |
<script type="text/javascript" language="JavaScript1.3"> |
<!-- |
loadQuotas('quotasImpressao','<%=request.getContextPath()%>/user/ajaxapis/ServicosImpressao','<bean:message key="intranet.quotas.error"/>','<bean:message key="intranet.quotas.impressoras"/>','<bean:message key="intranet.quotas.disponiveis"/>','<bean:message key="intranet.quotas.donaldPreto"/>','<bean:message key="intranet.quotas.billCor"/>'); |
--> |
</script> |
<div id="quotasImpressao"></div> |
</baco:isModuleOn> |
/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"> |
/impl/src/web/user/reminders/reminders.jsp |
---|
26,15 → 26,16 |
{ |
%> |
setActiveReminders(<%=reminders.getActiveReminders().size()%>); |
<% } |
<% |
} |
if(reminders.getExpiredReminders() != null) |
{ |
%> |
setExpiredReminders(<%=reminders.getExpiredReminders().size()%>); |
--> |
<% |
} |
%> |
--> |
</script> |
<jsp:useBean id="IOwnedReminders" type="pt.estgp.estgweb.services.reminders.IOwnedReminders" scope="request"/> |
/impl/src/web/user/serviceZone/serviceZone.jsp |
---|
235,11 → 235,15 |
<div class="head"> |
<bean:message key="intranet.my.announcements"/> |
<a href="#"><img border="0" onclick="this.src=showOrHide('myAnnouncements','<%=request.getContextPath()%>/imgs/closedbox.gif','<%=request.getContextPath()%>/imgs/openedbox.gif')" src="<%=request.getContextPath()%>/imgs/closedbox.gif" alt="abrir"/></a> |
</div> |
<div id="myAnnouncements" style="display:none;"> |
<% |
if (ownerAnnouncement.size() == 0) |
{ |
%> |
<div class="zerofound"> |
<bean:message key="announcement.zero.placed"/> |
</div> |
249,7 → 253,8 |
else |
{ |
%> |
<table> |
<table> |
<% |
for (AnnouncementView a : ownerAnnouncement) |
{ |
284,16 → 289,20 |
} |
%> |
</table> |
<% |
} |
%> |
</div> |
</div> |
</baco:isModuleOn> |
<baco:isModuleOn module="blogs"> |
<div class="block"> |
<div class="head"> |
<bean:message key="intranet.my.blog.posts"/> |
<a href="#"><img border="0" onclick="this.src=showOrHide('myPosts','<%=request.getContextPath()%>/imgs/closedbox.gif','<%=request.getContextPath()%>/imgs/openedbox.gif')" src="<%=request.getContextPath()%>/imgs/closedbox.gif" alt="abrir"/></a> |
</div> |
<div id="myPosts" style="display:none;"> |
<% |
if (ownerBlogs.size() == 0) |
{ |
334,12 → 343,15 |
<% |
} |
%> |
</div> |
</div> |
<div class="block"> |
<div class="head"> |
<bean:message key="intranet.my.blogs"/> |
<a href="#"><img border="0" onclick="this.src=showOrHide('myBlogs','<%=request.getContextPath()%>/imgs/closedbox.gif','<%=request.getContextPath()%>/imgs/openedbox.gif')" src="<%=request.getContextPath()%>/imgs/closedbox.gif" alt="abrir"/></a> |
</div> |
<div id="myBlogs" style="display:none;"> |
<% |
if (ownerBlogs.size() == 0) |
{ |
380,12 → 392,15 |
<% |
} |
%> |
</div> |
</div> |
<div class="block"> |
<div class="head"> |
<bean:message key="intranet.editable.blogs"/> |
<a href="#"><img border="0" onclick="this.src=showOrHide('editableBlogs','<%=request.getContextPath()%>/imgs/closedbox.gif','<%=request.getContextPath()%>/imgs/openedbox.gif')" src="<%=request.getContextPath()%>/imgs/closedbox.gif" alt="abrir"/></a> |
</div> |
<div id="editableBlogs" style="display:none;"> |
<% |
if (editableBlogs.size() == 0) |
{ |
426,6 → 441,7 |
<% |
} |
%> |
</div> |
</div> |
</baco:isModuleOn> |
/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 |