Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1519 → Rev 1521

/branches/v3/impl/src/java/pt/estgp/estgweb/domain/views/CourseView.java
89,6 → 89,7
private String externalSitePath;
private String validationRole;
private boolean status;
private boolean showStudiesPlan;
private String userGroupStudents;
 
private List<CourseYearView> courseYearViews = new DynamicArrayList<CourseYearView>(CourseYearView.class);
175,6 → 176,7
this.externalSitePath = course.getExternalSitePath();
this.externalSiteServer = course.getExternalSiteServer();
this.status = course.isStatus();
this.showStudiesPlan = course.isShowStudiesPlan();
this.userGroupStudents = course.getUserGroupStudents();
if(course.getStudiesPlan() != null)
this.studiesPlanStreamId = course.getStudiesPlan();
227,6 → 229,7
c.setExternalSiteServer(externalSiteServer);
c.setValidationRole(validationRole);
c.setStatus(status);
c.setShowStudiesPlan(showStudiesPlan);
c.setUserGroupStudents(userGroupStudents);
if(coordinator != null && coordinator.getId() > 0)
{
757,7 → 760,14
this.userGroupStudents = userGroupStudents;
}
 
public boolean isShowStudiesPlan() {
return showStudiesPlan;
}
 
public void setShowStudiesPlan(boolean showStudiesPlan) {
this.showStudiesPlan = showStudiesPlan;
}
 
public boolean isSeparatedUnits(String year)
{
for(CourseYearView cyv: courseYearViews)
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/CourseImpl.java
39,7 → 39,7
 
public String getStatusForJsonApi()
{
if(isStatus())
if(isShowStudiesPlan())
{
return "active";
}
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/dao/impl/CourseDaoImpl.java
201,11 → 201,11
.list();
}
 
public List<Course> findAllActiveOrderByNameEvenWithoutCourseUnit(String institutionalCode, String degree)
public List<Course> findAllShowStudiesPlanCoursesOrderByNameEvenWithoutCourseUnit(String institutionalCode, String degree)
{
Criteria c = createCriteria();
 
c.add(eq("status", true));
c.add(eq("showStudiesPlan", true));
 
if (degree != null && degree.length() > 0)
c.add(eq("degree", degree));