Rev 1327 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1327 | jmachado | 1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.CourseUnitTurma" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
4 | <%@ page import="java.util.List" %> |
||
5 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
10 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
13 | <% |
||
14 | Long courseUnitId = Long.parseLong(request.getParameter("courseUnitId")); |
||
15 | |||
16 | |||
17 | AbstractDao.getCurrentSession().beginTransaction(); |
||
18 | List<Object[]> turmas = DaoFactory.getCourseUnitTurmaDaoImpl().loadByCourseUnit(courseUnitId); |
||
19 | |||
20 | /** |
||
21 | * .add(Projections.groupProperty("turma")) |
||
22 | .add(Projections.groupProperty("courseUnit.importYear")) |
||
23 | .add(Projections.groupProperty("courseUnit.name")) |
||
24 | .add(Projections.groupProperty("courseUnit.courseName")) |
||
25 | .add(Projections.groupProperty("courseUnit.courseCode")) |
||
26 | .add(Projections.countDistinct("student.id")) |
||
27 | .add(Projections.countDistinct("courseUnit.course.id"))) |
||
28 | */ |
||
29 | |||
30 | %> |
||
31 | <table class="tablesorterfiltered"> |
||
32 | <thead> |
||
33 | <tr> |
||
34 | <th>Turma</th> |
||
35 | <th>Ano</th> |
||
36 | <th>Students</th> |
||
37 | </tr> |
||
38 | </thead> |
||
39 | <tbody> |
||
40 | <% |
||
41 | |||
42 | for(Object[] cturma : turmas) |
||
43 | { |
||
44 | String turma = (String) cturma[0]; |
||
45 | String importYear = (String) cturma[1]; |
||
46 | String unidade = (String) cturma[2]; |
||
47 | String courseName = (String) cturma[3]; |
||
48 | String courseCode = (String) cturma[4]; |
||
49 | Integer students = (Integer) cturma[5]; |
||
50 | Long courseId = (Long) cturma[6]; |
||
51 | |||
52 | %> |
||
53 | <tr> |
||
54 | <td> |
||
1346 | jmachado | 55 | <a href="#" class="reloadAjaxRequestModal" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/listTurmasCourseUnits.jsp?importYear=<%=importYear%>&courseId=<%=courseId%>&turma=<%=turma%>" data-title="Unidades com a turma <%=turma%> do Curso de <%=courseName%> (<%=courseCode%>)"> |
1327 | jmachado | 56 | <%=turma%> |
57 | </a> |
||
58 | </td> |
||
59 | <td><%=importYear%></td> |
||
60 | <td><%=students%></td> |
||
61 | </tr> |
||
62 | <% |
||
63 | } |
||
64 | %> |
||
65 | </tbody> |
||
66 | </table> |
||
67 | <% |
||
68 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
69 | %> |