21,6 → 21,9 |
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> |
<jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
|
<% |
String all = request.getParameter("all"); |
%> |
<div class="panel panel-default"> |
<div class="panel-heading"> |
Estatisticas Unidades nos Cursos |
135,32 → 138,76 |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
|
if(all == null) |
{ |
%> |
<div class="dropdown"> |
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Escolha Comissão |
<span class="caret"></span></button> |
<ul class="dropdown-menu"> |
<%--<ul class="nav nav-tabs">--%> |
<% |
for(String roleCourse: comissionsRoles) |
{ |
request.setAttribute("roleCourse",roleCourse); |
%> |
<li id="rolesSeparators<%=roleCourse%>"><a href="javascript:showRoleSeparator('<%=roleCourse%>')"><bean:message key="user.role.${roleCourse}"/></a></li> |
<% |
} |
%> |
</ul> |
<div class="row"> |
<div class="dropdown col-sm-3"> |
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Escolha Comissão |
<span class="caret"></span></button> |
<ul class="dropdown-menu"> |
<%--<ul class="nav nav-tabs">--%> |
<% |
for(String roleCourse: comissionsRoles) |
{ |
request.setAttribute("roleCourse",roleCourse); |
%> |
<li id="rolesSeparators<%=roleCourse%>"><a href="javascript:showRoleSeparator('<%=roleCourse%>')"><bean:message key="user.role.${roleCourse}"/></a></li> |
<% |
} |
%> |
</ul> |
</div> |
<div class="col-sm-3"> |
<html:link styleClass="btn btn-default" action="/user/startLoadCourseCourseUnitsStatistics?all=true">Mostrar Tudo na mesma tabela</html:link> |
</div> |
</div> |
|
<% |
} |
else if(all!=null && all.equals("true")) |
{ |
%> |
<html:link styleClass="btn btn-default" action="/user/startLoadCourseCourseUnitsStatistics">Filtrar por Comissão de Curso</html:link> |
<table class="tablesorter tablesorterfiltered"> |
<thead> |
<tr> |
<th>Cod Curso.</th> |
<th class="filter-name filter-select">Curso</th> |
<th>Cod.</th> |
<th class="filter-name filter-select">Sem.</th> |
<th>Nome</th> |
|
|
<th>Sums</th> |
<th>Sums Pre</th> |
<th>Sums Falt</th> |
|
<th><P></P>lan</th> |
<th class="filter-name filter-select">Ficha</th> |
<th>Aval.Enu</th> |
<th>Aval.Paut</th> |
<th class="filter-name filter-select">Relat.</th> |
<th class="filter-name filter-select">Pedag.</th> |
|
<th>Conteud.</th> |
<th class="filter-name filter-select">Detalhes</th> |
|
</tr> |
</thead> |
<tbody> |
<% |
} |
for(String roleCourse: comissionsRoles) |
{ |
request.setAttribute("roleCourse",roleCourse); |
if(all == null) |
{ |
%> |
<div id="ROLE_VALIDATION_<%=roleCourse%>" style="display: none"> |
<h1><bean:message key="user.role.${roleCourse}"/></h1> |
<% |
} |
Criteria c = AbstractDao.getCurrentSession().createCriteria(CourseUnit.class) |
.setProjection(Projections.projectionList() |
.add(Projections.groupProperty("c.id")) |
171,15 → 218,20 |
.add(eq("c.validationRole", roleCourse)); |
List<Object[]> coursesForRole = c.list(); |
|
if(coursesForRole.size() > 1) |
if(all==null && coursesForRole.size() > 1) |
{ |
%> |
<div class="alert alert-info alert-small">Mais que um curso para o papel <bean:message key="user.role.${roleCourse}"/></div> |
<% |
} |
if(all == null) |
{ |
%> |
<hr/> |
<% |
} |
|
|
for(Object[] courseArray: coursesForRole) |
{ |
Long courseId = (Long) courseArray[0]; |
195,7 → 247,7 |
c.addOrder(Order.asc("name")); |
List<Long> courseUnits = c.list(); |
|
if(courseUnits.size() == 0) |
if(all==null && courseUnits.size() == 0) |
{ |
%> |
<h2><bean:message key="user.role.${roleCourse}"/> </h2> |
208,6 → 260,8 |
{ |
// |
// List<Student> students = DaoFactory.getStudentDaoImpl().loadFromCoursesWithValidationRoles(comissionsRoles,UserSession.getNowConfiguration().getInterfaceImportYear()); |
if(all == null) |
{ |
%> |
<h2><%=courseName%> (<%=courseCode%>)</h2> |
<div class="alert alert-info alert-small"> |
240,6 → 294,7 |
</thead> |
<tbody> |
<% |
} |
for(Long unit: courseUnits) |
{ |
Long unitId = unit; |
247,6 → 302,15 |
request.setAttribute("cu",cu); |
%> |
<tr> |
<% |
if(all != null && all.equals("true")) |
{ |
%> |
<td><%=courseCode%></td> |
<td><%=courseName%></td> |
<% |
} |
%> |
<td>${cu.code}</td> |
<td>${cu.semestre}</td> |
<td><html:link target="_blank" action="/user/startLoadCourseUnitFromHome?id=${cu.id}"> ${cu.name}</html:link></td> |
264,19 → 328,35 |
</tr> |
<% |
} |
%> |
|
if(all == null) |
{ |
%> |
|
</tbody> |
</table> |
|
<% |
} |
} |
|
} |
|
if(all == null) |
{ |
%> |
</div> <!--FIM DE ROLE VALIDATION--> |
<% |
} |
|
} |
if(all != null && all.equals("true")) |
{ |
%> |
</tbody> |
</table> |
<% |
} |
AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
catch(Exception e) |