/branches/v3/impl/src/java/pt/estgp/estgweb/services/sigesimports/ImportTeachersService.java |
---|
804,15 → 804,30 |
} |
else |
{ |
//novo para termos sempre o email externo |
if(teacher.getOutEmail() == null ||teacher.getOutEmail().indexOf("@") < 0) |
teacher.setOutEmail(teacherSiges.getEmail()); |
//VAMOS APENAS ADICIONAR CAMPOS QUE AINDA NAO EXISTAM IGUAL AO CLONE MAS NAO MECHE |
if(teacher.getName() == null || teacher.getName().length() == 0) |
teacher.setName(teacherSiges.getNomeFuncionarioInt()); |
//Email instituicao |
if(teacher.getEmail() == null || teacher.getEmail().indexOf("@") < 0) |
teacher.setEmail(teacherSiges.getEmail()); |
//if(teacher.getEmail() == null || teacher.getEmail().indexOf("@") < 0) |
// teacher.setEmail(teacherSiges.getEmail()); |
if (teacherSiges.getEmail() != null && (teacher.getUsername() == null || teacher.getUsername().trim().length() == 0) && teacherSiges.getEmail().endsWith(Globals.EMAIL_LOCAL_SUFFIX)) |
String suffixReaded = null; |
List<String> sufixes = ConfigProperties.getListValues("email.local.suffix."); |
for(String suffix: sufixes) |
{ |
if(teacherSiges.getEmail()!=null && teacherSiges.getEmail().endsWith("@"+suffix)) |
{ |
suffixReaded = suffix; |
break; |
} |
} |
if (teacherSiges.getEmail() != null && (teacher.getUsername() == null || teacher.getUsername().trim().length() == 0) |
&& suffixReaded != null) |
{ |
int atIndex = teacherSiges.getEmail().indexOf("@"); |
if (atIndex > 0) |
{ |
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/views/UserView.java |
---|
3,7 → 3,6 |
import jomm.utils.BytesUtils; |
import jomm.utils.DesUtils; |
import org.apache.log4j.Logger; |
import pt.estgp.estgweb.Globals; |
import pt.estgp.estgweb.domain.*; |
import pt.estgp.estgweb.domain.dao.DaoFactory; |
import pt.estgp.estgweb.domain.enums.RecordEnum; |
466,13 → 465,13 |
public String getSafeEmail() |
{ |
String email; |
if(pop3username != null && pop3username.trim().length() > 0) |
String email = getEmail(); |
/*if(pop3username != null && pop3username.trim().length() > 0) |
email = pop3username + "@" + Globals.EMAIL_LOCAL_SUFFIX; |
else |
email = username + "@" + Globals.EMAIL_LOCAL_SUFFIX; |
email = username + "@" + Globals.EMAIL_LOCAL_SUFFIX*/; |
if(email != null) |
if(email != null && email.indexOf("@") > 0) |
{ |
String safe = email.replace("@", " [ AT ] ").replace("."," [ DOT ] "); |
StringBuilder result = new StringBuilder(); |
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/views/CourseUnitView.java |
---|
193,7 → 193,7 |
CourseUnitTurmaView tv = new CourseUnitTurmaView(); |
tv.setTurma(t.getTurma()); |
tv.setStudents(new ArrayList<UserView>()); |
for(StudentImpl s: courseUnit.getStudents()) |
for(StudentImpl s: t.getStudents()) |
{ |
UserView u = new UserView(s); |
u.setStudentCourseUnitTurmaView(tv); |
/branches/v3/impl/src/java/pt/estgp/estgweb/filters/filters/CourseUnitEvaluationClearancesFilter.java |
---|
44,8 → 44,8 |
boolean activePeriod = (isActiveYear && (isActiveCourseId || isActiveDegree)); |
boolean active = activePeriod || c.isEvaluationOpenByAdmin(); |
boolean isComplete = c.getCourseUnitEvaluation().isTeacherComplete() && !c.getCourseUnitEvaluation().isClosed(); |
boolean isClosed = c.getCourseUnitEvaluation().isClosed(); |
boolean isComplete = c.getCourseUnitEvaluation() != null && c.getCourseUnitEvaluation().isTeacherComplete() && !c.getCourseUnitEvaluation().isClosed(); |
boolean isClosed = c.getCourseUnitEvaluation() != null && c.getCourseUnitEvaluation().isClosed(); |
boolean isEdit = !isClosed && !isComplete; |