Subversion Repositories bacoAlunos

Rev

Rev 1333 | 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.Course" %>
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 courseId = Long.parseLong(request.getParameter("courseId"));
15
    String importYear = request.getParameter("importYear");
16
 
17
 
18
    AbstractDao.getCurrentSession().beginTransaction();
19
    List<Object[]> courseUnitTurmas = DaoFactory.getCourseUnitTurmaDaoImpl().loadByCourse(courseId, importYear);
20
    Course course = DaoFactory.getCourseDaoImpl().load(courseId);
21
%>
22
<table class="tablesorterfiltered">
23
    <thead>
24
        <tr>
25
            <th>Ano</th>
26
            <th>Turma</th>
27
            <th>Unidades</th>
28
            <th>Estudantes</th>
29
        </tr>
30
    </thead>
31
    <tbody>
32
        <%
33
            for(Object[] pair : courseUnitTurmas)
34
            {
35
                String turma = (String) pair[0];
36
                Integer count = (Integer) pair[1];
37
                Integer students = (Integer) pair[2];
38
        %>
39
            <tr>
40
                <td><%=importYear%></td>
41
                <td><%=turma%></td>
42
                <td>
1346 jmachado 43
                    <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 <%=course.getName()%> (<%=course.getCode()%>)">
1327 jmachado 44
                        <%=count%>
45
                    </a>
46
 
47
                </td>
48
                <td><%=students%></td>
49
            </tr>
50
        <%
51
            }
52
        %>
53
    </tbody>
54
</table>
55
<%
56
    AbstractDao.getCurrentSession().getTransaction().commit();
57
%>