Rev 1626 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1626 | Rev 1754 | ||
---|---|---|---|
1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.CourseUnitImpl" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.CourseUnitImpl" %> |
3 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioImpl" %> |
3 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioImpl" %> |
4 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto" %> |
4 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
6 | <%@ page import="pt.estgp.estgweb.domain.views.CourseView" %> |
6 | <%@ page import="pt.estgp.estgweb.domain.views.CourseView" %> |
7 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
7 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
8 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
8 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
9 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
9 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
10 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
10 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
11 | <%@ page import="java.util.List" %> |
11 | <%@ page import="java.util.List" %> |
12 | <%@ page import="pt.estgp.estgweb.utils.DynamicArrayList" %> |
12 | <%@ page import="pt.estgp.estgweb.utils.DynamicArrayList" %> |
13 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
13 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
15 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
15 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
16 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
16 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
17 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
17 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
18 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
18 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
19 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
19 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
20 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
20 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
21 | <script> |
21 | <script> |
22 | ping(); |
22 | ping(); |
23 | </script> |
23 | </script> |
24 | <% |
24 | <% |
25 | String qId = request.getParameter("questionarioId"); |
25 | String qId = request.getParameter("questionarioId"); |
26 | if(qId == null) |
26 | if(qId == null) |
27 | qId = request.getParameter("questionario.id"); |
27 | qId = request.getParameter("questionario.id"); |
28 | Long questionarioId = Long.parseLong(qId); |
28 | Long questionarioId = Long.parseLong(qId); |
29 | 29 | ||
30 | IServiceManager sm = ServiceManager.getInstance(); |
30 | IServiceManager sm = ServiceManager.getInstance(); |
31 | String[] names = {"questionarioId"}; |
31 | String[] names = {"questionarioId"}; |
32 | Object[] args = {questionarioId}; |
32 | Object[] args = {questionarioId}; |
33 | QuestionarioImpl questionario = (QuestionarioImpl) sm.execute(RequestUtils.getRequester(request, response),"loadQuestionarioAdmin",args,names); |
33 | QuestionarioImpl questionario = (QuestionarioImpl) sm.execute(RequestUtils.getRequester(request, response),"loadQuestionarioAdmin",args,names); |
34 | 34 | ||
35 | 35 | ||
36 | request.setAttribute("Questionario", questionario); |
36 | request.setAttribute("Questionario", questionario); |
37 | 37 | ||
38 | List<String> institutionCodes = ConfigProperties.getListValues("questionario.instituition."); |
38 | List<String> institutionCodes = ConfigProperties.getListValues("questionario.instituition."); |
39 | 39 | ||
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | %> |
43 | %> |
44 | <jsp:useBean id="Questionario" type="pt.estgp.estgweb.domain.QuestionarioImpl" scope="request"/> |
44 | <jsp:useBean id="Questionario" type="pt.estgp.estgweb.domain.QuestionarioImpl" scope="request"/> |
45 | <jsp:include page="../headerQuestionarios.jsp"/> |
45 | <jsp:include page="../headerQuestionarios.jsp"/> |
46 | 46 | ||
47 | <jsp:include page="/layout/pleaseWait.jsp"/> |
47 | <jsp:include page="/layout/pleaseWait.jsp"/> |
48 | 48 | ||
49 | <% |
49 | <% |
50 | AbstractDao.getCurrentSession().beginTransaction(); |
50 | AbstractDao.getCurrentSession().beginTransaction(); |
51 | %> |
51 | %> |
52 | 52 | ||
53 | <html:form action="/user/questionariosPaeSelectCourses"> |
53 | <html:form action="/user/questionariosPaeSelectCourses"> |
54 | <html:hidden property="questionario.id" value="${Questionario.id}"/> |
54 | <html:hidden property="questionario.id" value="${Questionario.id}"/> |
55 | <input type="hidden" name="dispatch" value="updateTipologias"/> |
55 | <input type="hidden" name="dispatch" value="updateTipologias"/> |
56 | 56 | ||
57 | <jsp:useBean id="QuestionarioForm" type="pt.estgp.estgweb.web.form.questionarios.QuestionarioForm" scope="request"/> |
57 | <jsp:useBean id="QuestionarioForm" type="pt.estgp.estgweb.web.form.questionarios.QuestionarioForm" scope="request"/> |
58 | <% |
58 | <% |
59 | //Variavel iniciada no serviço de load por chamada do IAnswerProcessor respectivo para inicializar |
59 | //Variavel iniciada no serviço de load por chamada do IAnswerProcessor respectivo para inicializar |
60 | //as variaveis especificas |
60 | //as variaveis especificas |
61 | List<QuestionarioPedagogicoCursoAfeto> cursosAfetados = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().find(questionario.getId()); |
61 | List<QuestionarioPedagogicoCursoAfeto> cursosAfetados = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().find(questionario.getId()); |
62 | QuestionarioForm.setCursosAfetos(cursosAfetados); |
62 | QuestionarioForm.setCursosAfetos(cursosAfetados); |
63 | %> |
63 | %> |
64 | <div class="container-fluid"> |
64 | <div class="container-fluid"> |
65 | 65 | ||
66 | <style> |
66 | <style> |
67 | td.unidades |
67 | td.unidades |
68 | { |
68 | { |
69 | background-color: dimgray !important; |
69 | background-color: dimgray !important; |
70 | } |
70 | } |
71 | 71 | ||
72 | td.tipologias |
72 | td.tipologias |
73 | { |
73 | { |
74 | background-color: #baffdc !important; |
74 | background-color: #baffdc !important; |
75 | } |
75 | } |
76 | 76 | ||
77 | td.obsContent |
77 | td.obsContent |
78 | { |
78 | { |
79 | background-color: #ffda48 !important; |
79 | background-color: #ffda48 !important; |
80 | } |
80 | } |
81 | td.vistaChecked |
81 | td.vistaChecked |
82 | { |
82 | { |
83 | background-color: #20ff05 !important; |
83 | background-color: #20ff05 !important; |
84 | } |
84 | } |
85 | td.vistaNotChecked |
85 | td.vistaNotChecked |
86 | { |
86 | { |
87 | background-color: gray !important; |
87 | background-color: gray !important; |
88 | } |
88 | } |
89 | td.usarNotChecked |
89 | td.usarNotChecked,td.usarOlapNotChecked |
90 | { |
90 | { |
91 | background-color: red !important; |
91 | background-color: red !important; |
92 | } |
92 | } |
93 | td.usarChecked |
93 | td.usarChecked,td.usarOlapChecked |
94 | { |
94 | { |
95 | 95 | ||
96 | } |
96 | } |
97 | 97 | ||
- | 98 | ||
98 | 99 | ||
99 | @keyframes waitPost { |
100 | @keyframes waitPost { |
100 | from { opacity: 1; } |
101 | from { opacity: 1; } |
101 | to { opacity: 0; } |
102 | to { opacity: 0; } |
102 | } |
103 | } |
103 | td.waitPost |
104 | td.waitPost |
104 | { |
105 | { |
105 | background-color: yellow !important; |
106 | background-color: yellow !important; |
106 | animation: waitPost 0.5s cubic-bezier(.2, 0, 1, 1) infinite alternate; |
107 | animation: waitPost 0.5s cubic-bezier(.2, 0, 1, 1) infinite alternate; |
107 | 108 | ||
108 | /* |
109 | /* |
109 | -webkit-animation-name: waitPost !important; |
110 | -webkit-animation-name: waitPost !important; |
110 | -webkit-animation-iteration-count: infinite !important; |
111 | -webkit-animation-iteration-count: infinite !important; |
111 | -webkit-animation-timing-function: cubic-bezier(.5, 0, 1, 1) !important; |
112 | -webkit-animation-timing-function: cubic-bezier(.5, 0, 1, 1) !important; |
112 | -webkit-animation-duration: 1.7s !important;*/ |
113 | -webkit-animation-duration: 1.7s !important;*/ |
113 | 114 | ||
114 | } |
115 | } |
115 | 116 | ||
116 | </style> |
117 | </style> |
117 | 118 | ||
118 | <div class="panel panel-primary"> |
119 | <div class="panel panel-primary"> |
119 | <div class="panel-heading"> |
120 | <div class="panel-heading"> |
120 | Selecção de Cursos para o Questionário ${Questionario.id} - Periodo: ${Questionario.semestre} de ${Questionario.year} |
121 | Selecção de Cursos para o Questionário ${Questionario.id} - Periodo: ${Questionario.semestre} de ${Questionario.year} |
121 | 122 | ||
122 | <a class="btn btn-default" href="#" data-toggle="modal" data-target="#modalHelpQuestionarioTipologias"> |
123 | <a class="btn btn-default" href="#" data-toggle="modal" data-target="#modalHelpQuestionarioTipologias"> |
123 | <span class="glyphicon glyphicon-question-sign"></span> Ajuda sobre Tipologias |
124 | <span class="glyphicon glyphicon-question-sign"></span> Ajuda sobre Tipologias |
124 | </a> |
125 | </a> |
125 | </div> |
126 | </div> |
126 | <div class="panel-body"> |
127 | <div class="panel-body"> |
127 | <html:errors/> |
128 | <html:errors/> |
128 | <jomm:messages/> |
129 | <jomm:messages/> |
129 | 130 | ||
130 | 131 | ||
131 | <div class="baco-please-wait-target"> |
132 | <div class="baco-please-wait-target"> |
132 | 133 | ||
133 | <ul class="nav nav-tabs"> |
134 | <ul class="nav nav-tabs"> |
134 | <li id="institutionsSeparatorsGerarFinal"><a href="javascript:showInstitutionCode('GerarFinal')"><strong><u>Operações</u></strong></a></li> |
135 | <li id="institutionsSeparatorsGerarFinal"><a href="javascript:showInstitutionCode('GerarFinal')"><strong><u>Operações</u></strong></a></li> |
135 | <% |
136 | <% |
136 | for(String institutionCode: institutionCodes) |
137 | for(String institutionCode: institutionCodes) |
137 | { |
138 | { |
138 | String institutionName = ConfigProperties.getProperty("institution.code." + institutionCode); |
139 | String institutionName = ConfigProperties.getProperty("institution.code." + institutionCode); |
139 | %> |
140 | %> |
140 | <li id="institutionsSeparators<%=institutionCode%>"><a href="javascript:showInstitutionCode('<%=institutionCode%>')"><%=institutionName%></a></li> |
141 | <li id="institutionsSeparators<%=institutionCode%>"><a href="javascript:showInstitutionCode('<%=institutionCode%>')"><%=institutionName%></a></li> |
141 | <% |
142 | <% |
142 | } |
143 | } |
143 | %> |
144 | %> |
144 | 145 | ||
145 | </ul> |
146 | </ul> |
146 | <script> |
147 | <script> |
147 | $(document).ready( |
148 | $(document).ready( |
148 | function(){ |
149 | function(){ |
149 | showInstitutionCode('GerarFinal'); |
150 | showInstitutionCode('GerarFinal'); |
150 | 151 | ||
151 | 152 | ||
152 | <baco:notClearOperation name="Questionario" op="QUESTIONARIO_CHANGE_TIPOLOGIES"> |
153 | <baco:notClearOperation name="Questionario" op="QUESTIONARIO_CHANGE_TIPOLOGIES"> |
153 | $(".checkAll").remove(); |
154 | $(".checkAll").remove(); |
154 | </baco:notClearOperation> |
155 | </baco:notClearOperation> |
155 | 156 | ||
156 | $(".courseCheck").attr("data-toogle","toggle"); |
157 | $(".courseCheck").attr("data-toogle","toggle"); |
157 | $('.courseCheck').bootstrapToggle({ |
158 | $('.courseCheck').bootstrapToggle({ |
158 | on: 'Tipologias', |
159 | on: 'Tipologias', |
159 | off: 'Simples' |
160 | off: 'Simples' |
160 | }); |
161 | }); |
161 | 162 | ||
162 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_CHANGE_TIPOLOGIES"> |
163 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_CHANGE_TIPOLOGIES"> |
163 | $('.checkAll').bootstrapToggle({ |
164 | $('.checkAll').bootstrapToggle({ |
164 | on: 'Tipologias', |
165 | on: 'Tipologias', |
165 | off: 'Simples' |
166 | off: 'Simples' |
166 | }); |
167 | }); |
167 | </baco:clearOperation> |
168 | </baco:clearOperation> |
168 | <baco:notClearOperation name="Questionario" op="QUESTIONARIO_CHANGE_TIPOLOGIES"> |
169 | <baco:notClearOperation name="Questionario" op="QUESTIONARIO_CHANGE_TIPOLOGIES"> |
169 | $(".courseCheck").prop("disabled",true); |
170 | $(".courseCheck").prop("disabled",true); |
170 | $("#updateTipologiasButton").prop("disabled",true); |
171 | $("#updateTipologiasButton").prop("disabled",true); |
171 | </baco:notClearOperation> |
172 | </baco:notClearOperation> |
172 | } |
173 | } |
173 | 174 | ||
174 | 175 | ||
175 | ); |
176 | ); |
176 | 177 | ||
177 | function selectAll(code,source) |
178 | function selectAll(code,source) |
178 | { |
179 | { |
179 | 180 | ||
180 | $('#institution' + code).find('.courseCheck').each( |
181 | $('#institution' + code).find('.courseCheck').each( |
181 | function() |
182 | function() |
182 | { |
183 | { |
183 | if($(source).prop("checked")) |
184 | if($(source).prop("checked")) |
184 | $(this).bootstrapToggle('on'); |
185 | $(this).bootstrapToggle('on'); |
185 | else |
186 | else |
186 | $(this).bootstrapToggle('off'); |
187 | $(this).bootstrapToggle('off'); |
187 | }); |
188 | }); |
188 | } |
189 | } |
189 | 190 | ||
190 | 191 | ||
191 | function showInstitutionCode(institutionCode) |
192 | function showInstitutionCode(institutionCode) |
192 | { |
193 | { |
193 | <% |
194 | <% |
194 | for(String institutionCode: institutionCodes) |
195 | for(String institutionCode: institutionCodes) |
195 | { |
196 | { |
196 | %> |
197 | %> |
197 | if(institutionCode == '<%=institutionCode%>') |
198 | if(institutionCode == '<%=institutionCode%>') |
198 | { |
199 | { |
199 | $("#institution<%=institutionCode%>").show(); |
200 | $("#institution<%=institutionCode%>").show(); |
200 | $("#institutionsSeparators<%=institutionCode%>").addClass("active"); |
201 | $("#institutionsSeparators<%=institutionCode%>").addClass("active"); |
201 | } |
202 | } |
202 | else |
203 | else |
203 | { |
204 | { |
204 | $("#institution<%=institutionCode%>").hide(); |
205 | $("#institution<%=institutionCode%>").hide(); |
205 | $("#institutionsSeparators<%=institutionCode%>").removeClass("active"); |
206 | $("#institutionsSeparators<%=institutionCode%>").removeClass("active"); |
206 | } |
207 | } |
207 | <% |
208 | <% |
208 | } |
209 | } |
209 | %> |
210 | %> |
210 | if(institutionCode == 'GerarFinal') |
211 | if(institutionCode == 'GerarFinal') |
211 | { |
212 | { |
212 | $("#institutionGerarFinal").show(); |
213 | $("#institutionGerarFinal").show(); |
213 | $("#institutionsSeparatorsGerarFinal").addClass("active"); |
214 | $("#institutionsSeparatorsGerarFinal").addClass("active"); |
214 | } |
215 | } |
215 | else |
216 | else |
216 | { |
217 | { |
217 | $("#institutionGerarFinal").hide(); |
218 | $("#institutionGerarFinal").hide(); |
218 | $("#institutionsSeparatorsGerarFinal").removeClass("active"); |
219 | $("#institutionsSeparatorsGerarFinal").removeClass("active"); |
219 | } |
220 | } |
220 | } |
221 | } |
221 | 222 | ||
222 | 223 | ||
223 | function setUnidadeAfetaVar(cursoAfetoId,unidadeAfetaId,op,val,targetObject) |
224 | function setUnidadeAfetaVar(cursoAfetoId,unidadeAfetaId,op,val,targetObject) |
224 | { |
225 | { |
225 | $(targetObject).addClass("waitPost"); |
226 | $(targetObject).addClass("waitPost"); |
226 | $.post("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/setUnidadeAfetaVar.jsp", |
227 | $.post("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/setUnidadeAfetaVar.jsp", |
227 | { |
228 | { |
228 | "questionarioId" : ${Questionario.id}, |
229 | "questionarioId" : ${Questionario.id}, |
229 | "unidadeAfetaId":unidadeAfetaId, |
230 | "unidadeAfetaId":unidadeAfetaId, |
230 | "op":op, |
231 | "op":op, |
231 | "val": val |
232 | "val": val |
232 | }, |
233 | }, |
233 | function(data, textStatus) |
234 | function(data, textStatus) |
234 | { |
235 | { |
235 | if(data.error) |
236 | if(data.error) |
236 | { |
237 | { |
237 | alert(data.error); |
238 | alert(data.error); |
238 | } |
239 | } |
239 | else if(data.ok == "ok") |
240 | else if(data.ok == "ok") |
240 | { |
241 | { |
241 | $(targetObject).removeClass("waitPost"); |
242 | $(targetObject).removeClass("waitPost"); |
242 | reloadCursoStats(cursoAfetoId); |
243 | reloadCursoStats(cursoAfetoId); |
243 | } |
244 | } |
244 | }, |
245 | }, |
245 | "json"); |
246 | "json"); |
246 | } |
247 | } |
247 | 248 | ||
248 | //TODO AQUI tirar o metodo daqui e meter no pedagogicoCoursesCheck |
249 | //TODO AQUI tirar o metodo daqui e meter no pedagogicoCoursesCheck |
249 | function setTipologiaAfetaVar(checkObj,cursoAfetoId,unidadeAfetaId,docente,turma,cdTipo) |
250 | function setTipologiaAfetaVar(checkObj,cursoAfetoId,unidadeAfetaId,docente,turma,cdTipo) |
250 | { |
251 | { |
251 | targetObject = $(checkObj).closest("td"); |
252 | targetObject = $(checkObj).closest("td"); |
252 | var val =$(checkObj).prop("checked") ? "true" : "false"; |
253 | var val =$(checkObj).prop("checked") ? "true" : "false"; |
253 | var op = "excludeTipologia"; |
254 | var op = "excludeTipologia"; |
254 | $(targetObject).addClass("waitPost"); |
255 | $(targetObject).addClass("waitPost"); |
255 | $.post("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/setUnidadeAfetaVar.jsp", |
256 | $.post("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/setUnidadeAfetaVar.jsp", |
256 | { |
257 | { |
257 | "questionarioId" : ${Questionario.id}, |
258 | "questionarioId" : ${Questionario.id}, |
258 | "unidadeAfetaId":unidadeAfetaId, |
259 | "unidadeAfetaId":unidadeAfetaId, |
259 | "docente":docente, |
260 | "docente":docente, |
260 | "turma":turma, |
261 | "turma":turma, |
261 | "cdTipologia":cdTipo, |
262 | "cdTipologia":cdTipo, |
262 | "op":op, |
263 | "op":op, |
263 | "val": val |
264 | "val": val |
264 | }, |
265 | }, |
265 | function(data, textStatus) |
266 | function(data, textStatus) |
266 | { |
267 | { |
267 | if(data.error) |
268 | if(data.error) |
268 | { |
269 | { |
269 | alert(data.error); |
270 | alert(data.error); |
270 | } |
271 | } |
271 | else if(data.ok == "ok") |
272 | else if(data.ok == "ok") |
272 | { |
273 | { |
273 | $(targetObject).removeClass("waitPost"); |
274 | $(targetObject).removeClass("waitPost"); |
274 | reloadCursoStats(cursoAfetoId); |
275 | reloadCursoStats(cursoAfetoId); |
275 | } |
276 | } |
276 | }, |
277 | }, |
277 | "json"); |
278 | "json"); |
278 | } |
279 | } |
279 | 280 | ||
280 | function reloadCursoStats(cursoAfetoId) |
281 | function reloadCursoStats(cursoAfetoId) |
281 | { |
282 | { |
282 | 283 | ||
283 | $.getJSON("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/courseInfoJson.jsp?cursoAfetoId="+cursoAfetoId, |
284 | $.getJSON("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/courseInfoJson.jsp?cursoAfetoId="+cursoAfetoId, |
284 | function(dataJson) |
285 | function(dataJson) |
285 | { |
286 | { |
286 | 287 | ||
287 | var porVer = dataJson.porVer + " "; |
288 | var porVer = dataJson.porVer + " "; |
288 | if(dataJson.porVer > 0) |
289 | if(dataJson.porVer > 0) |
289 | { |
290 | { |
290 | porVer += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
291 | porVer += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
291 | } |
292 | } |
292 | $("#cursoAfetoRow" + cursoAfetoId + " .porVerCount").html(porVer); |
293 | $("#cursoAfetoRow" + cursoAfetoId + " .porVerCount").html(porVer); |
293 | 294 | ||
294 | var porVerProfs = dataJson.porVerProfs + " "; |
295 | var porVerProfs = dataJson.porVerProfs + " "; |
295 | if(dataJson.porVerProfs > 0) |
296 | if(dataJson.porVerProfs > 0) |
296 | { |
297 | { |
297 | porVerProfs += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
298 | porVerProfs += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
298 | } |
299 | } |
299 | $("#cursoAfetoRow" + cursoAfetoId + " .porVerProfsCount").html(porVerProfs); |
300 | $("#cursoAfetoRow" + cursoAfetoId + " .porVerProfsCount").html(porVerProfs); |
300 | 301 | ||
301 | 302 | ||
302 | var marcadas = dataJson.marcadas + " "; |
303 | var marcadas = dataJson.marcadas + " "; |
303 | if(dataJson.marcadas > 0) |
304 | if(dataJson.marcadas > 0) |
304 | { |
305 | { |
305 | marcadas += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
306 | marcadas += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
306 | } |
307 | } |
307 | $("#cursoAfetoRow" + cursoAfetoId + " .marcadasCount").html(marcadas); |
308 | $("#cursoAfetoRow" + cursoAfetoId + " .marcadasCount").html(marcadas); |
308 | 309 | ||
309 | var observadas = dataJson.observadas + " "; |
310 | var observadas = dataJson.observadas + " "; |
310 | if(dataJson.observadas > 0) |
311 | if(dataJson.observadas > 0) |
311 | { |
312 | { |
312 | observadas += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
313 | observadas += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
313 | } |
314 | } |
314 | $("#cursoAfetoRow" + cursoAfetoId + " .observadasCount").html(observadas); |
315 | $("#cursoAfetoRow" + cursoAfetoId + " .observadasCount").html(observadas); |
315 | 316 | ||
316 | var naoUsadas = dataJson.naoUsadas + " "; |
317 | var naoUsadas = dataJson.naoUsadas + " "; |
317 | if(dataJson.naoUsadas > 0) |
318 | if(dataJson.naoUsadas > 0) |
318 | { |
319 | { |
319 | naoUsadas += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
320 | naoUsadas += "<span class=\"glyphicon glyphicon-alert\"></span>"; |
320 | } |
321 | } |
321 | $("#cursoAfetoRow" + cursoAfetoId + " .naoUsadasCount").html(naoUsadas) |
322 | $("#cursoAfetoRow" + cursoAfetoId + " .naoUsadasCount").html(naoUsadas) |
322 | 323 | ||
323 | //$("#cursoAfetoRow" + cursoAfetoId + " .unidadesCount").html(dataJson.unidades); |
324 | //$("#cursoAfetoRow" + cursoAfetoId + " .unidadesCount").html(dataJson.unidades); |
324 | 325 | ||
325 | /*var tipologiasRequisitadas = dataJson.tipologiasRequisitadas + " "; |
326 | /*var tipologiasRequisitadas = dataJson.tipologiasRequisitadas + " "; |
326 | $("#cursoAfetoRow" + cursoAfetoId + " .tipologiasRequisitadasCount").html(tipologiasRequisitadas); |
327 | $("#cursoAfetoRow" + cursoAfetoId + " .tipologiasRequisitadasCount").html(tipologiasRequisitadas); |
327 | 328 | ||
328 | var respostasRequisitadas = dataJson.respostasRequisitadas + " "; |
329 | var respostasRequisitadas = dataJson.respostasRequisitadas + " "; |
329 | $("#cursoAfetoRow" + cursoAfetoId + " .respostasRequisitadasCount").html(respostasRequisitadas);*/ |
330 | $("#cursoAfetoRow" + cursoAfetoId + " .respostasRequisitadasCount").html(respostasRequisitadas);*/ |
330 | 331 | ||
331 | } |
332 | } |
332 | ); |
333 | ); |
333 | } |
334 | } |
334 | 335 | ||
335 | </script> |
336 | </script> |
336 | 337 | ||
337 | <% |
338 | <% |
338 | for(String institutionCode: institutionCodes) |
339 | for(String institutionCode: institutionCodes) |
339 | { |
340 | { |
340 | String institutionName = ConfigProperties.getProperty("institution.code." + institutionCode); |
341 | String institutionName = ConfigProperties.getProperty("institution.code." + institutionCode); |
341 | 342 | ||
342 | 343 | ||
343 | %> |
344 | %> |
344 | 345 | ||
345 | 346 | ||
346 | <div class="panel panel-default" id="institution<%=institutionCode%>" style="display: none"> |
347 | <div class="panel panel-default" id="institution<%=institutionCode%>" style="display: none"> |
347 | <div class="panel-heading"> |
348 | <div class="panel-heading"> |
348 | Cursos da <%=institutionName%> |
349 | Cursos da <%=institutionName%> |
349 | </div> |
350 | </div> |
350 | <div class="panel-body"> |
351 | <div class="panel-body"> |
351 | <table class="tablesorter-blue"> |
352 | <table class="tablesorter-blue"> |
352 | <thead> |
353 | <thead> |
353 | <tr> |
354 | <tr> |
354 | <th></th> |
355 | <th></th> |
355 | <th>Codigo</th> |
356 | <th>Codigo</th> |
356 | <th>Tipo de Curso</th> |
357 | <th>Tipo de Curso</th> |
357 | <th>Curso</th> |
358 | <th>Curso</th> |
358 | <th>Papel Comissão Curso</th> |
359 | <th>Papel Comissão Curso</th> |
359 | <th data-toggle="tooltip" data-placement="top" title="Unidades Curriculares totais do curso">Unidades <%=questionario.getSemestre()%></th> |
360 | <th data-toggle="tooltip" data-placement="top" title="Unidades Curriculares totais do curso">Unidades <%=questionario.getSemestre()%></th> |
360 | <th data-toggle="tooltip" data-placement="top" title="Unidades Curriculares com Professores Afetadas">U. Afetas</th> |
361 | <th data-toggle="tooltip" data-placement="top" title="Unidades Curriculares com Professores Afetadas">U. Afetas</th> |
361 | <th>Alertas </th> |
362 | <th>Alertas </th> |
362 | <th>Check Alunos</th> |
363 | <th>Check Alunos</th> |
363 | <th>Check Profs</th> |
364 | <th>Check Profs</th> |
364 | <th>Não Usadas</th> |
365 | <th>Não Usadas</th> |
365 | <th>Obses.</th> |
366 | <th>Obses.</th> |
366 | <th>Turmas</th> |
367 | <th>Turmas</th> |
367 | <th data-toggle="tooltip" data-placement="top" title="Tipologias Requisitadas para Responder">Tip. Req</th> |
368 | <th data-toggle="tooltip" data-placement="top" title="Tipologias Requisitadas para Responder">Tip. Req</th> |
368 | <th data-toggle="tooltip" data-placement="top" title="Respostas Requisitadas para Responder">Resp. Req</th> |
369 | <th data-toggle="tooltip" data-placement="top" title="Respostas Requisitadas para Responder">Resp. Req</th> |
369 | 370 | ||
370 | <th class="filter-false" data-sorter="false"> |
371 | <th class="filter-false" data-sorter="false"> |
371 | <input class="checkAll" type="checkbox" onchange="selectAll('<%=institutionCode%>',this)"> |
372 | <input class="checkAll" type="checkbox" onchange="selectAll('<%=institutionCode%>',this)"> |
372 | </th> |
373 | </th> |
373 | 374 | ||
374 | </tr> |
375 | </tr> |
375 | </thead> |
376 | </thead> |
376 | <tbody> |
377 | <tbody> |
377 | <nested:iterate id="cursoAfeto" name="QuestionarioForm" property="cursosAfetos" type="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfetoImpl" scope="request"> |
378 | <nested:iterate id="cursoAfeto" name="QuestionarioForm" property="cursosAfetos" type="pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfetoImpl" scope="request"> |
378 | <% |
379 | <% |
379 | 380 | ||
380 | if(cursoAfeto.getCodigoInstituicao().equals(institutionCode)) |
381 | if(cursoAfeto.getCodigoInstituicao().equals(institutionCode)) |
381 | { |
382 | { |
382 | int turmasSize = DaoFactory.getCourseDaoImpl().countCoursesUnitsTurmas(questionario.getYear(), cursoAfeto.getCourse().getId()); |
383 | int turmasSize = DaoFactory.getCourseDaoImpl().countCoursesUnitsTurmas(questionario.getYear(), cursoAfeto.getCourse().getId()); |
383 | CourseView cv = new CourseView(cursoAfeto.getCourse()); |
384 | CourseView cv = new CourseView(cursoAfeto.getCourse()); |
384 | request.setAttribute("CourseView",cv); |
385 | request.setAttribute("CourseView",cv); |
385 | request.setAttribute("CursoAfeto",cursoAfeto); |
386 | request.setAttribute("CursoAfeto",cursoAfeto); |
386 | int unitsSize = DaoFactory.getCourseDaoImpl().countCoursesUnits(questionario.getYear(), cv.getId(),questionario.getSemestre()); |
387 | int unitsSize = DaoFactory.getCourseDaoImpl().countCoursesUnits(questionario.getYear(), cv.getId(),questionario.getSemestre()); |
387 | 388 | ||
388 | %> |
389 | %> |
389 | <tr id="cursoAfetoRow${cursoAfeto.id}"> |
390 | <tr id="cursoAfetoRow${cursoAfeto.id}"> |
390 | <td> |
391 | <td> |
391 | <script> |
392 | <script> |
392 | $(document).ready( |
393 | $(document).ready( |
393 | 394 | ||
394 | function(){ |
395 | function(){ |
395 | reloadCursoStats("${cursoAfeto.id}"); |
396 | reloadCursoStats("${cursoAfeto.id}"); |
396 | 397 | ||
397 | $('#${CursoAfeto.codigoCurso}unidades').on('shown.bs.collapse', function (e) { |
398 | $('#${CursoAfeto.codigoCurso}unidades').on('shown.bs.collapse', function (e) { |
398 | if ($(this).is(e.target)) { |
399 | if ($(this).is(e.target)) { |
399 | $("#${CursoAfeto.codigoCurso}unidadesButton .glyphicon").removeClass("glyphicon-folder-close").addClass("glyphicon-folder-open"); |
400 | $("#${CursoAfeto.codigoCurso}unidadesButton .glyphicon").removeClass("glyphicon-folder-close").addClass("glyphicon-folder-open"); |
400 | } |
401 | } |
401 | }); |
402 | }); |
402 | $('#${CursoAfeto.codigoCurso}unidades').on('hidden.bs.collapse', function (e) { |
403 | $('#${CursoAfeto.codigoCurso}unidades').on('hidden.bs.collapse', function (e) { |
403 | if ($(this).is(e.target)) { |
404 | if ($(this).is(e.target)) { |
404 | $("#${CursoAfeto.codigoCurso}unidadesButton .glyphicon").removeClass("glyphicon-folder-open").addClass("glyphicon-folder-close"); |
405 | $("#${CursoAfeto.codigoCurso}unidadesButton .glyphicon").removeClass("glyphicon-folder-open").addClass("glyphicon-folder-close"); |
405 | } |
406 | } |
406 | }); |
407 | }); |
407 | } |
408 | } |
408 | ); |
409 | ); |
409 | </script> |
410 | </script> |
410 | <button id="${CursoAfeto.codigoCurso}unidadesButton" class="btn btn-default btn-small" type="button" data-toggle="collapse" data-target="#${CursoAfeto.codigoCurso}unidades"><span class="glyphicon glyphicon-folder-close"></span></button> |
411 | <button id="${CursoAfeto.codigoCurso}unidadesButton" class="btn btn-default btn-small" type="button" data-toggle="collapse" data-target="#${CursoAfeto.codigoCurso}unidades"><span class="glyphicon glyphicon-folder-close"></span></button> |
411 | <script> |
412 | <script> |
412 | $(document).ready( |
413 | $(document).ready( |
413 | function(){ |
414 | function(){ |
414 | $.post("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/pedagogicoCourseCheckCursoAfeto.jsp?cursoAfetoId=${CursoAfeto.id}", function(data) { |
415 | $.post("<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/pedagogicoCourseCheckCursoAfeto.jsp?cursoAfetoId=${CursoAfeto.id}", function(data) { |
415 | $("#${CursoAfeto.codigoCurso}unidades .unidades") |
416 | $("#${CursoAfeto.codigoCurso}unidades .unidades") |
416 | .html(data); |
417 | .html(data); |
417 | evaluateTableSortersInside("#${CursoAfeto.codigoCurso}unidades .unidades"); |
418 | evaluateTableSortersInside("#${CursoAfeto.codigoCurso}unidades .unidades"); |
418 | }); |
419 | }); |
419 | } |
420 | } |
420 | ); |
421 | ); |
421 | </script> |
422 | </script> |
422 | </td> |
423 | </td> |
423 | <td> |
424 | <td> |
424 | <nested:hidden property="id"/> |
425 | <nested:hidden property="id"/> |
425 | ${CourseView.code} |
426 | ${CourseView.code} |
426 | </td> |
427 | </td> |
427 | <td><bean:message key="course.${CourseView.degreeCleanCode}"/></td> |
428 | <td><bean:message key="course.${CourseView.degreeCleanCode}"/></td> |
428 | <td>${CourseView.name}</td> |
429 | <td>${CourseView.name}</td> |
429 | <td> |
430 | <td> |
430 | <logic:notEmpty name="CourseView" property="validationRole"> |
431 | <logic:notEmpty name="CourseView" property="validationRole"> |
431 | <bean:message key="user.role.${CourseView.validationRole}"/> |
432 | <bean:message key="user.role.${CourseView.validationRole}"/> |
432 | </logic:notEmpty> |
433 | </logic:notEmpty> |
433 | <logic:empty name="CourseView" property="validationRole"> |
434 | <logic:empty name="CourseView" property="validationRole"> |
434 | Papel não atribuido (Corrigir Situação) |
435 | Papel não atribuido (Corrigir Situação) |
435 | </logic:empty> |
436 | </logic:empty> |
436 | </td> |
437 | </td> |
437 | <td> |
438 | <td> |
438 | <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/listCourseUnits.jsp?importYear=${CourseView.importYear}&courseId=${CourseView.id}&semestre=<%=questionario.getSemestre()%>" data-title="Unidades do Curso de ${CourseView.name} (${CourseView.code})" data-toggle="modal" data-target="#modalAjaxRequest"> |
439 | <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/listCourseUnits.jsp?importYear=${CourseView.importYear}&courseId=${CourseView.id}&semestre=<%=questionario.getSemestre()%>" data-title="Unidades do Curso de ${CourseView.name} (${CourseView.code})" data-toggle="modal" data-target="#modalAjaxRequest"> |
439 | <%=unitsSize%> |
440 | <%=unitsSize%> |
440 | </a> |
441 | </a> |
441 | </td> |
442 | </td> |
442 | <td> |
443 | <td> |
443 | <%=cursoAfeto.getUnidadesAfetas().size()%> |
444 | <%=cursoAfeto.getUnidadesAfetas().size()%> |
444 | <% |
445 | <% |
445 | if(cursoAfeto.getUnidadesAfetas().size() != unitsSize) |
446 | if(cursoAfeto.getUnidadesAfetas().size() != unitsSize) |
446 | { |
447 | { |
447 | %> |
448 | %> |
448 | <span data-toggle="tooltip" data-placement="top" title="EXISTE UNIDADES QUE NAO ESTAO AFETADAS: CONFIRME SITUAÇÃO" class="glyphicon glyphicon-alert"></span> |
449 | <span data-toggle="tooltip" data-placement="top" title="EXISTE UNIDADES QUE NAO ESTAO AFETADAS: CONFIRME SITUAÇÃO" class="glyphicon glyphicon-alert"></span> |
449 | <% |
450 | <% |
450 | } |
451 | } |
451 | %> |
452 | %> |
452 | </td> |
453 | </td> |
453 | 454 | ||
454 | <td class="marcadasCount"> |
455 | <td class="marcadasCount"> |
455 | ${CursoAfeto.marcadas} |
456 | ${CursoAfeto.marcadas} |
456 | <logic:greaterThan value="0" name="CursoAfeto" property="marcadas"> |
457 | <logic:greaterThan value="0" name="CursoAfeto" property="marcadas"> |
457 | <span class="glyphicon glyphicon-alert"></span> |
458 | <span class="glyphicon glyphicon-alert"></span> |
458 | </logic:greaterThan> |
459 | </logic:greaterThan> |
459 | </td> |
460 | </td> |
460 | <td class="porVerCount"> ... </td> |
461 | <td class="porVerCount"> ... </td> |
461 | <td class="porVerProfsCount"> ... </td> |
462 | <td class="porVerProfsCount"> ... </td> |
462 | <td class="naoUsadasCount"> ... </td> |
463 | <td class="naoUsadasCount"> ... </td> |
463 | <td class="observadasCount"> ... </td> |
464 | <td class="observadasCount"> ... </td> |
464 | <td> |
465 | <td> |
465 | <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/listCourseUnitsTurmas.jsp?importYear=${CourseView.importYear}&courseId=${CourseView.id}" data-title="Turmas do Curso de ${CourseView.name} (${CourseView.code})" data-toggle="modal" data-target="#modalAjaxRequest"> |
466 | <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/listCourseUnitsTurmas.jsp?importYear=${CourseView.importYear}&courseId=${CourseView.id}" data-title="Turmas do Curso de ${CourseView.name} (${CourseView.code})" data-toggle="modal" data-target="#modalAjaxRequest"> |
466 | <%=turmasSize%> |
467 | <%=turmasSize%> |
467 | </a> |
468 | </a> |
468 | </td> |
469 | </td> |
469 | <td class="tipologiasRequisitadasCount"><%=cursoAfeto.getStatTipologiasRequisitadas()%></td> |
470 | <td class="tipologiasRequisitadasCount"><%=cursoAfeto.getStatTipologiasRequisitadas()%></td> |
470 | <td class="respostasRequisitadasCount"><%=cursoAfeto.getStatRespostasRequisitadas()%></td> |
471 | <td class="respostasRequisitadasCount"><%=cursoAfeto.getStatRespostasRequisitadas()%></td> |
471 | 472 | ||
472 | 473 | ||
473 | <td> |
474 | <td> |
474 | <nested:checkbox property="usarTipologias" styleClass="courseCheck"/> |
475 | <nested:checkbox property="usarTipologias" styleClass="courseCheck"/> |
475 | </td> |
476 | </td> |
476 | </tr> |
477 | </tr> |
477 | <tr id="${CursoAfeto.codigoCurso}unidades" class="collapse"> |
478 | <tr id="${CursoAfeto.codigoCurso}unidades" class="collapse"> |
478 | <td></td> |
479 | <td></td> |
479 | <td colspan="14" class="unidades" style="padding-left: 25px"> |
480 | <td colspan="14" class="unidades" style="padding-left: 25px"> |
480 | <div class="panel panel-default"> |
481 | <div class="panel panel-default"> |
481 | <div class="panel-body"> |
482 | <div class="panel-body"> |
482 | <p>Por favor aguarde um momento, o sistema está a carregar as unidades curriculares <img src="<%=request.getContextPath()%>/imgs/wait.gif"/></p> |
483 | <p>Por favor aguarde um momento, o sistema está a carregar as unidades curriculares <img src="<%=request.getContextPath()%>/imgs/wait.gif"/></p> |
483 | </div> |
484 | </div> |
484 | </div> |
485 | </div> |
485 | </td> |
486 | </td> |
486 | </tr> |
487 | </tr> |
487 | <% |
488 | <% |
488 | } |
489 | } |
489 | //DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().evict(cursoAfeto); |
490 | //DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().evict(cursoAfeto); |
490 | 491 | ||
491 | 492 | ||
492 | %> |
493 | %> |
493 | </nested:iterate> |
494 | </nested:iterate> |
494 | </tbody> |
495 | </tbody> |
495 | </table> |
496 | </table> |
496 | </div> |
497 | </div> |
497 | </div> |
498 | </div> |
498 | <% |
499 | <% |
499 | } |
500 | } |
500 | %> |
501 | %> |
501 | 502 | ||
502 | 503 | ||
503 | <div class="panel panel-primary" id="institutionGerarFinal"> |
504 | <div class="panel panel-primary" id="institutionGerarFinal"> |
504 | <div class="panel-heading"> |
505 | <div class="panel-heading"> |
505 | Verificação de Atribuições |
506 | Verificação de Atribuições |
506 | </div> |
507 | </div> |
507 | <div class="panel-body"> |
508 | <div class="panel-body"> |
508 | 509 | ||
509 | 510 | ||
510 | <div class="col-sm-6"> |
511 | <div class="col-sm-6"> |
511 | 512 | ||
512 | <div class="alert alert-warning">Está neste momento no painel de verificações do questionário ${Questionario.id} criado para o periodo ${Questionario.semestre} de ${Questionario.year}</div> |
513 | <div class="alert alert-warning">Está neste momento no painel de verificações do questionário ${Questionario.id} criado para o periodo ${Questionario.semestre} de ${Questionario.year}</div> |
513 | 514 | ||
514 | <a class="btn btn-default" href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/questionarioLogState.jsp?questionarioId=${Questionario.id}" data-title="Registo de mudanças de estado do questionario ${Questionario.id}" data-toggle="modal" data-target="#modalAjaxRequest"> |
515 | <a class="btn btn-default" href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/questionarioLogState.jsp?questionarioId=${Questionario.id}" data-title="Registo de mudanças de estado do questionario ${Questionario.id}" data-toggle="modal" data-target="#modalAjaxRequest"> |
515 | Registo de Mudanças de Estado |
516 | Registo de Mudanças de Estado |
516 | </a> |
517 | </a> |
517 | </div> |
518 | </div> |
518 | <div class="col-sm-6"> |
519 | <div class="col-sm-6"> |
519 | 520 | ||
520 | </div> |
521 | </div> |
521 | 522 | ||
522 | 523 | ||
523 | </div> |
524 | </div> |
524 | 525 | ||
525 | </div> |
526 | </div> |
526 | <div class="col-sm-12"> |
527 | <div class="col-sm-12"> |
527 | 528 | ||
528 | <button id="updateTipologiasButton" class="btn btn-success pull-right">Atualizar Tipologias</button> |
529 | <button id="updateTipologiasButton" class="btn btn-success pull-right">Atualizar Tipologias</button> |
529 | <html:link action="/user/adminQuestionario?questionario.id=${Questionario.id}#NOWTASK" styleClass="btn btn-danger">Voltar à administração</html:link> |
530 | <html:link action="/user/adminQuestionario?questionario.id=${Questionario.id}#NOWTASK" styleClass="btn btn-danger">Voltar à administração</html:link> |
530 | </div> |
531 | </div> |
531 | </div> |
532 | </div> |
532 | 533 | ||
533 | 534 | ||
534 | </div> |
535 | </div> |
535 | </div> |
536 | </div> |
536 | </div> |
537 | </div> |
537 | <% |
538 | <% |
538 | AbstractDao.getCurrentSession().getTransaction().commit(); |
539 | AbstractDao.getCurrentSession().getTransaction().commit(); |
539 | %> |
540 | %> |
540 | 541 | ||
541 | 542 | ||
542 | </html:form> |
543 | </html:form> |