Rev 1834 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1320 | jmachado | 1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.CourseUnitGrade" %> |
||
4 | <%@ page import="pt.estgp.estgweb.domain.Student" %> |
||
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
6 | <%@ page import="pt.estgp.estgweb.domain.views.CourseUnitGradeView" %> |
||
1814 | jmachado | 7 | <%@ page import="pt.estgp.estgweb.utils.DatesWebUtils" %> |
881 | jmachado | 8 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
9 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
||
1320 | jmachado | 10 | <%@ page import="java.util.*" %> |
881 | jmachado | 11 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
17 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
18 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
19 | <jsp:useBean id="CourseUnitEvaluationForm" type="pt.estgp.estgweb.web.form.courseunits.CourseUnitEvaluationForm" scope="request"/> |
||
20 | <jsp:useBean id="CourseUnitView" type="pt.estgp.estgweb.domain.views.CourseUnitView" scope="request"/> |
||
21 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
||
1312 | jmachado | 22 | <baco:initCourseUnitEvaluationClearances name="CourseUnitView"/> |
23 | |||
881 | jmachado | 24 | |
1133 | jmachado | 25 | <script> |
26 | //Manter a sessão activa para os docentes não perderem os dados |
||
27 | ping(); |
||
28 | </script> |
||
29 | |||
881 | jmachado | 30 | <% |
1830 | jmachado | 31 | |
1320 | jmachado | 32 | %> |
881 | jmachado | 33 | |
1320 | jmachado | 34 | <% |
35 | long lastUpdate = 0; |
||
1830 | jmachado | 36 | |
37 | //ESTAS MAPS DE NOTAS SAO PARA A MODAL |
||
38 | //OS CALCULOS USADOS SAO FEITOS NOVAMENTE EM BAIXO |
||
1320 | jmachado | 39 | Map<String,List<CourseUnitGrade>> epocaGrades = new HashMap<String, List<CourseUnitGrade>>(); |
1830 | jmachado | 40 | Map<Integer,CourseUnitGrade> approvedStudents = new HashMap<Integer,CourseUnitGrade>(); |
41 | Map<Integer,CourseUnitGrade> finalGrades = new HashMap<Integer, CourseUnitGrade>(); |
||
1097 | jmachado | 42 | |
1320 | jmachado | 43 | AbstractDao.getCurrentSession().beginTransaction(); |
44 | CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().load(CourseUnitView.getId()); |
||
45 | for(CourseUnitGrade grade: cu.getCourseUnitGrades()) |
||
46 | { |
||
47 | if(grade.getUpdateDate().getTime() > lastUpdate) |
||
48 | lastUpdate = grade.getUpdateDate().getTime(); |
||
1830 | jmachado | 49 | CourseUnitGrade gradeA = approvedStudents.get(grade.getStudent().getSigesCode()); |
1320 | jmachado | 50 | if(gradeA == null || gradeA.getGrade() < grade.getGrade()) |
51 | { |
||
52 | if(grade.getGrade() >= 10) |
||
1830 | jmachado | 53 | approvedStudents.put(grade.getStudent().getSigesCode(),grade); |
881 | jmachado | 54 | |
1320 | jmachado | 55 | } |
1830 | jmachado | 56 | CourseUnitGrade gradeF = finalGrades.get(grade.getStudent().getSigesCode()); |
1320 | jmachado | 57 | if(gradeF == null || gradeF.getGrade() < grade.getGrade()) |
58 | { |
||
1830 | jmachado | 59 | finalGrades.put(grade.getStudent().getSigesCode(),grade); |
1320 | jmachado | 60 | } |
881 | jmachado | 61 | |
1320 | jmachado | 62 | List<CourseUnitGrade> eg = epocaGrades.get(grade.getDescEpoca()); |
63 | if(eg == null) |
||
64 | { |
||
65 | eg = new ArrayList<CourseUnitGrade>(); |
||
66 | epocaGrades.put(grade.getDescEpoca(),eg); |
||
67 | } |
||
68 | eg.add(grade); |
||
69 | } |
||
881 | jmachado | 70 | |
71 | |||
72 | |||
1320 | jmachado | 73 | %> |
1077 | jmachado | 74 | |
75 | |||
1320 | jmachado | 76 | <div class="modal fade" id="modalNotas" role="dialog" > |
77 | <div class="modal-dialog" data-width="90%" style="display: block; width: 90%; margin-top: 50px;" aria-hidden="false"> |
||
78 | <!-- Modal content--> |
||
79 | <div class="modal-content"> |
||
80 | <div class="modal-header"> |
||
81 | <h1 class="modal-title"> |
||
82 | Notas da Unidade Curricular de <%=CourseUnitView.getName()%> / <%=CourseUnitView.getImportYear()%> |
||
83 | <button type="button" class="btn btn-danger btn-xs pull-right" data-dismiss="modal"><span class="glyphicon glyphicon-remove"> </span> </button> |
||
84 | </h1> |
||
85 | </div> |
||
86 | <div class="modal-body"> |
||
87 | <div class="alert alert-info"> |
||
88 | Esta informação foi sincronizada a partir do sistema central do IPP poderá não estar atualizada. |
||
1814 | jmachado | 89 | Última atualização a (<%=DatesWebUtils.getStringFromDate(new Date(lastUpdate))%>) |
1320 | jmachado | 90 | </div> |
1077 | jmachado | 91 | |
1320 | jmachado | 92 | <% |
93 | int aprovadosNormal20 = 0; |
||
94 | int aprovadosRecurso36 = 0; |
||
95 | int aprovadosEspecial38 = 0; |
||
96 | int aprovados1013 = 0; |
||
97 | int aprovados1416 = 0; |
||
98 | int aprovados1720 = 0; |
||
99 | %> |
||
1312 | jmachado | 100 | |
1320 | jmachado | 101 | <div class="panel panel-success"> |
102 | <div class="panel-heading"> |
||
103 | Pauta Final (Pauta construida com as melhores notas de todos os alunos) |
||
104 | </div> |
||
105 | <div class="panel-body"> |
||
106 | |||
107 | <% |
||
108 | |||
1830 | jmachado | 109 | |
110 | |||
111 | int inscritosNormal = 0; //igual ao total de inscritos |
||
112 | Map<Integer,Integer> studentsBiggerGrades = new HashMap<Integer, Integer>(); |
||
113 | for(CourseUnitGrade grade: cu.getCourseUnitGrades()) |
||
1320 | jmachado | 114 | { |
1830 | jmachado | 115 | if(grade.getCodigoEpoca().equals("20")) |
116 | inscritosNormal++; |
||
1320 | jmachado | 117 | |
1830 | jmachado | 118 | if(grade.getCodigoEpoca().equals("20") //normal |
119 | || grade.getCodigoEpoca().equals("36") //recurso |
||
120 | || grade.getCodigoEpoca().equals("38")) //especial |
||
121 | { |
||
122 | Integer biggerGrade = studentsBiggerGrades.get(grade.getStudent().getSigesCode()); |
||
123 | if(biggerGrade == null || biggerGrade < grade.getGrade()) |
||
124 | { |
||
125 | studentsBiggerGrades.put(grade.getStudent().getSigesCode(),grade.getGrade()); |
||
126 | } |
||
127 | } |
||
1320 | jmachado | 128 | if(grade.getGrade() >= 10) |
129 | { |
||
130 | if(grade.getCodigoEpoca().equals("20")) |
||
131 | aprovadosNormal20++; |
||
132 | else if(grade.getCodigoEpoca().equals("36")) |
||
133 | aprovadosRecurso36++; |
||
134 | else if(grade.getCodigoEpoca().equals("38")) |
||
135 | aprovadosEspecial38++; |
||
1830 | jmachado | 136 | } |
137 | } |
||
1320 | jmachado | 138 | |
1830 | jmachado | 139 | int inscritos = inscritosNormal; |
140 | int aprovados = 0; |
||
141 | int reprovados = 0; |
||
142 | int semElementos = 0; |
||
143 | for(Integer grade: studentsBiggerGrades.values()) |
||
144 | { |
||
145 | if(grade <= 0) |
||
146 | semElementos++; |
||
147 | else if(grade < 10) |
||
148 | reprovados++; |
||
149 | else |
||
1320 | jmachado | 150 | { |
1830 | jmachado | 151 | aprovados++; |
152 | if(grade <= 13) |
||
153 | aprovados1013++; |
||
154 | else if(grade <= 16) |
||
155 | aprovados1416++; |
||
156 | else |
||
157 | aprovados1720++; |
||
1320 | jmachado | 158 | } |
159 | } |
||
1568 | jmachado | 160 | |
1830 | jmachado | 161 | float aprovados1013Per = (float) (((float)aprovados1013)/((float)aprovados)*100.0); |
162 | float aprovados1416Per = (float) (((float)aprovados1416)/((float)aprovados)*100.0); |
||
163 | float aprovados1720Per = (float) (((float)aprovados1720)/((float)aprovados)*100.0); |
||
164 | |||
165 | |||
1320 | jmachado | 166 | %> |
167 | <div class="col-md-4"> |
||
1830 | jmachado | 168 | <p><strong>Inscritos:</strong> <%=inscritos%> (ign/equi)</p> |
1320 | jmachado | 169 | <p><strong>Aprovados:</strong> <%=aprovados%> </p> |
170 | <p><strong>Reprovados:</strong> <%=reprovados%></p> |
||
171 | <p><strong>Sem Elementos de Avaliação:</strong> <%=semElementos%></p> |
||
1830 | jmachado | 172 | <p><strong>Equivalencias:</strong> <%=finalGrades.size() - inscritos%></p> |
1320 | jmachado | 173 | </div> |
174 | <div class="col-md-4"> |
||
175 | <p><strong>Aprovados em Época Normal:</strong> <%=aprovadosNormal20%> </p> |
||
176 | <p><strong>Aprovados em Época Recurso:</strong> <%=aprovadosRecurso36%> </p> |
||
177 | <p><strong>Aprovados em Época Especial:</strong> <%=aprovadosEspecial38%> </p> |
||
178 | </div> |
||
179 | <div class="col-md-4"> |
||
180 | <p><strong>Aprovados entre 10 e 13:</strong> <%=aprovados1013%> (<%=aprovados1013Per%>%) </p> |
||
181 | <p><strong>Aprovados entre 14 e 16:</strong> <%=aprovados1416%> (<%=aprovados1416Per%>%) </p> |
||
182 | <p><strong>Aprovados entre 17 e 20:</strong> <%=aprovados1720%> (<%=aprovados1720Per%>%) </p> |
||
183 | </div> |
||
184 | <table class="tablesorterfiltered" id="pautaFinal"> |
||
185 | <thead> |
||
186 | <tr> |
||
187 | <th> |
||
188 | <bean:message key="code"/> |
||
189 | </th> |
||
190 | <th> |
||
191 | <bean:message key="student"/> |
||
192 | </th> |
||
193 | <th> |
||
194 | <bean:message key="grade"/> |
||
195 | </th> |
||
196 | <th> |
||
197 | <bean:message key="date"/> |
||
198 | </th> |
||
199 | <th> |
||
200 | Epoca de Avaliação |
||
201 | </th> |
||
202 | <th> |
||
203 | Status de Época |
||
204 | </th> |
||
205 | </tr> |
||
206 | </thead> |
||
207 | <tbody> |
||
208 | <% |
||
209 | for(CourseUnitGrade grade: finalGrades.values()) |
||
210 | { |
||
211 | request.setAttribute("grade",new CourseUnitGradeView(grade)); |
||
212 | %> |
||
213 | <tr> |
||
214 | <td> |
||
215 | ${grade.student.code} |
||
216 | </td> |
||
217 | <td> |
||
218 | ${grade.student.name} |
||
219 | </td> |
||
220 | <td> |
||
221 | <logic:greaterThan value="0" name="grade" property="grade"> |
||
222 | ${grade.grade} |
||
223 | </logic:greaterThan> |
||
224 | <logic:lessThan value="0" name="grade" property="grade"> |
||
225 | S/N |
||
226 | </logic:lessThan> |
||
227 | </td> |
||
228 | <td> |
||
229 | ${grade.formatedDate} |
||
230 | </td> |
||
231 | |||
232 | <td> |
||
233 | ${grade.descEpoca} |
||
234 | </td> |
||
235 | <td> |
||
236 | ${grade.descStatusEpoca} |
||
237 | </td> |
||
238 | </tr> |
||
239 | <% |
||
240 | } |
||
241 | %> |
||
242 | </tbody> |
||
243 | </table> |
||
244 | |||
245 | </div> |
||
246 | </div> |
||
247 | |||
248 | |||
249 | |||
250 | <% |
||
251 | for(Map.Entry<String,List<CourseUnitGrade>> grades: epocaGrades.entrySet()) |
||
252 | { |
||
253 | int reprovadosEp = 0; |
||
254 | int semElementosEp = 0; |
||
255 | int aprovadosEp = 0; |
||
256 | for(CourseUnitGrade grade: grades.getValue()) |
||
257 | { |
||
258 | if(grade.getGrade() >= 10) |
||
259 | { |
||
260 | aprovadosEp++; |
||
261 | } |
||
262 | else if(grade.getGrade() > 0) |
||
263 | { |
||
264 | reprovadosEp++; |
||
265 | } |
||
266 | else |
||
267 | semElementosEp ++; |
||
268 | } |
||
269 | %> |
||
270 | <div class="panel panel-default"> |
||
271 | <div class="panel-heading"> |
||
272 | <%=grades.getKey()%> |
||
273 | </div> |
||
274 | <div class="panel-body"> |
||
275 | <p><strong>Aprovados nesta época:</strong> <%=aprovadosEp%> </p> |
||
276 | <p><strong>Reprovados nesta época:</strong> <%=reprovadosEp%></p> |
||
277 | <p><strong>Sem Elementos de Avaliação nesta época:</strong> <%=semElementosEp%></p> |
||
278 | <table class="tablesorterfiltered"> |
||
279 | <thead> |
||
280 | <tr> |
||
281 | <th> |
||
282 | <bean:message key="code"/> |
||
283 | </th> |
||
284 | <th> |
||
285 | <bean:message key="student"/> |
||
286 | </th> |
||
287 | <th> |
||
288 | <bean:message key="grade"/> |
||
289 | </th> |
||
290 | <th> |
||
291 | <bean:message key="date"/> |
||
292 | </th> |
||
293 | <th> |
||
294 | Epoca de Avaliação |
||
295 | </th> |
||
296 | <th> |
||
297 | Status de Época |
||
298 | </th> |
||
299 | </tr> |
||
300 | </thead> |
||
301 | <tbody> |
||
302 | <% |
||
303 | for(CourseUnitGrade grade: grades.getValue()) |
||
304 | { |
||
305 | request.setAttribute("grade",new CourseUnitGradeView(grade)); |
||
306 | %> |
||
307 | <tr> |
||
308 | <td> |
||
309 | ${grade.student.code} |
||
310 | </td> |
||
311 | <td> |
||
312 | ${grade.student.name} |
||
313 | </td> |
||
314 | <td> |
||
315 | <logic:greaterThan value="0" name="grade" property="grade"> |
||
316 | ${grade.grade} |
||
317 | </logic:greaterThan> |
||
318 | <logic:lessThan value="0" name="grade" property="grade"> |
||
319 | S/N |
||
320 | </logic:lessThan> |
||
321 | </td> |
||
322 | <td> |
||
323 | ${grade.formatedDate} |
||
324 | </td> |
||
325 | <td> |
||
326 | ${grade.descEpoca} |
||
327 | </td> |
||
328 | <td> |
||
329 | ${grade.descStatusEpoca} |
||
330 | </td> |
||
331 | </tr> |
||
332 | <% |
||
333 | } |
||
334 | %> |
||
335 | </tbody> |
||
336 | </table> |
||
337 | |||
338 | </div> |
||
339 | </div> |
||
340 | <% |
||
341 | } |
||
342 | %> |
||
343 | |||
344 | </div> |
||
345 | </div> |
||
346 | </div> |
||
347 | </div> |
||
348 | |||
349 | |||
350 | <% |
||
351 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
881 | jmachado | 352 | %> |
353 | |||
1320 | jmachado | 354 | |
355 | |||
356 | |||
357 | |||
358 | |||
359 | |||
360 | |||
361 | |||
362 | |||
363 | |||
1312 | jmachado | 364 | <div class="panel panel-primary"> |
365 | <div class="panel-heading"> |
||
1479 | jmachado | 366 | <span class="icon icon-flag"></span> <bean:message key="courseunit.evaluation"/> - <%=CourseUnitView.getName()%> / <%=CourseUnitView.getImportYear()%> |
881 | jmachado | 367 | |
1320 | jmachado | 368 | |
1312 | jmachado | 369 | <% |
370 | if( CourseUnitView.getEvaluationStreamId() !=null ){ |
||
371 | %> |
||
372 | <span class="badge icon"> |
||
373 | <a href="javascript:invoqueDataVersionForm(${CourseUnitView.evaluationStreamId})"><span class="icon icon-history icon-large"></span></a> |
||
374 | </span> |
||
375 | <span class="badge icon"> |
||
376 | <a href="<%=request.getContextPath()%>/repositoryStream/<%=CourseUnitView.getEvaluationStreamId()%>"> |
||
377 | <span class="icon icon-file-pdf icon-large"/> |
||
378 | </a> |
||
379 | </span> |
||
380 | <% |
||
381 | } |
||
382 | %> |
||
987 | jmachado | 383 | |
1312 | jmachado | 384 | </div> |
385 | <div class="panel-body"> |
||
1320 | jmachado | 386 | |
387 | <html:errors/> |
||
388 | <jomm:messages/> |
||
389 | |||
1686 | jmachado | 390 | |
1312 | jmachado | 391 | <baco:notClearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_ACTIVE"> |
392 | <div class="alert alert-info"> |
||
393 | <bean:message key="courseunit.evaluation.period.inactive"/> |
||
394 | </div> |
||
395 | </baco:notClearOperation> |
||
396 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_ACTIVE_SPECIAL_ADMIN"> |
||
397 | <div class="alert alert-warning"> |
||
398 | <bean:message key="courseunit.evaluation.period.admin.active"/> |
||
399 | </div> |
||
400 | </baco:clearOperation> |
||
401 | <logic:equal value="true" name="CourseUnitEvaluationForm" property="courseUnitEvaluationView.fechar"> |
||
402 | <div class="alert alert-success"><bean:message key="courseunit.evaluation.dtp.info"/></div> |
||
403 | </logic:equal> |
||
887 | jmachado | 404 | |
1529 | jmachado | 405 | <!-- ESTADOS --> |
406 | |||
407 | |||
408 | |||
409 | <div class="row-centered clearfix"> |
||
1312 | jmachado | 410 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_STATE_EDIT"> |
1529 | jmachado | 411 | <div class="alert alert-warning col-md-3 col-sm-3"> |
412 | <span class="glyphicon glyphicon-edit"></span> Em edição (Qualquer docente da unidade pode editar e entregar) |
||
1312 | jmachado | 413 | </div> |
414 | <div class="col-md-1 col-sm-1 vcenter alert"><span class="glyphicon glyphicon-chevron-right"/></div> |
||
415 | <div class="alert alert-disabled col-md-3 col-sm-3"> |
||
1529 | jmachado | 416 | <span class="glyphicon glyphicon-education"></span> Comissão aguarda entrega do docente |
1312 | jmachado | 417 | </div> |
418 | <div class="col-md-1 col-sm-1 vcenter alert"><span class="glyphicon glyphicon-chevron-right"/></div> |
||
419 | <div class="alert alert-disabled col-md-3 col-sm-3"> |
||
1529 | jmachado | 420 | <span class="glyphicon glyphicon-flag"></span> <bean:message key="courseunit.evaluation.state.closed"/> |
1312 | jmachado | 421 | </div> |
422 | </baco:clearOperation> |
||
423 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_STATE_COMPLETE"> |
||
1529 | jmachado | 424 | <div class="alert alert-success col-md-3 col-sm-3"> |
425 | <span class="glyphicon glyphicon-edit"></span> Entregue pelo Docente |
||
1312 | jmachado | 426 | </div> |
427 | <div class="col-md-1 col-sm-1 vcenter alert"><span class="glyphicon glyphicon-chevron-right"/></div> |
||
1529 | jmachado | 428 | <div class="alert alert-warning col-md-3 col-sm-3"> |
429 | <span class="glyphicon glyphicon-education"></span> Em <bean:message key="courseunit.evaluation.state.complete"/> pela comissão |
||
1312 | jmachado | 430 | </div> |
431 | <div class="col-md-1 col-sm-1 vcenter alert"><span class="glyphicon glyphicon-chevron-right"/></div> |
||
432 | <div class="alert alert-disabled col-md-3 col-sm-3"> |
||
1529 | jmachado | 433 | <span class="glyphicon glyphicon-flag"></span> <bean:message key="courseunit.evaluation.state.closed"/> |
1312 | jmachado | 434 | </div> |
435 | </baco:clearOperation> |
||
436 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_STATE_CLOSED"> |
||
1529 | jmachado | 437 | <div class="alert alert-success col-md-3 col-sm-3"> |
438 | <span class="glyphicon glyphicon-edit"></span> Entregue pelo Docente |
||
1312 | jmachado | 439 | </div> |
440 | <div class="col-md-1 col-sm-1 vcenter alert"><span class="glyphicon glyphicon-chevron-right"/></div> |
||
1529 | jmachado | 441 | <div class="alert alert-success col-md-3 col-sm-3"> |
442 | <span class="glyphicon glyphicon-education"></span> Validado pela Comissão |
||
1312 | jmachado | 443 | </div> |
444 | <div class="col-md-1 col-sm-1 vcenter alert"><span class="glyphicon glyphicon-chevron-right"/></div> |
||
1529 | jmachado | 445 | <div class="alert alert-success col-md-3 col-sm-3"> |
446 | <span class="glyphicon glyphicon-flag"></span> <bean:message key="courseunit.evaluation.state.closed"/> |
||
1312 | jmachado | 447 | </div> |
448 | </baco:clearOperation> |
||
449 | </div> |
||
1033 | jmachado | 450 | |
1529 | jmachado | 451 | |
452 | <div class="row-centered clearfix"> |
||
1312 | jmachado | 453 | <div class="col-md-3 col-sm-3"> |
454 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_TRANSITATE_TO_EDIT"> |
||
455 | <html:form action="/user/courseUnitEvaluationController"> |
||
1355 | jmachado | 456 | |
1312 | jmachado | 457 | <input type="hidden" name="dispatch" value="openEvaluation"> |
458 | <html:hidden property="courseUnitView.id"/> |
||
459 | <button type="submit" class="btn btn-default"> |
||
460 | <bean:message key="courseunit.evaluation.transit.to.edition"/> |
||
461 | </button> |
||
462 | </html:form> |
||
463 | </baco:clearOperation> |
||
464 | </div> |
||
465 | <div class="col-md-1 col-sm-1"></div> |
||
466 | <div class="col-md-3 col-sm-3"> |
||
467 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_TRANSITATE_TO_COMPLETE"> |
||
1529 | jmachado | 468 | <button type="button" class="btn btn-default" onclick="$('#buttonTeacherCompleteEvaluation').click()"> |
1312 | jmachado | 469 | <bean:message key="courseunit.evaluation.transit.to.complete"/> |
470 | </button> |
||
471 | </baco:clearOperation> |
||
472 | </div> |
||
473 | <div class="col-md-1 col-sm-1"></div> |
||
474 | <div class="col-md-3 col-sm-3"> |
||
475 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_TRANSITATE_TO_CLOSE"> |
||
1529 | jmachado | 476 | <button type="button" class="btn btn-default" onclick="$('#buttonPublishEvaluation').click()"><bean:message key="courseunit.evaluation.transit.to.closed"/></button> |
1312 | jmachado | 477 | </baco:clearOperation> |
478 | </div> |
||
479 | </div> |
||
987 | jmachado | 480 | |
1529 | jmachado | 481 | |
482 | |||
483 | |||
484 | |||
485 | |||
1312 | jmachado | 486 | </div> |
487 | <div class="panel-body"> |
||
950 | jmachado | 488 | |
987 | jmachado | 489 | |
1033 | jmachado | 490 | |
491 | |||
1686 | jmachado | 492 | <html:form styleId="formEval" styleClass="form-horizontal" action="/user/courseUnitEvaluationControllerWidget"> |
1312 | jmachado | 493 | <input type="hidden" id="dispatch" name="dispatch" value="saveEvaluation"> |
494 | <html:hidden property="id"/> |
||
495 | <html:hidden property="courseUnitView.id"/> |
||
1686 | jmachado | 496 | <input type="hidden" name="autosave" value="true"/> |
1033 | jmachado | 497 | |
498 | |||
1686 | jmachado | 499 | <div class="web-messages"></div> |
881 | jmachado | 500 | |
1686 | jmachado | 501 | |
1312 | jmachado | 502 | <div class="panel panel-default"> |
503 | <div class="panel-heading"> |
||
504 | Dados alterados pelo Docente da Unidade |
||
505 | </div> |
||
506 | <div class="panel-body"> |
||
507 | <div id="autosave"></div> |
||
1032 | jmachado | 508 | |
1320 | jmachado | 509 | |
1355 | jmachado | 510 | <h3>Dados para confirmar pelo Docente da Unidade |
511 | |||
512 | <button type="button" data-toggle="modal" data-target="#modalNotas" class="btn btn-info" href=""> |
||
513 | Consultar Notas |
||
514 | <span class="icon icon-table2"> </span> </button> |
||
515 | |||
516 | |||
517 | </h3> |
||
1320 | jmachado | 518 | <table class="tablesorter-blue" width="100%"> |
1033 | jmachado | 519 | <tr> |
1312 | jmachado | 520 | <th rowspan="2"> |
521 | Nº Alunos Inscritos |
||
522 | </th> |
||
523 | <th rowspan="2"> |
||
524 | Nº de alunos sem elementos de avaliação |
||
525 | </th> |
||
526 | <th colspan="5"> |
||
527 | Nº de alunos aprovados em |
||
528 | </th> |
||
1830 | jmachado | 529 | <th colspan="2"> |
530 | Aprovados com a classificação entre 10 e 13 valores |
||
1312 | jmachado | 531 | </th> |
1830 | jmachado | 532 | <th colspan="2"> |
533 | Aprovados com a classificação entre 14 e 16 valores |
||
1312 | jmachado | 534 | </th> |
1830 | jmachado | 535 | <th colspan="2"> |
536 | Aprovados com a classificação entre 17 e 20 valores |
||
1312 | jmachado | 537 | </th> |
538 | </tr> |
||
539 | <tr> |
||
540 | <th>Avaliação de frequência</th> |
||
541 | <th>Exame Época Normal</th> |
||
542 | <th>Exame Época Recurso</th> |
||
543 | <th>Exame Época Especial</th> |
||
544 | <th>Total</th> |
||
1830 | jmachado | 545 | <th>Nº</th> |
546 | <th>%</th> |
||
547 | <th>Nº</th> |
||
548 | <th>%</th> |
||
549 | <th>Nº</th> |
||
550 | <th>%</th> |
||
1312 | jmachado | 551 | </tr> |
552 | <tr> |
||
1320 | jmachado | 553 | <td class="text-center"> |
554 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosInscritos"/> |
||
1033 | jmachado | 555 | </td> |
1320 | jmachado | 556 | <td class="text-center"> |
557 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosSemElementosAvaliacao"/> |
||
1033 | jmachado | 558 | </td> |
1320 | jmachado | 559 | <td class="text-center"> |
560 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprovFrequencia"/> |
||
1033 | jmachado | 561 | </td> |
1320 | jmachado | 562 | <td class="text-center"> |
563 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprovNormal"/> |
||
1312 | jmachado | 564 | </td> |
1320 | jmachado | 565 | <td class="text-center"> |
566 | <html:text styleClass="form-control" style="width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprovRecurso"/> |
||
1312 | jmachado | 567 | </td> |
1320 | jmachado | 568 | <td style="text-align: center"> |
569 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprovEspecial"/> |
||
1312 | jmachado | 570 | </td> |
1320 | jmachado | 571 | <td class="text-center"> |
572 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprovTotal"/> |
||
1312 | jmachado | 573 | </td> |
1320 | jmachado | 574 | <td class="text-center"> |
1834 | jmachado | 575 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprov1013"/> |
1312 | jmachado | 576 | </td> |
1320 | jmachado | 577 | <td class="text-center"> |
1834 | jmachado | 578 | <html:text readonly="true" styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprov1013Percent"/> |
1830 | jmachado | 579 | </td> |
580 | <td class="text-center"> |
||
1834 | jmachado | 581 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprov1416"/> |
1312 | jmachado | 582 | </td> |
1320 | jmachado | 583 | <td class="text-center"> |
1834 | jmachado | 584 | <html:text readonly="true" styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprov1416Percent"/> |
1830 | jmachado | 585 | </td> |
586 | <td class="text-center"> |
||
1834 | jmachado | 587 | <html:text styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprov1720"/> |
1312 | jmachado | 588 | </td> |
1830 | jmachado | 589 | <td class="text-center"> |
1834 | jmachado | 590 | <html:text readonly="true" styleClass="form-control" style="margin:auto; width: 50px" size="4" property="courseUnitEvaluationView.courseUnitEvaluation.numAlunosAprov1720Percent"/> |
1830 | jmachado | 591 | </td> |
1033 | jmachado | 592 | </tr> |
1320 | jmachado | 593 | <tr> |
1830 | jmachado | 594 | <td colspan="13"> |
1530 | jmachado | 595 | <div class="alert alert-info"> |
596 | Os dados abaixo são obtidos da sincronização de notas (PODEM ESTAR ERRADOS) (servem apenas como AJUDA para confirmação pelo docente). OS DADOS DE CONSULTA CONTABILIZAM <b><i>EQUIVALÊNCIAS</i></b>, o uso ou não das equivalências nas contagens é da responsabilidade dos docentes e dos orgãos competentes. |
||
597 | </div> |
||
598 | </td> |
||
1320 | jmachado | 599 | </tr> |
600 | <tr> |
||
601 | <td class="text-center"> |
||
1830 | jmachado | 602 | <%=inscritos%> |
1320 | jmachado | 603 | </td> |
604 | <td class="text-center"> |
||
605 | <%=semElementos%> |
||
606 | </td> |
||
607 | <td class="text-center"> |
||
608 | ? |
||
609 | </td> |
||
610 | <td class="text-center"> |
||
611 | <%=aprovadosNormal20%> |
||
612 | </td> |
||
613 | <td class="text-center"> |
||
614 | <%=aprovadosRecurso36%> |
||
615 | </td> |
||
616 | <td class="text-center"> |
||
617 | <%=aprovadosEspecial38%> |
||
618 | </td> |
||
619 | <td class="text-center"> |
||
1830 | jmachado | 620 | <%=aprovados%> |
1320 | jmachado | 621 | </td> |
622 | <td class="text-center"> |
||
1830 | jmachado | 623 | <%=aprovados1013%> |
1320 | jmachado | 624 | </td> |
625 | <td class="text-center"> |
||
1830 | jmachado | 626 | <%=aprovados1013Per%> % |
1320 | jmachado | 627 | </td> |
628 | <td class="text-center"> |
||
1830 | jmachado | 629 | <%=aprovados1416%> |
1320 | jmachado | 630 | </td> |
1830 | jmachado | 631 | <td class="text-center"> |
632 | <%=aprovados1416Per%> % |
||
633 | </td> |
||
634 | <td class="text-center"> |
||
635 | <%=aprovados1720%> |
||
636 | </td> |
||
637 | <td class="text-center"> |
||
638 | <%=aprovados1720Per%> % |
||
639 | </td> |
||
1320 | jmachado | 640 | </tr> |
1033 | jmachado | 641 | </table> |
950 | jmachado | 642 | |
1033 | jmachado | 643 | |
1312 | jmachado | 644 | <h3>Auto-avaliação</h3> |
645 | <table class="tablesorter-blue" width="100%"> |
||
646 | <tr> |
||
647 | <th>Apreciação dos resultados quantitativos obtidos pelos estudantes</th> |
||
648 | <td width="80%"> |
||
649 | <html:textarea styleClass="form-control" style="width:100%;height: 200px" property="courseUnitEvaluationView.courseUnitEvaluation.qualApreciacaoQuantitivos"/> |
||
650 | </td> |
||
651 | </tr> |
||
652 | <tr> |
||
653 | <th>Apreciação do funcionamento da UC<br/> |
||
654 | (Condições de funcionamento da UC; problemas detetados; identificação de práticas pedagógicas de mérito ou deficientes; etc.)</th> |
||
655 | <td width="80%"> |
||
656 | <html:textarea styleClass="form-control" style="width:100%;height: 200px" property="courseUnitEvaluationView.courseUnitEvaluation.qualApreciacaoUC"/> |
||
657 | </td> |
||
658 | </tr> |
||
1843 | jmachado | 659 | |
1312 | jmachado | 660 | <tr> |
1843 | jmachado | 661 | <th>Percentagem de cumprimento do programa da UC<br/></th> |
662 | <td width="80%"> |
||
663 | <html:select style="width: 100px;padding: 10px" styleClass="form-control chosenOff" property="courseUnitEvaluationView.courseUnitEvaluation.cumprimentoProgramaPercent"> |
||
664 | <html:option value="100">100%</html:option> |
||
665 | <html:option value="95">95%</html:option> |
||
666 | <html:option value="90">90%</html:option> |
||
667 | <html:option value="85">85%</html:option> |
||
668 | <html:option value="80">80%</html:option> |
||
669 | <html:option value="75">75%</html:option> |
||
670 | <html:option value="70">70%</html:option> |
||
671 | <html:option value="60">65%</html:option> |
||
672 | <html:option value="60">60%</html:option> |
||
673 | <html:option value="50">50%</html:option> |
||
674 | <html:option value="40">40%</html:option> |
||
675 | <html:option value="30">30%</html:option> |
||
676 | <html:option value="20">20%</html:option> |
||
677 | <html:option value="10">10%</html:option> |
||
678 | <html:option value="0">0%</html:option> |
||
679 | </html:select> |
||
680 | </td> |
||
681 | </tr> |
||
682 | |||
683 | <tr> |
||
1312 | jmachado | 684 | <th>Apreciação do cumprimento do programa da UC<br/> |
685 | (Adequação das metodologias de ensino/aprendizagem utilizadas; competências efetivamente adquiridas e cumprimento dos conteúdos planificados) |
||
686 | </th> |
||
687 | <td width="80%"> |
||
688 | <html:textarea styleClass="form-control" style="width:100%;height: 200px" property="courseUnitEvaluationView.courseUnitEvaluation.qualApreciacaoCumprimentoPrograma"/> |
||
689 | </td> |
||
690 | </tr> |
||
691 | <tr> |
||
692 | <th> |
||
693 | Conclusões<br/> |
||
694 | (Pontos fortes e fracos; sugestões de melhoria e respetivo plano de ação para a sua concretização) |
||
695 | </th> |
||
696 | <td width="80%"> |
||
697 | <html:textarea styleClass="form-control" style="width:100%;height: 200px" property="courseUnitEvaluationView.courseUnitEvaluation.qualConclusoes"/> |
||
698 | </td> |
||
699 | </tr> |
||
700 | </table> |
||
1215 | jmachado | 701 | |
1312 | jmachado | 702 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_EDITSAVE"> |
1686 | jmachado | 703 | <button type="button" class="btn btn-default" onclick="submitFormWaitAutoSave(form,'saveEvaluation');"><bean:message key="save"/></button> |
1312 | jmachado | 704 | </baco:clearOperation> |
1215 | jmachado | 705 | |
1312 | jmachado | 706 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_TRANSITATE_TO_COMPLETE"> |
1686 | jmachado | 707 | <button type="button" id="buttonTeacherCompleteEvaluation" class="btn btn-default" onclick="submitFormWaitAutoSave(form,'teacherCompleteEvaluation');"><bean:message key="courseunit.evaluation.transit.to.complete"/></button> |
1312 | jmachado | 708 | </baco:clearOperation> |
1215 | jmachado | 709 | |
1312 | jmachado | 710 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_TRANSITATE_TO_CLOSE"> |
1686 | jmachado | 711 | <button type="button" id="buttonPublishEvaluation" class="btn btn-default" onclick="submitFormWaitAutoSave(form,'publishEvaluation');"><bean:message key="courseunit.evaluation.transit.to.closed"/></button> |
1312 | jmachado | 712 | </baco:clearOperation> |
1215 | jmachado | 713 | |
714 | |||
1312 | jmachado | 715 | </div> |
1215 | jmachado | 716 | </div> |
717 | |||
718 | |||
1312 | jmachado | 719 | </html:form> |
720 | |||
721 | |||
1215 | jmachado | 722 | </div> |
723 | </div> |
||
1312 | jmachado | 724 | |
725 | |||
726 | |||
727 | |||
728 | |||
729 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_EDITSAVE"> |
||
730 | |||
731 | <!-- Modal SAVE --> |
||
732 | <!-- Modal --> |
||
733 | <div class="modal fade" id="myModal" role="dialog" > |
||
734 | <div class="modal-dialog" data-width="760" style="display: block; width: 760px; margin-top: 50px;" aria-hidden="false"> |
||
735 | |||
736 | <!-- Modal content--> |
||
737 | <div class="modal-content"> |
||
738 | <div class="modal-header"> |
||
739 | |||
740 | <h1 class="modal-title"><bean:message key="courseunit.evaluation.sending.report.title"/></h1> |
||
741 | </div> |
||
742 | <div class="modal-body"> |
||
743 | <p> |
||
744 | <bean:message key="courseunit.evaluation.sending.report.text"/> <img src="<%=request.getContextPath()%>/imgs/wait.gif"/> |
||
745 | </p> |
||
746 | </div> |
||
747 | <div class="modal-footer"> |
||
748 | |||
749 | </div> |
||
750 | </div> |
||
751 | |||
752 | </div> |
||
753 | </div> |
||
754 | |||
887 | jmachado | 755 | <script> |
1215 | jmachado | 756 | |
757 | |||
889 | jmachado | 758 | $( document ).ready(function() { |
1312 | jmachado | 759 | |
760 | <baco:notClearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_ACTIVE"> |
||
1215 | jmachado | 761 | $("#formEdit :input").attr("disabled", true); |
1312 | jmachado | 762 | </baco:notClearOperation> |
763 | |||
764 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_INFO_STATE_CLOSED"> |
||
950 | jmachado | 765 | $("#formEdit :input").attr("disabled", true); |
1312 | jmachado | 766 | </baco:clearOperation> |
1153 | jmachado | 767 | |
1312 | jmachado | 768 | <baco:notClearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_PERSIST_TEACHER_PART"> |
769 | <baco:notClearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_PERSIST_COMISSION_PART"> |
||
770 | $("#formEdit :input").attr("disabled", true); |
||
771 | </baco:notClearOperation> |
||
772 | </baco:notClearOperation> |
||
1153 | jmachado | 773 | |
1312 | jmachado | 774 | <baco:clearOperation name="CourseUnitView" property="courseUnit" op="EVALUATION_EDITSAVE"> |
1686 | jmachado | 775 | setTimeout("autoSaveStart()",5000); |
1312 | jmachado | 776 | </baco:clearOperation> |
1215 | jmachado | 777 | |
889 | jmachado | 778 | }); |
1312 | jmachado | 779 | |
1686 | jmachado | 780 | |
1215 | jmachado | 781 | var stopAutoSave = false; |
1686 | jmachado | 782 | function autoSaveStart() |
783 | { |
||
784 | if(!stopAutoSave) |
||
785 | sendEvaluation(true,"saveEvaluation"); |
||
889 | jmachado | 786 | |
1686 | jmachado | 787 | } |
788 | |||
789 | function submitFormWaitAutoSave(form,service) |
||
1153 | jmachado | 790 | { |
1686 | jmachado | 791 | stopAutoSave = true; |
792 | $('#myModal').modal({ |
||
793 | show: 'true' |
||
794 | }); |
||
795 | //esperar se houver algum update a executar 1500 segundos é o maximo de espera |
||
796 | //se a pagina não recarregar e porque a thread parou |
||
797 | setTimeout("submitForm('" + service + "')",2000); |
||
798 | } |
||
799 | |||
800 | function submitForm(service) |
||
801 | { |
||
802 | //Para Submeter sem o JSON = true |
||
803 | |||
804 | sendEvaluation(false,service); |
||
805 | } |
||
806 | |||
807 | |||
808 | |||
809 | |||
810 | |||
811 | function sendEvaluation(autosave,service) |
||
812 | { |
||
813 | |||
814 | |||
815 | if(autosave) |
||
1215 | jmachado | 816 | { |
1686 | jmachado | 817 | $("#dispatch").val("saveEvaluation"); |
818 | $("#autosave").html('<div class="alert alert-info">Enviando ...</div>'); |
||
819 | $("#formEval input[name='autosave']").val("true"); |
||
1215 | jmachado | 820 | } |
821 | else |
||
1686 | jmachado | 822 | $("#formEval input[name='autosave']").val("false"); |
1208 | jmachado | 823 | |
1686 | jmachado | 824 | widgetSimpleCall( |
825 | service, |
||
826 | $("#formEval"), |
||
827 | function() |
||
828 | { |
||
829 | $('#myModal').modal("hide"); |
||
830 | //ok |
||
831 | if(autosave) |
||
832 | { |
||
1312 | jmachado | 833 | $("#autosave").html('<div class="alert alert-success">Salvo Automaticamente (Apenas Dados, não gerou PDF, para gerar PDF terá de salvar o docente)</div>'); |
1686 | jmachado | 834 | } |
1215 | jmachado | 835 | else |
1686 | jmachado | 836 | { |
1688 | jmachado | 837 | //so passa o URL para reload se correr tudo bem |
838 | modalWebMessagesGivenContainerAndTarget("Avaliação Salva","#formEval","<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=${CourseUnitView.id}"); |
||
1686 | jmachado | 839 | } |
1215 | jmachado | 840 | }, |
1686 | jmachado | 841 | function() |
842 | { |
||
843 | $('#myModal').modal("hide"); |
||
1688 | jmachado | 844 | //nao passa o URL para reload para nao estragar os dados |
1689 | jmachado | 845 | modalWebMessagesGivenContainer("Existem Erros de Validação","#formEval"); |
1215 | jmachado | 846 | } |
1686 | jmachado | 847 | ); |
1153 | jmachado | 848 | } |
849 | |||
887 | jmachado | 850 | </script> |
1312 | jmachado | 851 | </baco:clearOperation> |
887 | jmachado | 852 |