Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 249 → Rev 279

/impl/conf/language/MessageResourcesProfile.properties
43,6 → 43,8
profile.grades=Notas
profile.home=Apresentação
profile.curriculum.record=Registo Pessoal de Curriculum
profile.academic.degree.less=Sem Formação Superior
 
edit.profile=Editar Meu Perfil
edit.user.profile=Editar Utilizador
profile.roles=Funções na Instituição
/impl/conf/language/MessageResources.properties
267,7 → 267,7
 
student=Estudante
teacher=Professor
user=Usuario
user=Utilizador
 
#Mensagens Status
authentication.ok=Benvindo Fulano
/impl/conf/language/MessageResourcesCourseUnits.properties
16,6 → 16,12
 
courseunit.program.description=Programa Curricular de {0}
 
courseunit.program.archive=Arquivo
 
courseunit.to.add.students.save.first=Para adicionar alunos salve primeiro a unidade curricular e volte aqui.
courseunit.to.add.teachers.save.first=Para adicionar docentes salve primeiro a unidade curricular e volte aqui.
 
courseunit.zero.units=Nenhuma Unidade Curricular
courseunit.objectives.todo=Peenchimento dos objectivos da unidade
courseunit.program.todo=Upload do programa da unidade
courseunit.question.todo=Dúvida
/impl/conf/WEB-INF/web.xml
13,6 → 13,10
<filter-class>pt.estgp.estgweb.web.filters.UserSessionFilter</filter-class>
</filter>
<filter>
<filter-name>TopImageFilter</filter-name>
<filter-class>pt.estgp.estgweb.web.filters.TopImageFilter</filter-class>
</filter>
<filter>
<filter-name>UserFilter</filter-name>
<filter-class>pt.estgp.estgweb.web.filters.UserFilter</filter-class>
</filter>
42,6 → 46,10
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>TopImageFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Set-Character-Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
/impl/conf/app.properties
70,9 → 70,10
ionline.pass=baco
ionline.user=Baco_web
 
server.estgp=http://localhost:8080
server.estgp=http://www.estgp.pt
estgp.encoding=ISO-8859-1
server.estgp.start.path=/templates
#server.estgp.start.path=/templates
server.estgp.start.path=/testes/nova_web
 
#server.estgp=http://www.estgp.pt/testes/nova_web
#estgp.encoding=UTF-8
326,3 → 327,19
 
 
 
#########################################################################
#
#TopImage Filter Links
#
 
top.image.1.start.with=/
top.image.1=/imgs/top.jpg
 
top.image.start.with.2=/student.do?role=student&menu=menu.alunos
top.image.url.2=/imgs/topStudents.jpg
 
 
 
 
 
 
/impl/conf/berserk/sd.xml
841,6 → 841,14
</filterChains>
</service>
<service>
<name>LoadTeachedUnitsCurrentYear</name>
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadTeachedUnitsCurrentYearService</implementationClass>
<description>Load teacher units in currentYear</description>
<isTransactional>true</isTransactional>
<filterChains>
</filterChains>
</service>
<service>
<name>LoadSubscribedUnits</name>
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadSubscribedUnitsService</implementationClass>
<description>Load student units</description>
849,6 → 857,22
</filterChains>
</service>
<service>
<name>LoadSubscribedUnitsCurrentYear</name>
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadSubscribedUnitsCurrentYearService</implementationClass>
<description>Load student units in current Year</description>
<isTransactional>true</isTransactional>
<filterChains>
</filterChains>
</service>
<service>
<name>LoadSubscribedUnitsOldYears</name>
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadSubscribedUnitsOldYearsService</implementationClass>
<description>Load student units in current Year</description>
<isTransactional>true</isTransactional>
<filterChains>
</filterChains>
</service>
<service>
<name>LoadSubscribedUnitsAnnouncements</name>
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadSubscribedUnitsAnnouncementsService</implementationClass>
<description>Load student units</description>
/impl/conf/hibernate.cfg.xml
12,16 → 12,20
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">@hibernate.show.sql@</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.max_statements">50</property>
<property name="connection.pool_size">10</property>
<property name="hibernate.transaction.auto_close_session">true</property>
<property name="hibernate.connection.release_mode ">after_transaction</property>
<!--<property name="hibernate.c3p0.min_size">5</property>-->
<!--<property name="hibernate.c3p0.max_size">20</property>-->
<!--<property name="hibernate.c3p0.timeout">1800</property>-->
<!--<property name="hibernate.max_statements">50</property>-->
 
 
<!--<property name="current_session_context_class">org.hibernate.context.CurrentSessionContext</property>-->
<!--<property name="current_session_context_class">org.hibernate.context.JTASessionContext</property>-->
<!--<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.TransactionManagerLookup</property>-->
<property name="current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</property>
<!--<property name="current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</property>-->
<property name="current_session_context_class">thread</property>
 
{0}
</session-factory>
/impl/src/java/jomm/utils/StringsUtils.java
95,6 → 95,7
{
String lowerToken = token.toLowerCase();
String cleanToken = clearDiacritics(lowerToken);
cleanToken = clearNonAlfaNumericChars(cleanToken);
StringBuilder finalToken = new StringBuilder();
for(int i = 0; i< cleanToken.length();i++)
{
118,6 → 119,18
return DiacriticFilter.clean(lowerToken);
}
 
public static String clearNonAlfaNumericChars(String lowerToken)
{
StringBuilder builder = new StringBuilder();
for(int i = 0; i < lowerToken.length();i++)
{
char c = lowerToken.charAt(i);
if( (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
builder.append(c);
}
return builder.toString();
}
 
public static String cleanKeepNumbers(String telemovel)
{
StringBuilder result = new StringBuilder();
/impl/src/java/pt/estgp/estgweb/Globals.java
86,6 → 86,10
public static final List<String> FILTER_IGNORE_EXTENSIONS = ConfigProperties.getListValues("filter.ignore.extension");
public static final List<String> FILTER_IGNORE_PREFIXES = ConfigProperties.getListValues("filter.ignore.prefix");
 
public static final List<String> TOP_IMAGE_FILTER_LINKS = ConfigProperties.getListValues("top.image.start.with");
public static final List<String> TOP_IMAGE_FILTER_IMAGES_URL = ConfigProperties.getListValues("top.image.url");
 
 
public static final String SITE_URL = ConfigProperties.getProperty("site.url");
 
public static final String INTRANET_MESSAGES_PREFIX = "intranet.";
/impl/src/java/pt/estgp/estgweb/services/courses/CoursesService.java
2,6 → 2,7
 
import pt.utl.ist.berserk.logic.serviceManager.IService;
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;
23,6 → 24,7
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.IOException;
import java.net.MalformedURLException;
 
import jomm.utils.FilesUtils;
102,6 → 104,18
 
if(stream != null && size > 0)
{
String extension = FilesUtils.getExtension(name);
if(c.getStudiesPlan() == null)
{
String identifier = repositoryService.storeRepositoryFile(stream, contentType, extension, size, name, "course.studies.plan" + c.getName(), ResourceAccessControlEnum.publicDomain,userSession);
c.setStudiesPlan(identifier);
}
else
{
repositoryService.updateRepositoryFile(c.getStudiesPlan(), stream, contentType, extension, size, name, "course.studies.plan " + c.getName(), ResourceAccessControlEnum.publicDomain);
}
IRepositoryFile repositoryFile = repositoryService.load(c.getStudiesPlan(),userSession);
stream = repositoryFile.getInput();
try
{
Document dom = Dom4jUtil.parse(stream);
116,15 → 130,13
htmlTrasformationResult = "<div class=\"error\"><pre>" + e.toString() + "\n" + printWriter.toString() + "</pre></div>";
printWriter.close();
}
String extension = FilesUtils.getExtension(name);
if(c.getStudiesPlan() == null)
try
{
String identifier = repositoryService.storeRepositoryFile(stream, contentType, extension, size, name, "course.studies.plan" + c.getName(), ResourceAccessControlEnum.publicDomain,userSession);
c.setStudiesPlan(identifier);
stream.close();
}
else
catch (IOException e)
{
repositoryService.updateRepositoryFile(c.getStudiesPlan(), stream, contentType, extension, size, name, "course.studies.plan " + c.getName(), ResourceAccessControlEnum.publicDomain);
logger.error(e,e);
}
}
courseView.persistViewInObject(c);
/impl/src/java/pt/estgp/estgweb/services/courseunits/UsersUnitsService.java
31,7 → 31,8
TeacherImpl t = (TeacherImpl) DaoFactory.getTeacherDaoImpl().get(teacherId);
if(t != null)
{
courseUnit.getTeachers().remove(t);
if(courseUnit.getTeachers() != null)
courseUnit.getTeachers().remove(t);
courseUnit.getTeachers().add(t);
t.addUnitLocaly(courseUnit);
return loadCourseUnitService.run(courseUnitId,true,true,false,userSession);
59,7 → 60,8
StudentImpl s = (StudentImpl) DaoFactory.getStudentDaoImpl().loadBySigesCode(code);
if(s != null)
{
courseUnit.getStudents().remove(s);
if(courseUnit.getStudents() != null)
courseUnit.getStudents().remove(s);
courseUnit.getStudents().add(s);
s.addUnitLocaly(courseUnit);
return loadCourseUnitService.run(courseUnitId,true,true,false,userSession);
/impl/src/java/pt/estgp/estgweb/services/courseunits/LoadSubscribedUnitsCurrentYearService.java
New file
0,0 → 1,30
package pt.estgp.estgweb.services.courseunits;
 
import pt.utl.ist.berserk.logic.serviceManager.IService;
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.Student;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.utils.DatesUtils;
 
import java.util.List;
import java.util.ArrayList;
 
/**
* @author Jorge Machado
* @date 2/Jun/2008
* @see pt.estgp.estgweb.services.courseunits
*/
public class LoadSubscribedUnitsCurrentYearService implements IService
{
public List<CourseUnit> run(long studentId)
{
Student t = DaoFactory.getStudentDaoImpl().load(studentId);
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadSubscribedImportYearUnits(studentId, DatesUtils.getImportYear());
for(CourseUnit c: units)
{
c.getName();
c.getCourse().getName();
}
return units;
}
}
/impl/src/java/pt/estgp/estgweb/services/courseunits/CreateCourseUnitDirPackageService.java
143,9 → 143,11
 
public static void main(String[] args) throws ServiceException
{
AbstractDao.getCurrentSession().beginTransaction();
new CreateCourseUnitDirPackageService().run(null,null);
AbstractDao.getCurrentSession().getTransaction().commit();
String teste = "Sistemas Térmicos, Hidráulicos e Pneumáticos";
System.out.println(StringsUtils.normalizeResourceName(teste));
// AbstractDao.getCurrentSession().beginTransaction();
// new CreateCourseUnitDirPackageService().run(null,null);
// AbstractDao.getCurrentSession().getTransaction().commit();
}
 
 
/impl/src/java/pt/estgp/estgweb/services/courseunits/CreateCourseUnitWorksBackupService.java
203,7 → 203,7
 
private String createTeacherActualYearBackup(Teacher t, UserSession userSession) throws ServiceException
{
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadTeachedImportYearUnits(t.getId(),DatesUtils.getImportYear());
List units = DaoFactory.getCourseUnitDaoImpl().loadTeachedImportYearUnits(t.getId(),DatesUtils.getImportYear());
if(units == null || units.size() == 0)
return null;
return createTeacherBackup(units,t,userSession);
/impl/src/java/pt/estgp/estgweb/services/courseunits/LoadTeachedUnitsCurrentYearService.java
New file
0,0 → 1,32
package pt.estgp.estgweb.services.courseunits;
 
import pt.utl.ist.berserk.logic.serviceManager.IService;
import pt.estgp.estgweb.domain.CourseUnitImpl;
import pt.estgp.estgweb.domain.Teacher;
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.utils.DatesUtils;
 
import java.util.List;
import java.util.ArrayList;
 
/**
* @author Jorge Machado
* @date 2/Jun/2008
* @see pt.estgp.estgweb.services.courseunits
*/
public class LoadTeachedUnitsCurrentYearService implements IService
{
public List<CourseUnitImpl> run(long teacherId)
{
Teacher t = DaoFactory.getTeacherDaoImpl().load(teacherId);
List<CourseUnitImpl> units = DaoFactory.getCourseUnitDaoImpl().loadTeachedImportYearUnits(teacherId,DatesUtils.getImportYear());
 
for(CourseUnit c: units)
{
c.getName();
c.getCourse().getName();
}
return units;
}
}
/impl/src/java/pt/estgp/estgweb/services/courseunits/LoadSubscribedUnitsOldYearsService.java
New file
0,0 → 1,29
package pt.estgp.estgweb.services.courseunits;
 
import pt.utl.ist.berserk.logic.serviceManager.IService;
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.Student;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.utils.DatesUtils;
 
import java.util.List;
 
/**
* @author Jorge Machado
* @date 2/Jun/2008
* @see pt.estgp.estgweb.services.courseunits
*/
public class LoadSubscribedUnitsOldYearsService implements IService
{
public List<CourseUnit> run(long studentId)
{
// Student t = DaoFactory.getStudentDaoImpl().load(studentId);
List<CourseUnit> units = DaoFactory.getCourseUnitDaoImpl().loadSubscribedOtherImportYearUnits(studentId, DatesUtils.getImportYear());
for(CourseUnit c: units)
{
c.getName();
c.getCourse().getName();
}
return units;
}
}
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportStudentsService.java
137,7 → 137,6
ArrayOfDisciplina disciplinas = d.getDisciplinasInscrito();
for (Disciplina disciplina : disciplinas.getDisciplina())
{
 
CourseUnit courseUnit = DaoFactory.getCourseUnitDaoImpl().loadBySigesCodeUnique("" + disciplina.getCodigo(),"" + disciplina.getCodigoCurso(),disciplina.getCdDuracao(),disciplina.getCdLectivo());
if(courseUnit == null)
{
153,6 → 152,26
if(((StudentImpl)student).isLocalRemovedUnit(courseUnit))
iter.remove();
}
 
if(student.getSubscribedUnits() != null)
{
for(CourseUnit c: units)
{
boolean isIn = false;
for(CourseUnit tc : student.getSubscribedUnits())
{
if(tc.equals(c))
{
isIn = true;
break;
}
}
if(!isIn)
student.getSubscribedUnits().add(c);
}
}
else
student.setSubscribedUnits(units);
student.setSubscribedUnits(units);
}
}
/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportTeachersService.java
10,10 → 10,7
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.utils.DatesUtils;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.domain.Teacher;
import pt.estgp.estgweb.domain.DomainObjectFactory;
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.TeacherImpl;
import pt.estgp.estgweb.domain.*;
import pt.ipportalegre.siges.web.services.*;
import org.apache.log4j.Logger;
 
139,7 → 136,25
if(((TeacherImpl)t).isLocalRemovedUnit(courseUnit))
iter.remove();
}
t.setTeachedUnits(units);
if(t.getTeachedUnits() != null)
{
for(CourseUnit c: units)
{
boolean isIn = false;
for(CourseUnit tc : t.getTeachedUnits())
{
if(tc.equals(c))
{
isIn = true;
break;
}
}
if(!isIn)
t.getTeachedUnits().add(c);
}
}
else
t.setTeachedUnits(units);
}
}
 
/impl/src/java/pt/estgp/estgweb/services/profile/CurriculumService.java
7,7 → 7,9
import pt.estgp.estgweb.domain.*;
import pt.estgp.estgweb.domain.enums.RecordEnum;
import pt.estgp.estgweb.domain.dao.DaoFactory;
import pt.estgp.estgweb.domain.dao.impl.CourseUnitDaoImpl;
import pt.estgp.estgweb.filters.chains.ResourceAccessControlEnum;
import pt.estgp.estgweb.utils.DatesUtils;
import org.apache.log4j.Logger;
 
import java.io.InputStream;
135,7 → 137,7
if(u instanceof Teacher)
{
Teacher teacher = (Teacher) u;
courseUnits = teacher.getTeachedUnits();
courseUnits = new HashSet<CourseUnit>(DaoFactory.getCourseUnitDaoImpl().loadTeachedImportYearUnits(teacher.getId(), DatesUtils.getImportYear()));
}
else if(u instanceof Student)
{
/impl/src/java/pt/estgp/estgweb/domain/StudentImpl.java
4,13 → 4,11
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager;
import pt.utl.ist.berserk.logic.serviceManager.ServiceManager;
 
import java.util.Set;
import java.util.HashSet;
import java.util.List;
import java.util.ArrayList;
import java.util.*;
 
import org.apache.log4j.Logger;
import jomm.utils.StringsUtils;
import com.lowagie.text.pdf.hyphenation.TernaryTree;
 
/**
* @author Jorge Machado
26,8 → 24,12
public static final Logger logger = Logger.getLogger(StudentImpl.class);
 
private List<CourseUnit> subscribedUnitsView = null;
private List<CourseUnit> subscribedUnitsCurrentYearView = null;
private List<CourseUnit> subscribedUnitsOldYearsView = null;
private List<CourseUnitAnnouncementImpl> courseUnitAnnouncementsView = null;
private List<Course> subscribedCoursesView = null;
private List<Course> subscribedCoursesCurrentYearView = null;
private List<Course> subscribedCoursesOldYearsView = null;
 
public List<Course> getSubscribedCoursesView()
{
35,10 → 37,30
return subscribedCoursesView;
}
 
public List<Course> getSubscribedCoursesCurrentYearView()
{
getSubscribedUnitsCurrentYearView();
return subscribedCoursesCurrentYearView;
}
 
public List<Course> getSubscribedCoursesOldYearsView()
{
getSubscribedUnitsOldYearsView();
return subscribedCoursesOldYearsView;
}
 
public String getManagedRole() {
return STUDENT_ROLE;
}
 
public List<CourseUnit> getSubscribedUnitsViewS1()
{
return getUnitsSemestre("S1",getSubscribedUnitsView());
}
public List<CourseUnit> getSubscribedUnitsViewS2()
{
return getUnitsSemestre("S2",getSubscribedUnitsView());
}
public List<CourseUnit> getSubscribedUnitsView()
{
if(subscribedUnitsView == null)
68,7 → 90,82
return subscribedUnitsView;
}
 
public List<CourseUnit> getSubscribedUnitsCurrentYearViewS1()
{
return getUnitsSemestre("S1",getSubscribedUnitsCurrentYearView());
}
public List<CourseUnit> getSubscribedUnitsCurrentYearViewS2()
{
return getUnitsSemestre("S2",getSubscribedUnitsCurrentYearView());
}
public List<CourseUnit> getSubscribedUnitsCurrentYearView()
{
if(subscribedUnitsCurrentYearView == null)
{
subscribedCoursesCurrentYearView = new ArrayList<Course>();
try
{
IServiceManager sm = ServiceManager.getInstance();
String[] names = new String[]{"serializable"};
Object[] args = new Object[]{getId()};
subscribedUnitsCurrentYearView = (List<CourseUnit>) sm.execute(null, "LoadSubscribedUnitsCurrentYear", args, names);
if(subscribedUnitsCurrentYearView == null)
subscribedUnitsCurrentYearView = new ArrayList<CourseUnit>();
for(CourseUnit c: subscribedUnitsCurrentYearView)
{
if(!subscribedCoursesCurrentYearView.contains(c.getCourse()))
{
subscribedCoursesCurrentYearView.add(c.getCourse());
}
}
}
catch (Throwable e)
{
logger.error(e,e);
}
}
return subscribedUnitsCurrentYearView;
}
 
public List<CourseUnit> getSubscribedUnitsOldYearsViewS1()
{
return getUnitsSemestre("S1",getSubscribedUnitsOldYearsView());
}
public List<CourseUnit> getSubscribedUnitsOldYearsViewS2()
{
return getUnitsSemestre("S2",getSubscribedUnitsOldYearsView());
}
public List<CourseUnit> getSubscribedUnitsOldYearsView()
{
if(subscribedUnitsOldYearsView == null)
{
subscribedCoursesOldYearsView = new ArrayList<Course>();
try
{
IServiceManager sm = ServiceManager.getInstance();
String[] names = new String[]{"serializable"};
Object[] args = new Object[]{getId()};
subscribedUnitsOldYearsView = (List<CourseUnit>) sm.execute(null, "LoadSubscribedUnitsOldYears", args, names);
if(subscribedUnitsOldYearsView == null)
subscribedUnitsOldYearsView = new ArrayList<CourseUnit>();
for(CourseUnit c: subscribedUnitsOldYearsView)
{
if(!subscribedCoursesOldYearsView.contains(c.getCourse()))
{
subscribedCoursesOldYearsView.add(c.getCourse());
}
}
}
catch (Throwable e)
{
logger.error(e,e);
}
}
return subscribedUnitsOldYearsView;
}
 
 
 
public List<CourseUnitAnnouncementImpl> getCourseUnitAnnouncementsView()
{
if(courseUnitAnnouncementsView == null)
90,6 → 187,11
return courseUnitAnnouncementsView;
}
 
 
 
 
 
 
public boolean hasCourseUnit(CourseUnit courseUnit)
{
return hasCourseUnit(courseUnit.getId(),false);
/impl/src/java/pt/estgp/estgweb/domain/CourseUnitImpl.java
61,7 → 61,7
 
public boolean isInternal()
{
return true;
return true;
}
 
public CourseUnitBlogImpl getUnitBlog()
70,4 → 70,18
return (CourseUnitBlogImpl) getBlogs().iterator().next();
return null;
}
 
public boolean equals(Object anotherInstance)
{
if(anotherInstance instanceof CourseUnitImpl)
{
CourseUnitImpl anCourseUnit = (CourseUnitImpl) anotherInstance;
return anCourseUnit.getCode() != null && getCode() != null && getCode().equals(anCourseUnit.getCode()) &&
anCourseUnit.getCourseCode() != null && getCourseCode() != null && getCourseCode().equals(anCourseUnit.getCourseCode()) &&
anCourseUnit.getSemestre() != null && getSemestre() != null && getSemestre().equals(anCourseUnit.getSemestre()) &&
anCourseUnit.getImportYear() != null && getImportYear() != null && getImportYear().equals(anCourseUnit.getImportYear());
}
return false;
 
}
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/TeacherDaoImpl.java
1,7 → 1,12
package pt.estgp.estgweb.domain.dao.impl;
 
import pt.estgp.estgweb.domain.Teacher;
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.CourseUnitImpl;
import static org.hibernate.criterion.Restrictions.*;
 
import java.util.List;
 
/**
* @author Jorge Machado
* @date 28/Fev/2008
23,10 → 28,13
{
return (Teacher) createCriteria().add(eq("sigesCode",sigesCode)).uniqueResult();
}
public Teacher loadByBi(String bi)
 
public Teacher loadByBi(String bi)
{
return (Teacher) createCriteria().add(eq("bi",bi)).uniqueResult();
}
 
 
 
}
/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseUnitDaoImpl.java
3,6 → 3,7
import pt.estgp.estgweb.domain.CourseUnit;
import pt.estgp.estgweb.domain.Blog;
import pt.estgp.estgweb.domain.TeacherImpl;
import pt.estgp.estgweb.domain.CourseUnitImpl;
import pt.estgp.estgweb.domain.dao.DaoUtils;
import pt.estgp.estgweb.services.common.SearchTypeEnum;
import pt.estgp.estgweb.utils.DatesUtils;
52,13 → 53,21
{
return createCriteria().add(eq("importYear",importYear))
.createAlias("students","st")
.add(eq("st.id", studentId)).list();
.add(eq("st.id", studentId)).addOrder(Order.asc("name")).list();
}
public List<CourseUnit> loadTeachedImportYearUnits(long studentId, String importYear)
 
public List<CourseUnit> loadSubscribedOtherImportYearUnits(long studentId, String importYear)
{
return createCriteria().add(not(eq("importYear",importYear)))
.createAlias("students","st")
.add(eq("st.id", studentId)).addOrder(Order.asc("name")).list();
}
public List<CourseUnitImpl> loadTeachedImportYearUnits(long teacherId, String importYear)
{
return createCriteria().add(eq("importYear",importYear))
.createAlias("teachers","st")
.add(eq("st.id", studentId)).list();
.add(eq("st.id", teacherId)).addOrder(Order.asc("importYear")).addOrder(Order.asc("name")).list();
}
 
public CourseUnit loadBySigesCodeUnique(String sigesCode)
/impl/src/java/pt/estgp/estgweb/domain/TeacherImpl.java
25,7 → 25,9
public static final Logger logger = Logger.getLogger(TeacherImpl.class);
 
private List<CourseUnit> teachedUnitsView = null;
private List<CourseUnit> teachedUnitsCurrentYearView = null;
private List<Course> teachedCoursesView = null;
private List<Course> teachedCoursesCurrentYearView = null;
 
public TeacherImpl()
{
41,7 → 43,21
getTeachedUnitsView();
return teachedCoursesView;
}
 
public List<Course> getTeachedCoursesCurrenYearView()
{
getTeachedUnitsCurrentYearView();
return teachedCoursesCurrentYearView;
}
 
public List<CourseUnit> getTeachedUnitsViewS1()
{
return getUnitsSemestre("S1",getTeachedUnitsView());
}
public List<CourseUnit> getTeachedUnitsViewS2()
{
return getUnitsSemestre("S2",getTeachedUnitsView());
}
public List<CourseUnit> getTeachedUnitsView()
{
if(teachedUnitsView == null)
71,6 → 87,43
return teachedUnitsView;
}
 
public List<CourseUnit> getTeachedUnitsCurrentYearViewS1()
{
return getUnitsSemestre("S1",getTeachedUnitsCurrentYearView());
}
public List<CourseUnit> getTeachedUnitsCurrentYearViewS2()
{
return getUnitsSemestre("S2",getTeachedUnitsCurrentYearView());
}
public List<CourseUnit> getTeachedUnitsCurrentYearView()
{
if(teachedUnitsCurrentYearView == null)
{
teachedCoursesCurrentYearView = new ArrayList<Course>();
try
{
IServiceManager sm = ServiceManager.getInstance();
String[] names = new String[]{"serializable"};
Object[] args = new Object[]{getId()};
teachedUnitsCurrentYearView = (List<CourseUnit>) sm.execute(null, "LoadTeachedUnitsCurrentYear", args, names);
if(teachedUnitsCurrentYearView == null)
teachedUnitsCurrentYearView = new ArrayList<CourseUnit>();
for(CourseUnit c: teachedUnitsCurrentYearView)
{
if(!teachedCoursesCurrentYearView.contains(c.getCourse()))
{
teachedCoursesCurrentYearView.add(c.getCourse());
}
}
}
catch (Throwable e)
{
logger.error(e,e);
}
}
return teachedUnitsCurrentYearView;
}
 
public boolean hasCourseUnit(long id)
{
return hasCourseUnit(id,false);
/impl/src/java/pt/estgp/estgweb/domain/UserManagedRoleImpl.java
2,13 → 2,29
 
import jomm.utils.StringsUtils;
 
import java.util.Date;
import java.util.Set;
import java.util.*;
 
 
public abstract class UserManagedRoleImpl extends UserImpl
{
 
public static List<CourseUnit> getUnitsSemestre(String semestre, List<CourseUnit> s1)
{
if(s1 != null)
{
s1 = new ArrayList<CourseUnit>(s1);
Iterator iter = s1.iterator();
while (iter.hasNext())
{
CourseUnit courseUnit = (CourseUnit) iter.next();
if(courseUnit.getSemestre() == null || !courseUnit.getSemestre().equals(semestre))
iter.remove();
}
return s1;
}
return s1;
}
public UserManagedRoleImpl()
{
 
/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitView.java
100,7 → 100,6
this.code = courseUnit.getCode();
this.importYear = courseUnit.getImportYear();
this.semestre = courseUnit.getSemestre();
this.importYear = courseUnit.getImportYear();
this.courseCode = courseUnit.getCourseCode();
this.objectives = courseUnit.getObjectives();
if(courseUnit.getProgramStreamId() != null)
/impl/src/java/pt/estgp/estgweb/web/utils/ProxyUtils.java
New file
0,0 → 1,89
package pt.estgp.estgweb.web.utils;
 
import org.apache.log4j.Logger;
import pt.estgp.estgweb.Globals;
 
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
 
/**
* @author Jorge Machado
* @date 8/Out/2008
* @see pt.estgp.estgweb.web.utils
*/
public class ProxyUtils
{
// proxy/accaoSocialAlunosPortalMenu/estgp
private static final Logger logger = Logger.getLogger(ProxyUtils.class);
 
public static String getTopImageLink(HttpServletRequest request)
{
String pathIfo = request.getPathInfo();
String queryString = request.getQueryString();
 
if(request.getServletPath().equals("/proxy"))
{
String finalFileCandidate1 = pathIfo.substring(0,pathIfo.lastIndexOf("/")) + "/top.jpg";
String finalFileCandidate2 = pathIfo.substring(0,pathIfo.lastIndexOf(".")) + ".jpg";
 
String protocol = request.getRequestURL().substring(0,request.getRequestURL().indexOf("://"));
String finalFileCandidate1total = protocol + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/proxy" + finalFileCandidate1;
String finalFileCandidate2total = protocol + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/proxy" + finalFileCandidate2;
 
try
{
URL url = new URL(finalFileCandidate2total);
url.openConnection().getInputStream();
return request.getContextPath() + "/proxy" + finalFileCandidate2;
}
catch (MalformedURLException e)
{
logger.error("BAD TOP IMAGE URL 2: " + finalFileCandidate2total);
}
catch (IOException e)
{
logger.debug("candidate 2 don't exist: " + finalFileCandidate2total);
}
 
try
{
URL url = new URL(finalFileCandidate1total);
url.openConnection().getInputStream();
return request.getContextPath() + "/proxy" + finalFileCandidate1;
}
catch (MalformedURLException e)
{
logger.error("BAD TOP IMAGE URL 1: " + finalFileCandidate1total);
}
catch (IOException e)
{
logger.debug("candidate 1 don't exist: " + finalFileCandidate1total);
}
}
else
{
String link = request.getServletPath();
if(pathIfo!=null)
link+= pathIfo;
if(queryString!=null)
link+= "?" + queryString;
 
 
for(int i = 0; i < Globals.TOP_IMAGE_FILTER_LINKS.size();i++)
{
String url = Globals.TOP_IMAGE_FILTER_LINKS.get(i);
if(link.startsWith(url))
{
String finalUrl = Globals.TOP_IMAGE_FILTER_IMAGES_URL.get(i);
if(finalUrl.startsWith("/"))
return request.getContextPath() + finalUrl;
else
return finalUrl;
}
}
}
return null;
}
}
/impl/src/java/pt/estgp/estgweb/web/filters/TopImageFilter.java
New file
0,0 → 1,79
package pt.estgp.estgweb.web.filters;
 
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.web.utils.RequestUtils;
import pt.estgp.estgweb.web.utils.ProxyUtils;
 
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.io.IOException;
 
/**
*
* @author Jorge Machado
*/
 
public class TopImageFilter implements Filter
{
 
public static final String TOP_IMAGE = "TOP_IMAGE";
 
public TopImageFilter()
{
}
 
public void init(FilterConfig config)
{
 
}
 
/**
*
* @param request The servlet request we are processing
* @param chain The filter chain we are processing
*
* @exception java.io.IOException if an input/output error occurs
* @exception javax.servlet.ServletException if a servlet error occurs
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
HttpServletRequest hrequest = (HttpServletRequest) request;
String relativePath = hrequest.getServletPath();
if (relativePath == null)
relativePath = "";
 
if (hrequest.getPathInfo() != null && hrequest.getPathInfo().length() > 0)
{
relativePath += hrequest.getPathInfo();
}
 
for (String ignore : Globals.FILTER_IGNORE_EXTENSIONS)
{
if (relativePath.endsWith(ignore))
{
chain.doFilter(request, response);
return;
}
}
for (String ignore : Globals.FILTER_IGNORE_PREFIXES)
{
if (relativePath.startsWith(ignore))
{
chain.doFilter(request, response);
return;
}
}
 
String link = ProxyUtils.getTopImageLink((HttpServletRequest) request);
request.setAttribute(TOP_IMAGE,link);
chain.doFilter(request,response);
}
 
public void destroy()
{
// Nothing
}
}
/impl/src/java/pt/utl/ist/berserk/storage/hibernate/HibernateTransactionBroker.java
37,28 → 37,36
{
HibernateUtils.getCurrentSession().beginTransaction();
}
public void commitTransaction() throws StorageException
 
public void commitTransaction() throws StorageException
{
HibernateUtils.getCurrentSession().getTransaction().commit();
HibernateUtils.getCurrentSession().close();
 
}
public void abortTransaction() throws StorageException
 
public void abortTransaction() throws StorageException
{
Session sess = HibernateUtils.getCurrentSession();
Transaction t = sess.getTransaction();
t.rollback();
sess.close();
}
public void lockRead(List list) throws StorageException
 
public void lockRead(List list) throws StorageException
{
for(Object obj: list)
{
lockRead(obj);
}
}
public void lockRead(Object obj) throws StorageException
public void lockRead(Object obj) throws StorageException
{
HibernateUtils.getCurrentSession().lock(obj, LockMode.READ);
}
public void lockWrite(Object obj) throws StorageException
 
public void lockWrite(Object obj) throws StorageException
{
HibernateUtils.getCurrentSession().lock(obj, LockMode.WRITE);
}
/impl/src/web/imgs/top.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/impl/src/web/admin/profile/profileCurriculum.jsp
36,6 → 36,7
<html:select property="recordView.type">
<html:option value="RecordThesisImpl" key="profile.RecordThesisImpl"/>
<html:option value="RecordPaperImpl" key="profile.RecordPaperImpl"/>
<%--todo Falta Artigo de Opinião e falta meter artigo cientifico, revista, conferencia, workshop--%>
<html:option value="RecordJobImpl" key="profile.RecordJobImpl"/>
<html:option value="RecordEventOrganizationImpl" key="profile.RecordEventOrganizationImpl"/>
<html:option value="RecordProjectImpl" key="profile.RecordProjectImpl"/>
/impl/src/web/admin/courseunits/courseunit.jsp
84,74 → 84,89
<bean:message key="courseunit.teachers"/>
</th>
<td>
<html:select property="teacherId">
<logic:present name="CourseUnitsForm" property="teachers">
<logic:iterate id="teacher" name="CourseUnitsForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
<jomm:option itemName="teacher" itemProperty="id" comparableObjectName="CourseUnitsForm"
comparableObjectProperty="teacherId">
(${teacher.code}) ${teacher.name}
</jomm:option>
</logic:iterate>
<input type="button" value="<bean:message key="add"/>"
onclick="set(this.form,'addTeacher');this.form.submit();">
</logic:present>
</html:select>
<logic:greaterThan name="CourseUnitView" property="teachersSize" value="0">
<table class="dataTable removeButton">
<logic:iterate id="userView" name="CourseUnitView" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
<tr>
<th>
${userView.code}
</th>
<th>
${userView.name}
</th>
<td><input type="button" class="removeButton"
onclick="CourseUnitsForm.id.value='${userView.id}';set(this.form,'removeTeacher');this.form.submit();">
</td>
</tr>
</logic:iterate>
</table>
<logic:lessEqual value="0" name="courseunit.id">
<i><bean:message key="courseunit.to.add.teachers.save.first"/></i>
</logic:lessEqual>
 
<logic:greaterThan value="0" name="courseunit.id">
<html:select property="teacherId">
<logic:present name="CourseUnitsForm" property="teachers">
<logic:iterate id="teacher" name="CourseUnitsForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
<jomm:option itemName="teacher" itemProperty="id" comparableObjectName="CourseUnitsForm"
comparableObjectProperty="teacherId">
(${teacher.code}) ${teacher.name}
</jomm:option>
</logic:iterate>
<input type="button" value="<bean:message key="add"/>"
onclick="set(this.form,'addTeacher');this.form.submit();">
</logic:present>
</html:select>
<logic:greaterThan name="CourseUnitView" property="teachersSize" value="0">
<table class="dataTable removeButton">
<logic:iterate id="userView" name="CourseUnitView" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
<tr>
<th>
${userView.code}
</th>
<th>
${userView.name}
</th>
<td><input type="button" class="removeButton"
onclick="CourseUnitsForm.id.value='${userView.id}';set(this.form,'removeTeacher');this.form.submit();">
</td>
</tr>
</logic:iterate>
</table>
</logic:greaterThan>
</logic:greaterThan>
</td>
</tr>
 
<tr>
<th>
<bean:message key="courseunit.students"/>
</th>
<td>
<html:text styleClass="text" property="studentCode"/>
<input type="button" value="<bean:message key="add"/>"
onclick="set(this.form,'addStudent');this.form.submit();">
<logic:greaterThan name="CourseUnitView" property="studentsSize" value="0">
<table class="dataTable removeButton">
<logic:iterate id="userView" name="CourseUnitView" property="students" type="pt.estgp.estgweb.domain.views.UserView">
<tr>
<th>
${userView.code}
</th>
<th>
${userView.username}
</th>
<th>
${userView.name}
</th>
<th>
${userView.email}
</th>
<th>
${userView.address}
</th>
<td><input type="button" class="removeButton"
onclick="CourseUnitsForm.id.value='${userView.code}';set(this.form,'removeStudent');this.form.submit();">
</td>
</tr>
</logic:iterate>
</table>
 
<logic:lessEqual value="0" name="courseunit.id">
<i><bean:message key="courseunit.to.add.students.save.first"/></i>
</logic:lessEqual>
 
<logic:greaterThan value="0" name="courseunit.id">
<html:text styleClass="text" property="studentCode"/>
<input type="button" value="<bean:message key="add"/>"
onclick="set(this.form,'addStudent');this.form.submit();">
<logic:greaterThan name="CourseUnitView" property="studentsSize" value="0">
<table class="dataTable removeButton">
<logic:iterate id="userView" name="CourseUnitView" property="students" type="pt.estgp.estgweb.domain.views.UserView">
<tr>
<th>
${userView.code}
</th>
<th>
${userView.username}
</th>
<th>
${userView.name}
</th>
<th>
${userView.email}
</th>
<th>
${userView.address}
</th>
<td><input type="button" class="removeButton"
onclick="CourseUnitsForm.id.value='${userView.code}';set(this.form,'removeStudent');this.form.submit();">
</td>
</tr>
</logic:iterate>
</table>
</logic:greaterThan>
</logic:greaterThan>
</td>
</tr>
 
 
</table>
<input type="button" onclick="set(form,'createOrUpdateAdmin');form.submit()" value="<bean:message key="confirm"/>">
</html:form>
/impl/src/web/css/style.css
494,19 → 494,40
}
.block ul li ul li
{
padding-left: 10px;
padding-left: 0;
}
 
.block p, .navLeftMenu h2 {
background-color: #8EC73F;
padding-left: 10px;
padding-left: 0;
margin: 0;
 
}
 
.intranetLayout .block ul
{
LIST-STYLE-TYPE: square;
}
.block ul {
LIST-STYLE-TYPE: none;
padding-left: 10px;
 
list-style:none;
padding-left: 18px;
margin-left:0;
}
.intranetLayout .block ul ul{
LIST-STYLE-TYPE: circle;
}
.block ul ul
{
list-style:none;
padding-left: 15px;
margin-left:0;
}
.block ul li{
padding-top:5px;
padding-left:0;
margin-left:0;
}
 
.block a {
color: #4d4d4d;
/impl/src/web/layout/header.jsp
1,3 → 1,5
<%@ page import="pt.estgp.estgweb.web.utils.ProxyUtils" %>
<%@ page import="pt.estgp.estgweb.web.filters.TopImageFilter" %>
<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
7,7 → 9,22
<table width="100%">
<tr>
<td>
<img alt="estg" src="<%=request.getContextPath()%>/imgs/top.jpg"/>
 
<%
String link = (String) request.getAttribute(TopImageFilter.TOP_IMAGE);
if (link == null)
{
%>
<img alt="estg" src="<%=request.getContextPath()%>/imgs/top.jpg"/>
<%
}
else
{
%>
<img alt="estg" src="<%=link%>"/>
<%
}
%>
</td>
</tr>
</table>
/impl/src/web/layout/topnav.jsp
12,10 → 12,15
List<NavPlace> navKeys = topNav.getNavPlaces();
for (NavPlace navPlace : navKeys)
{
 
 
if (navPlace.getUrl() != null)
{
String context = "";
if(navPlace.getUrl().startsWith("/"))
context = request.getContextPath();
%>
<li class="navPlace"><a href="<%=request.getContextPath() + navPlace.getUrl()%>"><%=navPlace.getMessage(request)%></a> &gt;</li>
<li class="navPlace"><a href="<%=context + navPlace.getUrl()%>"><%=navPlace.getMessage(request)%></a> &gt;</li>
<%
}
else
/impl/src/web/layout/layoutintranet.jsp
14,7 → 14,7
<jsp:include page="/layout/scripts.jsp"/>
</head>
<body class="small" marginwidth="0" marginheight="0" bgcolor="#ffffff" topmargin="0" leftmargin="0">
<div id="body">
<div id="body" class="intranetLayout">
<div id="header">
<tiles:insert attribute="header"/>
</div>
/impl/src/web/layout/separators.jsp
33,7 → 33,7
String link3 = "href=\"" + request.getContextPath() + "/user/startProfile.do\"";
String link4 = "href=\"" + request.getContextPath() + "/user/startServiceZone.do\"";
String link5 = "href=\"" + request.getContextPath() + "/proxy/layoutIOnline/ionline/\"";
String link6 = "href=\"" + request.getContextPath() + "/proxy/layoutIntranetUtils/estgp/intranet/utils.html\"";
String link6 = "href=\"" + request.getContextPath() + "/proxy/layoutIntranetUtils/estgp/intranet/escola/utils.html\"";
 
if(sep == 0)
{
/impl/src/web/public/profile/profileHome.jsp
115,7 → 115,7
<ul>
<logic:iterate id="courseUnit" name="course" property="courseUnits">
<li>
<html:link action="${user}/startLoadCourseUnit${fromAction}?courseUnitView.id=${courseUnit.id}"><bean:write name="courseUnit" property="name"/> (<bean:write name="courseUnit" property="code"/>)</html:link>
(<bean:write name="courseUnit" property="importYear"/>) <html:link action="${user}/startLoadCourseUnit${fromAction}?courseUnitView.id=${courseUnit.id}"><bean:write name="courseUnit" property="name"/> (<bean:write name="courseUnit" property="code"/>)</html:link>
</li>
</logic:iterate>
</ul>
/impl/src/web/templates/intranet/escola/secretaria/documentosApoio.html
85,6 → 85,8
</ul>
</li>
</ul>
 
<a href="teste/teste.html?nav0=Documentos de apoio&navUrl0=../documentosApoio.html%3Fnav0%3DDocumentos de Apoio&nav1=teste">teste</a>
</div>
</div>
</div>
/impl/src/web/user/courseunits/menu.jsp
49,9 → 49,9
<li>
<html:link action="/user/startSubmitAnnouncementFromCourseUnit?announcementView.courseUnitView.id=${CourseUnitView.id}"><bean:message key="courseunit.menu.put.announcement"/></html:link>
</li>
<li>
<!--<li>
<a href="<%=request.getContextPath()%>/"><bean:message key="courseunit.menu.put.question"/></a>
</li>
</li>-->
<li>
<a href="<%=request.getContextPath()%>${user}/startLoadCourseUnitWorks${fromAction}.do?courseUnitView.id=${CourseUnitView.id}"><bean:message key="courseunit.menu.assignements"/></a>
</li>
/impl/src/web/user/home/student.jsp
16,16 → 16,42
<div class="block">
<p><bean:message key="intranet.course.units"/></p>
<ul>
<logic:present name="UserSession" property="user.subscribedUnitsView">
<logic:notEmpty name="UserSession" property="user.subscribedUnitsView">
<logic:iterate id="unit" name="UserSession" property="user.subscribedUnitsView" type="pt.estgp.estgweb.domain.CourseUnit">
<li>
<html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name}</html:link>
</li>
</logic:iterate>
</logic:notEmpty>
</logic:present>
<li>
<p><bean:message key="courseunit.semestre"/> 1</p>
<logic:empty name="UserSession" property="user.subscribedUnitsCurrentYearViewS1">
<bean:message key="courseunit.zero.units"/>
</logic:empty>
<logic:present name="UserSession" property="user.subscribedUnitsCurrentYearViewS1">
<logic:notEmpty name="UserSession" property="user.subscribedUnitsCurrentYearViewS1">
<ul>
<logic:iterate id="unit" name="UserSession" property="user.subscribedUnitsCurrentYearViewS1" type="pt.estgp.estgweb.domain.CourseUnit">
<li>
<html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.importYear})</html:link>
</li>
</logic:iterate>
</ul>
</logic:notEmpty>
</logic:present>
</li>
<li>
<p><bean:message key="courseunit.semestre"/> 2</p>
<logic:empty name="UserSession" property="user.subscribedUnitsCurrentYearViewS2">
<bean:message key="courseunit.zero.units"/>
</logic:empty>
<logic:present name="UserSession" property="user.subscribedUnitsCurrentYearViewS2">
<logic:notEmpty name="UserSession" property="user.subscribedUnitsCurrentYearViewS2">
<ul>
<logic:iterate id="unit" name="UserSession" property="user.subscribedUnitsCurrentYearViewS2" type="pt.estgp.estgweb.domain.CourseUnit">
<li>
<html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.importYear})</html:link>
</li>
</logic:iterate>
</ul>
</logic:notEmpty>
</logic:present>
</li>
</ul>
<!--Can put year all other units in the future calling service user.subscribedUnitsOldYearsView-->
</div>
</td>
</baco:isModuleOn>
/impl/src/web/user/home/teacher.jsp
16,17 → 16,41
<div class="block">
<p><bean:message key="intranet.course.units"/></p>
<ul>
<logic:present name="UserSession" property="user.teachedUnitsView">
<logic:notEmpty name="UserSession" property="user.teachedUnitsView">
<logic:iterate id="unit" name="UserSession" property="user.teachedUnitsView" type="pt.estgp.estgweb.domain.CourseUnit">
<li>
<html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName})</html:link>
</li>
</logic:iterate>
</logic:notEmpty>
</logic:present>
<li>
<p><bean:message key="courseunit.semestre"/> 1</p>
<logic:empty name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
<bean:message key="courseunit.zero.units"/>
</logic:empty>
<logic:present name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
<logic:notEmpty name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
<ul>
<logic:iterate id="unit" name="UserSession" property="user.teachedUnitsCurrentYearViewS1" type="pt.estgp.estgweb.domain.CourseUnit">
<li>
<html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name}</html:link>
</li>
</logic:iterate>
</ul>
</logic:notEmpty>
</logic:present>
</li>
<li>
<p><bean:message key="courseunit.semestre"/> 2</p>
<logic:empty name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
<bean:message key="courseunit.zero.units"/>
</logic:empty>
<logic:present name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
<logic:notEmpty name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
<ul>
<logic:iterate id="unit" name="UserSession" property="user.teachedUnitsCurrentYearViewS2" type="pt.estgp.estgweb.domain.CourseUnit">
<li>
<html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name}</html:link>
</li>
</logic:iterate>
</ul>
</logic:notEmpty>
</logic:present>
</li>
</ul>
</div>
</td>
</baco:isModuleOn>
/impl/src/web/user/serviceZone/serviceZone.jsp
116,9 → 116,10
</li>
<baco:isModuleOn module="courseunits">
<li>
<baco:isAdmin>
 
<bean:message key="courses"/>
<ul>
<baco:isAdmin>
<li>
<html:link action="/user/startNewCourseFromServiceZone">
<bean:message key="course.new"/>
139,8 → 140,13
<bean:message key="courseunit.search"/>
</html:link>
</li>
</baco:isAdmin>
<li>
<html:link action="/user/startFindCourseUnitAdminFromServiceZone">
<bean:message key="courseunit.program.archive"/>
</html:link>
</li>
</ul>
</baco:isAdmin>
<bean:message key="backups"/>
<ul>
<baco:isAdmin>
/impl/etc/todo/todo.txt
1,3 → 1,15
Questão da identificacao dos Noturnos
Listagem de Programas
- Ano > Curso >
[CODIGO-NOMEUNI-SEMESTRE.pdf]
No caso de não haver:
[CODIGO-NOMEUNI-SEMESTRE-FALTA.pdf]
 
 
No dia da Instalação:
Pasta de Deliberações CC copy paste.
 
 
Configuracoes de Teste
Server ESTGP esta definido para o localhost
Start Path do IOnline esta para a raiz mas para testar unidades tem de apontar para /Erasmus/baco
12,10 → 24,13
Calendario de Exames > passa a pasta ionline
Projectos Finais > criar pasta escola\projectos ionline
Actas do Conselho directivo > ionline com permissões especias
Pasta da Legislação > NovaWeb
Pasta da Legislação > NovaWeb
 
Pasta Bolonha ZIP Pack deploy
Pasta Horarios Criar hierarquia. > Intranet/horarios
 
 
 
Jorge Meu
Tirar o getSerializable de noovo do domainObject e ver de onde devem herdar
 
/impl/build.xml
144,7 → 144,7
<antcall target="createConfigurationFiles"/>
</target>
<target name="compile" depends="initDirs" description="Compile All">
<javac encoding="UTF-8" source="1.5" target="1.5" destdir="${build.dir.classes}" debug="true" optimize="true" fork="true" deprecation="true" verbose="true" failonerror="true">
<javac encoding="UTF-8" source="1.5" target="1.5" destdir="${build.dir.classes}" debug="false" optimize="true" fork="true" deprecation="false" verbose="false" failonerror="true">
<src path="${src.dir}"/>
<src path="${gen.dir.java}"/>
<classpath refid="pathToToolsLib"/>
331,8 → 331,8
<copy overwrite="true" todir="${build.dir.intranet.setup.folders.file}" file="${intranet.setup.folders.file.src}"/>
 
<java classname="${scripts.buider.class}" classpath="${build.dir.classes}">
<arg value="${basedir}\..\common"/>
<arg value="${basedir}\build\ant\classes"/>
<arg value="${basedir}${file.separator}..${file.separator}common"/>
<arg value="${basedir}${file.separator}build${file.separator}ant${file.separator}classes"/>
<arg value="${build.dir.scripts}"/>
<arg value="${scripts.target.libs.file}"/>
</java>
495,4 → 495,4
<!--<java classname="mitra.oaiharvest.index.IndexEngine" classpath="${build.dir.classes}" classpathref="pathToToolsLib"/>-->
<!--</target>-->
 
</project>
</project>