Subversion Repositories bacoAlunos

Rev

Rev 1412 | Rev 1474 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1412 Rev 1426
Line 3... Line 3...
3
<%@ page import="pt.estgp.estgweb.domain.Questionario" %>
3
<%@ page import="pt.estgp.estgweb.domain.Questionario" %>
4
<%@ page import="pt.estgp.estgweb.domain.QuestionarioImpl" %>
4
<%@ page import="pt.estgp.estgweb.domain.QuestionarioImpl" %>
5
<%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto" %>
5
<%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto" %>
6
<%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoUnidadeCurricularAfeta" %>
6
<%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoUnidadeCurricularAfeta" %>
7
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %>
7
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %>
-
 
8
<%@ page import="java.net.URLEncoder" %>
8
<%@ page import="java.util.List" %>
9
<%@ page import="java.util.List" %>
9
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
10
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
10
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
11
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
11
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
12
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
12
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
13
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
Line 44... Line 45...
44
                        ",t.dsTipologia " +
45
                        ",t.dsTipologia " +
45
                        ",t.cdTurma " +
46
                        ",t.cdTurma " +
46
                        ",sum (case when u.usar = true AND rR.resposta is null then 1 else 0 end) AS porResponder " +
47
                        ",sum (case when u.usar = true AND rR.resposta is null then 1 else 0 end) AS porResponder " +
47
                        ",sum (case when u.usar = true AND rR.resposta is null then 0 else 1 end) AS respostasObtidas " +
48
                        ",sum (case when u.usar = true AND rR.resposta is null then 0 else 1 end) AS respostasObtidas " +
48
                        ",count(distinct a.aluno)" +
49
                        ",count(distinct a.aluno)" +
-
 
50
                        ",u.id" +
49
                        " from u in class " + QuestionarioPedagogicoUnidadeCurricularAfeta.class.getName() + " " +
51
                        " from u in class " + QuestionarioPedagogicoUnidadeCurricularAfeta.class.getName() + " " +
50
                        " join u.cursoAfeto c " +
52
                        " join u.cursoAfeto c " +
51
                        " join u.tipologiasRequisitadas t " +
53
                        " join u.tipologiasRequisitadas t " +
52
                        " join t.alunosRequisitados a " +
54
                        " join t.alunosRequisitados a " +
53
                        " join a.respostaRequisitada rR " +
55
                        " join a.respostaRequisitada rR " +
Line 66... Line 68...
66
            <th>Unidade</th>
68
            <th>Unidade</th>
67
            <th>Código Docente</th>
69
            <th>Código Docente</th>
68
            <th class="filter-name filter-select">Docente</th>
70
            <th class="filter-name filter-select">Docente</th>
69
            <th>Tipologia</th>
71
            <th>Tipologia</th>
70
            <th>Turma</th>
72
            <th>Turma</th>
71
            <th>Por Responder</th>
73
            <th>Por Resp.</th>
72
            <th>Respondidos</th>
74
            <th>Resp.</th>
73
            <th>Estudantes</th>
75
            <th>Alunos</th>
-
 
76
            <th></th>
74
        </thead>
77
        </thead>
75
        <tbody>
78
        <tbody>
76
    <%
79
    <%
77
 
80
 
78
        for(Object[] tipologia: tipologias)
81
        for(Object[] tipologia: tipologias)
Line 86... Line 89...
86
            <td><%=tipologia[4]%></td>
89
            <td><%=tipologia[4]%></td>
87
            <td><%=tipologia[5]%></td>
90
            <td><%=tipologia[5]%></td>
88
            <td><label class="label label-danger" style="font-size: 1em"><%=tipologia[6]%></label></td>
91
            <td><label class="label label-danger" style="font-size: 1em"><%=tipologia[6]%></label></td>
89
            <td><label class="label <%=((Long)tipologia[7]) > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=tipologia[7]%></label></td>
92
            <td><label class="label <%=((Long)tipologia[7]) > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=tipologia[7]%></label></td>
90
            <td><label class="label label-info" style="font-size: 1em"><%=tipologia[8]%></label></td>
93
            <td><label class="label label-info" style="font-size: 1em"><%=tipologia[8]%></label></td>
-
 
94
            <td>
-
 
95
                <%
-
 
96
                    Long unidadeId = (Long) tipologia[9];
-
 
97
                    request.setAttribute("unidadeId",unidadeId);
-
 
98
                %>
-
 
99
                <%
-
 
100
                    String nomeCursoEncoded = URLEncoder.encode(tipologia[1] + "(" + tipologia[0] + ")", "ISO-8859-1");
-
 
101
                    request.setAttribute("nomeUnidadeEncoded",nomeCursoEncoded);
-
 
102
                %>
-
 
103
                <html:link styleClass="btn btn-default" action="/user/startQuestionariosPaeMessagePedagogico.do?questionarioId=${Questionario.id}&formDescription=Mensagem para os alunos: ${nomeUnidadeEncoded}&targetDispatch=sendEmailQuestionarioUnidadeAfeta&cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId=${unidadeId}">
-
 
104
                    <span class="glyphicon glyphicon-envelope"> </span>
-
 
105
                </html:link>
-
 
106
            </td>
91
        </tr>
107
        </tr>
92
    <%
108
    <%
93
        }
109
        }
94
    %>
110
    %>
95
        </tbody>
111
        </tbody>