Rev 1426 | Rev 1471 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1409 | jmachado | 1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.Questionario" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioImpl" %> |
||
4 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto" %> |
||
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
6 | <%@ page import="pt.estgp.estgweb.domain.dao.impl.QuestionarioDaoImpl" %> |
||
1426 | jmachado | 7 | <%@ page import="pt.estgp.estgweb.web.form.questionarios.QuestionarioMessage" %> |
8 | <%@ page import="java.net.URLEncoder" %> |
||
1409 | jmachado | 9 | <%@ page import="java.util.List" %> |
10 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
17 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
18 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
||
1426 | jmachado | 19 | <html:errors/> |
20 | <jomm:messages/> |
||
1409 | jmachado | 21 | <% |
22 | String questionarioIdStr = request.getParameter("questionarioId"); |
||
1413 | jmachado | 23 | if(questionarioIdStr == null) |
24 | questionarioIdStr = (String) request.getAttribute("questionarioId"); |
||
25 | if(questionarioIdStr == null) |
||
26 | { |
||
27 | if(request.getAttribute("Questionario")!=null) |
||
28 | { |
||
29 | Questionario quest = (Questionario) request.getAttribute("Questionario"); |
||
30 | questionarioIdStr = quest.getId() + ""; |
||
31 | } |
||
1426 | jmachado | 32 | |
33 | if(request.getAttribute("QuestionarioMessage") != null) |
||
34 | { |
||
35 | questionarioIdStr = "" + ((QuestionarioMessage) request.getAttribute("QuestionarioMessage")).getQuestionarioId(); |
||
36 | } |
||
1413 | jmachado | 37 | } |
38 | |||
1409 | jmachado | 39 | long questionarioId = Long.parseLong(questionarioIdStr); |
40 | |||
41 | AbstractDao.getCurrentSession().beginTransaction(); |
||
42 | |||
43 | QuestionarioImpl questionario = (QuestionarioImpl) DaoFactory.getQuestionarioDaoImpl().load(questionarioId); |
||
44 | questionario.initClearances(UserSession,true); |
||
45 | request.setAttribute("Questionario",questionario); |
||
46 | |||
47 | if(!questionario.isClear(UserSession,QuestionarioImpl.QuestionarioClearancesOperation.QUESTIONARIO_SEE_DASHBOARD.name())) |
||
48 | { |
||
49 | return; //NAO PODE VER O PAINEL |
||
50 | } |
||
51 | else |
||
52 | { |
||
53 | QuestionarioDaoImpl.QuestionarioStatsVars questionarioStatsVars = DaoFactory.getQuestionarioDaoImpl().loadQuestionarioStatsPedagogico(questionarioId); |
||
54 | %> |
||
55 | <div class="col-sm-6"> |
||
56 | <div class="alert alert-info"> |
||
57 | <%=questionarioStatsVars.respostasObtidas%> respostas obtidas de <%=questionarioStatsVars.respostasRequisitadas%> possiveis |
||
58 | </div> |
||
59 | </div> |
||
60 | <div class="col-sm-6"> |
||
61 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_STOP_PROCESSEMENT"> |
||
62 | <button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirm-ModalGeneric" data-message="Esta operação irá parar o questionário e os alunos não poderão responder!! Tem a certeza que deseja prosseguir?" data-href="<%=request.getContextPath()%>/user/questionariosPaeYearSemestre.do?dispatch=stopProcessement&questionarioId=${Questionario.id}"><span class="icon icon-stop"> </span> Parar Questionário</button> |
||
63 | </baco:clearOperation> |
||
1413 | jmachado | 64 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_START_PROCESSEMENT"> |
65 | <button class="btn btn-success" type="button" data-toggle="modal" data-target="#confirm-ModalGeneric" data-message="Esta operação irá abrir o questionário para os alunos!! Tem a certeza que deseja prosseguir?" data-href="<%=request.getContextPath()%>/user/questionariosPaeYearSemestre.do?dispatch=startProcessement&questionarioId=${Questionario.id}"><span class="icon icon-play"> </span> Iniciar Questionário</button> |
||
66 | </baco:clearOperation> |
||
1426 | jmachado | 67 | |
68 | <td> |
||
69 | <% |
||
70 | String descEncoded = URLEncoder.encode(questionario.getDescription(),"ISO-8859-1"); |
||
71 | request.setAttribute("descEncoded",descEncoded); |
||
72 | %> |
||
73 | <html:link styleClass="btn btn-default" action="/user/startQuestionariosPaeMessagePedagogico.do?questionarioId=${Questionario.id}&formDescription=Mensagem para os alunos: ${descEncoded}&targetDispatch=sendEmailQuestionario&cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId=${Questionario.id}"> |
||
74 | <span class="glyphicon glyphicon-envelope"> </span> Enviar para todos os Cursos |
||
75 | </html:link> |
||
76 | </td> |
||
77 | |||
78 | <a href="<%=request.getContextPath()%>/user/questionariosPaeMessagePedagogico.do"/> |
||
1409 | jmachado | 79 | </div> |
80 | <div class="col-sm-12"> |
||
81 | <table class="tablesorter-blue"> |
||
82 | <thead> |
||
83 | <th>Cursos Selecionados</th> |
||
84 | <th>Total de Unidades</th> |
||
85 | <th>Unidades Não Selecionadas</th> |
||
86 | <th>Unidades Selecionadas</th> |
||
87 | <th>Turmas Selecionadas</th> |
||
88 | <th>Alunos Selecionados</th> |
||
89 | <th>Professores Selecionados</th> |
||
1426 | jmachado | 90 | <th>Tipologias Selecionadas</th> |
1434 | jmachado | 91 | <th>Respostas</th> |
1409 | jmachado | 92 | <th>Por Responder</th> |
93 | <th>Respostas Requisitadas</th> |
||
94 | |||
95 | </thead> |
||
96 | <tbody> |
||
97 | <td><%=questionarioStatsVars.cursos%></td> |
||
98 | <td><%=questionarioStatsVars.unidades%></td> |
||
99 | <td><%=questionarioStatsVars.unidades - questionarioStatsVars.unidadesUsadas%></td> |
||
100 | <td><%=questionarioStatsVars.unidadesUsadas%></td> |
||
101 | <td><%=questionarioStatsVars.turmas%></td> |
||
102 | <td><%=questionarioStatsVars.alunosDeUsadas%></td> |
||
103 | <td><%=questionarioStatsVars.profsDeUsadas%></td> |
||
1426 | jmachado | 104 | <td><%=questionarioStatsVars.tipologiasUsadas%></td> |
1409 | jmachado | 105 | <td><label class="label label-success" style="font-size: 1em"><%=questionarioStatsVars.respostasObtidas%></label></td> |
106 | <td><label class="label label-danger" style="font-size: 1em"><%=(questionarioStatsVars.respostasRequisitadas-questionarioStatsVars.respostasObtidas)%></label></td> |
||
107 | <td><label class="label label-info" style="font-size: 1em"><%=questionarioStatsVars.respostasRequisitadas%></label></td> |
||
108 | |||
109 | </tbody> |
||
110 | </table> |
||
111 | </div> |
||
112 | <div class="col-sm-12"> |
||
113 | <table class="tablesorterfiltered"> |
||
114 | <thead> |
||
115 | <th class="filter-name filter-select">Instituição</th> |
||
116 | <th>Código</th> |
||
117 | <th>Curso</th> |
||
118 | <th>Unidades</th> |
||
1434 | jmachado | 119 | <th>Alunos</th> |
120 | <th>Respostas</th> |
||
1409 | jmachado | 121 | <th>Por Responder</th> |
122 | <th>Total</th> |
||
1426 | jmachado | 123 | <th></th> |
1409 | jmachado | 124 | </thead> |
125 | <tbody> |
||
126 | <% |
||
127 | List<Long> cursos = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().findCursosAfetosIds(questionarioId); |
||
128 | for(Long cursoId: cursos) |
||
129 | { |
||
130 | QuestionarioPedagogicoCursoAfeto cursoAfeto = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().load(cursoId); |
||
131 | long respostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countRespostas(cursoId); |
||
1423 | jmachado | 132 | long alunosComRespostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countAlunosComRespostas(cursoId); |
1409 | jmachado | 133 | request.setAttribute("cursoAfeto",cursoAfeto); |
134 | %> |
||
135 | <tr> |
||
136 | <td><%=cursoAfeto.getNomeInstituicao()%></td> |
||
137 | <td><%=cursoAfeto.getCodigoCurso()%></td> |
||
138 | <td><%=cursoAfeto.getNome()%></td> |
||
139 | <td> |
||
140 | <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/questionarioCourseDashBoard.jsp?cursoAfetoId=${cursoAfeto.id}" data-title="Acompanhamento de questionários do curso (${cursoAfeto.codigoCurso}) ${cursoAfeto.nome} da ${cursoAfeto.nomeInstituicao})" data-toggle="modal" data-target="#modalAjaxRequest"> |
||
141 | <%=cursoAfeto.getUnidadesAfetas().size()%> |
||
142 | </a> |
||
143 | |||
144 | </td> |
||
1423 | jmachado | 145 | <td><label class="label <%=alunosComRespostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=alunosComRespostasCurso%></label></td> |
1412 | jmachado | 146 | <td><label class="label <%=respostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=respostasCurso%></label></td> |
1409 | jmachado | 147 | <td><label class="label label-danger" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas() - respostasCurso%></label></td> |
148 | <td><label class="label label-info" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas()%></label></td> |
||
1426 | jmachado | 149 | <td> |
150 | <% |
||
151 | String nomeCursoEncoded = URLEncoder.encode(cursoAfeto.getNome(),"ISO-8859-1"); |
||
152 | request.setAttribute("nomeCursoEncoded",nomeCursoEncoded); |
||
153 | %> |
||
154 | <html:link styleClass="btn btn-default" action="/user/startQuestionariosPaeMessagePedagogico.do?questionarioId=${Questionario.id}&formDescription=Mensagem para os alunos do curso ${nomeCursoEncoded} (${cursoAfeto.codigoCurso})&targetDispatch=sendEmailQuestionarioCursoAfeto&cursoAfetoOrUnidadeAfetaOrQuestionarioAfetoId=${cursoAfeto.id}"> |
||
155 | <span class="glyphicon glyphicon-envelope"> </span> |
||
156 | </html:link> |
||
157 | </td> |
||
1409 | jmachado | 158 | </tr> |
159 | <% |
||
160 | } |
||
161 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
162 | %> |
||
163 | </tbody> |
||
164 | </table> |
||
165 | |||
166 | </div> |
||
167 | <% |
||
168 | }//FIM DE PAINEL CLEARED |
||
169 | %> |