Rev 1413 | Rev 1426 | 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" %> |
||
7 | <%@ page import="java.util.List" %> |
||
8 | <%@ page import="pt.estgp.estgweb.web.exceptions.NotAuthorizedException" %> |
||
9 | <%@ 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-nested.tld" prefix="nested" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
17 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
||
18 | |||
19 | <% |
||
20 | String questionarioIdStr = request.getParameter("questionarioId"); |
||
1413 | jmachado | 21 | if(questionarioIdStr == null) |
22 | questionarioIdStr = (String) request.getAttribute("questionarioId"); |
||
23 | if(questionarioIdStr == null) |
||
24 | { |
||
25 | if(request.getAttribute("Questionario")!=null) |
||
26 | { |
||
27 | Questionario quest = (Questionario) request.getAttribute("Questionario"); |
||
28 | questionarioIdStr = quest.getId() + ""; |
||
29 | } |
||
30 | } |
||
31 | |||
1409 | jmachado | 32 | long questionarioId = Long.parseLong(questionarioIdStr); |
33 | |||
34 | AbstractDao.getCurrentSession().beginTransaction(); |
||
35 | |||
36 | QuestionarioImpl questionario = (QuestionarioImpl) DaoFactory.getQuestionarioDaoImpl().load(questionarioId); |
||
37 | questionario.initClearances(UserSession,true); |
||
38 | request.setAttribute("Questionario",questionario); |
||
39 | |||
40 | if(!questionario.isClear(UserSession,QuestionarioImpl.QuestionarioClearancesOperation.QUESTIONARIO_SEE_DASHBOARD.name())) |
||
41 | { |
||
42 | return; //NAO PODE VER O PAINEL |
||
43 | } |
||
44 | else |
||
45 | { |
||
46 | QuestionarioDaoImpl.QuestionarioStatsVars questionarioStatsVars = DaoFactory.getQuestionarioDaoImpl().loadQuestionarioStatsPedagogico(questionarioId); |
||
47 | %> |
||
48 | <div class="col-sm-6"> |
||
49 | <div class="alert alert-info"> |
||
50 | <%=questionarioStatsVars.respostasObtidas%> respostas obtidas de <%=questionarioStatsVars.respostasRequisitadas%> possiveis |
||
51 | </div> |
||
52 | </div> |
||
53 | <div class="col-sm-6"> |
||
54 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_STOP_PROCESSEMENT"> |
||
55 | <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> |
||
56 | </baco:clearOperation> |
||
1413 | jmachado | 57 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_START_PROCESSEMENT"> |
58 | <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> |
||
59 | </baco:clearOperation> |
||
1409 | jmachado | 60 | </div> |
61 | <div class="col-sm-12"> |
||
62 | <table class="tablesorter-blue"> |
||
63 | <thead> |
||
64 | <th>Cursos Selecionados</th> |
||
65 | <th>Total de Unidades</th> |
||
66 | <th>Unidades Não Selecionadas</th> |
||
67 | <th>Unidades Selecionadas</th> |
||
68 | <th>Turmas Selecionadas</th> |
||
69 | <th>Alunos Selecionados</th> |
||
70 | <th>Professores Selecionados</th> |
||
71 | <th>Respondidos</th> |
||
72 | <th>Por Responder</th> |
||
73 | <th>Respostas Requisitadas</th> |
||
74 | |||
75 | </thead> |
||
76 | <tbody> |
||
77 | <td><%=questionarioStatsVars.cursos%></td> |
||
78 | <td><%=questionarioStatsVars.unidades%></td> |
||
79 | <td><%=questionarioStatsVars.unidades - questionarioStatsVars.unidadesUsadas%></td> |
||
80 | <td><%=questionarioStatsVars.unidadesUsadas%></td> |
||
81 | <td><%=questionarioStatsVars.turmas%></td> |
||
82 | <td><%=questionarioStatsVars.alunosDeUsadas%></td> |
||
83 | <td><%=questionarioStatsVars.profsDeUsadas%></td> |
||
84 | <td><label class="label label-success" style="font-size: 1em"><%=questionarioStatsVars.respostasObtidas%></label></td> |
||
85 | <td><label class="label label-danger" style="font-size: 1em"><%=(questionarioStatsVars.respostasRequisitadas-questionarioStatsVars.respostasObtidas)%></label></td> |
||
86 | <td><label class="label label-info" style="font-size: 1em"><%=questionarioStatsVars.respostasRequisitadas%></label></td> |
||
87 | |||
88 | </tbody> |
||
89 | </table> |
||
90 | </div> |
||
91 | <div class="col-sm-12"> |
||
92 | <table class="tablesorterfiltered"> |
||
93 | <thead> |
||
94 | <th class="filter-name filter-select">Instituição</th> |
||
95 | <th>Código</th> |
||
96 | <th>Curso</th> |
||
97 | <th>Unidades</th> |
||
1423 | jmachado | 98 | <th>Alunos Que Responderam</th> |
1409 | jmachado | 99 | <th>Respondidos</th> |
100 | <th>Por Responder</th> |
||
101 | <th>Total</th> |
||
102 | </thead> |
||
103 | <tbody> |
||
104 | <% |
||
105 | List<Long> cursos = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().findCursosAfetosIds(questionarioId); |
||
106 | for(Long cursoId: cursos) |
||
107 | { |
||
108 | QuestionarioPedagogicoCursoAfeto cursoAfeto = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().load(cursoId); |
||
109 | long respostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countRespostas(cursoId); |
||
1423 | jmachado | 110 | long alunosComRespostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countAlunosComRespostas(cursoId); |
1409 | jmachado | 111 | request.setAttribute("cursoAfeto",cursoAfeto); |
112 | %> |
||
113 | <tr> |
||
114 | <td><%=cursoAfeto.getNomeInstituicao()%></td> |
||
115 | <td><%=cursoAfeto.getCodigoCurso()%></td> |
||
116 | <td><%=cursoAfeto.getNome()%></td> |
||
117 | <td> |
||
118 | <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"> |
||
119 | <%=cursoAfeto.getUnidadesAfetas().size()%> |
||
120 | </a> |
||
121 | |||
122 | </td> |
||
1423 | jmachado | 123 | <td><label class="label <%=alunosComRespostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=alunosComRespostasCurso%></label></td> |
1412 | jmachado | 124 | <td><label class="label <%=respostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=respostasCurso%></label></td> |
1409 | jmachado | 125 | <td><label class="label label-danger" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas() - respostasCurso%></label></td> |
126 | <td><label class="label label-info" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas()%></label></td> |
||
127 | </tr> |
||
128 | <% |
||
129 | } |
||
130 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
131 | %> |
||
132 | </tbody> |
||
133 | </table> |
||
134 | |||
135 | </div> |
||
136 | <% |
||
137 | }//FIM DE PAINEL CLEARED |
||
138 | %> |