Rev 1045 | Rev 1077 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
204 | jmachado | 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
3 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
960 | jmachado | 9 | <%@ page import="jomm.dao.utils.HibernateUtils" %> |
1040 | jmachado | 10 | <%@ page import="jomm.utils.MessageResources" %> |
11 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
||
12 | <%@ page import="pt.estgp.estgweb.domain.TeacherImpl" %> |
||
960 | jmachado | 13 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
14 | <%@ page import="pt.estgp.estgweb.domain.dao.impl.CourseUnitDaoImpl" %> |
||
995 | jmachado | 15 | <%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
1040 | jmachado | 16 | <%@ page import="java.util.List" %> |
204 | jmachado | 17 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
1040 | jmachado | 18 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/variables.less"/> |
19 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/lavish-bootstrap.css"/> |
||
20 | |||
21 | <!-- PARA BOOTSTRAP NOVO PORTAL--> |
||
1045 | jmachado | 22 | <%--<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/offcanvas.css"/>--%> |
1040 | jmachado | 23 | |
204 | jmachado | 24 | <div class="portal"> |
432 | jmachado | 25 | <logic:notMatch value="TeacherImpl" name="UserSession" property="user.class.name"> |
301 | jmachado | 26 | <ul> |
27 | <li class="WARNING"> |
||
432 | jmachado | 28 | <bean:message key="profile.bad.profile.teacher.iregular.user.class"/> |
301 | jmachado | 29 | </li> |
30 | </ul> |
||
432 | jmachado | 31 | </logic:notMatch> |
204 | jmachado | 32 | <table class="columnTable" width="100%"> |
33 | <tbody> |
||
34 | <tr> |
||
215 | jmachado | 35 | <baco:isModuleOn module="courseunits"> |
36 | <td class="column"> |
||
1040 | jmachado | 37 | |
215 | jmachado | 38 | <div class="block"> |
787 | jmachado | 39 | <% |
40 | java.util.List<String> years = new java.util.ArrayList<String>(); |
||
995 | jmachado | 41 | String nowImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction(); |
42 | years.add(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction()); |
||
43 | years.add(DatesUtils.getPreviousImportYear(nowImportYear)); |
||
787 | jmachado | 44 | |
45 | java.util.Collections.sort(years, new java.util.Comparator<String>() |
||
46 | { |
||
47 | public int compare(String o1, String o2) { |
||
48 | return o2.compareTo(o1); |
||
49 | } |
||
50 | }); |
||
51 | |||
1040 | jmachado | 52 | |
53 | |||
787 | jmachado | 54 | for(String year: years) |
55 | { |
||
56 | |||
57 | String yearFormatted = pt.estgp.estgweb.utils.DatesUtils.getImportYearFormatted(year); |
||
58 | |||
59 | |||
1040 | jmachado | 60 | %> |
787 | jmachado | 61 | |
550 | jmachado | 62 | |
1040 | jmachado | 63 | <div class="panel panel-primary"> |
64 | <div class="panel-heading"><bean:message key="intranet.course.units"/> - <%=yearFormatted%></div> |
||
65 | <div class="panel-body"> |
||
787 | jmachado | 66 | |
1040 | jmachado | 67 | <!--<h2><bean:message key="intranet.course.units"/> - <%=yearFormatted%></h2>--> |
68 | <ul> |
||
69 | |||
787 | jmachado | 70 | <% |
1040 | jmachado | 71 | String[] semestres = new String[]{"A","S1","S2","T1","T2","T3","T4"}; |
72 | String[] semestreLabel = new String[]{ |
||
73 | MessageResources.getMessage(request,"courseunit.anuais"), |
||
74 | MessageResources.getMessage(request,"courseunit.semestre") + "1", |
||
75 | MessageResources.getMessage(request,"courseunit.semestre") + "2", |
||
76 | MessageResources.getMessage(request,"courseunit.trimestre") + "1", |
||
77 | MessageResources.getMessage(request,"courseunit.trimestre") + "2", |
||
78 | MessageResources.getMessage(request,"courseunit.trimestre") + "3", |
||
79 | MessageResources.getMessage(request,"courseunit.trimestre") + "4"}; |
||
787 | jmachado | 80 | |
1040 | jmachado | 81 | for(int i =0;i< semestres.length;i++) |
82 | { |
||
83 | request.setAttribute("LABEL",semestreLabel[i]); |
||
787 | jmachado | 84 | %> |
550 | jmachado | 85 | |
1040 | jmachado | 86 | <jsp:useBean id="LABEL" scope="request" type="java.lang.String"/> |
787 | jmachado | 87 | <% |
1040 | jmachado | 88 | TeacherImpl u = ((pt.estgp.estgweb.domain.TeacherImpl)UserSession.getUser()); |
89 | List<pt.estgp.estgweb.domain.CourseUnit> cus= |
||
90 | (List<CourseUnit>) |
||
91 | u.getClass().getMethod("getTeachedUnitsView" + semestres[i],String.class) |
||
92 | .invoke(u,year); |
||
93 | request.setAttribute("units",cus); |
||
94 | if(cus == null || cus.size() == 0) |
||
95 | {} |
||
96 | else if(cus.size() > 0) |
||
97 | { |
||
787 | jmachado | 98 | %> |
1040 | jmachado | 99 | <jsp:useBean id="units" scope="request" type="java.util.Collection"/> |
100 | <li> |
||
101 | <p><bean:write name="LABEL"/></<p> |
||
102 | <ul> |
||
103 | <logic:iterate id="unit" name="units" type="pt.estgp.estgweb.domain.CourseUnit"> |
||
104 | <li> |
||
105 | <html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}))</html:link> |
||
106 | <html:link action="/user/startLoadCourseUnitRootFromHome?courseUnitView.id=${unit.id}"><img border="0" alt="Pastas" src="<%=request.getContextPath()%>/imgs/folder.gif"></html:link> |
||
107 | </li> |
||
108 | </logic:iterate> |
||
109 | </ul> |
||
110 | </li> |
||
787 | jmachado | 111 | <% |
1040 | jmachado | 112 | } |
787 | jmachado | 113 | } |
1040 | jmachado | 114 | |
115 | %> |
||
787 | jmachado | 116 | </ul> |
1040 | jmachado | 117 | </div> |
118 | </div> |
||
787 | jmachado | 119 | <% |
120 | } |
||
121 | %> |
||
215 | jmachado | 122 | </div> |
1040 | jmachado | 123 | </baco:isModuleOn> |
124 | <baco:isModuleOn module="todos"> |
||
125 | <jsp:include page="/user/home/todos.jsp"/> |
||
126 | </baco:isModuleOn> |
||
127 | <baco:isModuleOn module="courseunits"> |
||
128 | <jsp:include page="/user/home/courseUnitsAnnouncements.jsp"/> |
||
129 | </baco:isModuleOn> |
||
215 | jmachado | 130 | </td> |
1040 | jmachado | 131 | |
132 | |||
204 | jmachado | 133 | <td class="column"> |
1024 | jmachado | 134 | |
1040 | jmachado | 135 | <div class="block"> |
136 | <div class="panel panel-primary"> |
||
137 | <div class="panel-heading"><bean:message key="intranet.home.curricular"/></div> |
||
138 | <div class="panel-body"> |
||
139 | <!--<p><bean:message key="intranet.home.curricular"/></p>--> |
||
140 | <!--<ul> |
||
141 | <li>--> |
||
142 | <html:link action="/user/startLoadCoursesProgramsFromHome"><bean:message key="courseunit.indexes"/> (Novo Estilo) </html:link> |
||
143 | <!--</li> |
||
144 | </ul>--> |
||
145 | </div> |
||
146 | </div> |
||
147 | </div> |
||
960 | jmachado | 148 | <% |
961 | jmachado | 149 | try{ |
1024 | jmachado | 150 | HibernateUtils.getCurrentSession().beginTransaction(); |
1029 | jmachado | 151 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
1070 | jmachado | 152 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
153 | |||
1040 | jmachado | 154 | List<CourseUnit> evaluations = DaoFactory.getCourseUnitDaoImpl().loadTeacherUnitsMissingEvaluation(UserSession); |
155 | List<CourseUnit> programs = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession.getUser().getId()); |
||
156 | if(programs != null && programs.size() > 0 || evaluations!= null && evaluations.size() > 0) |
||
1029 | jmachado | 157 | { |
158 | %> |
||
1040 | jmachado | 159 | |
160 | |||
161 | <div class="block"> |
||
162 | |||
163 | <div class="panel panel-primary"> |
||
164 | <div class="panel-heading">Tarefas Docente Relativas a Unidades (<%=activeYear%>)</div> |
||
165 | <div class="panel-body"> |
||
166 | <% |
||
167 | if(programs != null && programs.size() > 0) |
||
1029 | jmachado | 168 | { |
169 | %> |
||
1040 | jmachado | 170 | <div class="panel-body-h1">Fichas Curriculares por preencher</div> |
171 | <ul> |
||
172 | <% |
||
173 | for(CourseUnit cu: programs) |
||
174 | { |
||
175 | %> |
||
176 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getName()%>/<%=cu.getCode()%> (<%=cu.getCourseName() + "/" +cu.getCourseCode()%>)</a></li> |
||
177 | <% |
||
178 | } |
||
179 | %> |
||
180 | </ul> |
||
181 | |||
1029 | jmachado | 182 | <% |
183 | } |
||
1040 | jmachado | 184 | if(evaluations != null && evaluations.size() > 0) |
185 | { |
||
1029 | jmachado | 186 | %> |
1070 | jmachado | 187 | <div class="panel-body-h1">Relatórios de avaliação por preencher/entregar (graus em processo de validação: |
188 | <% |
||
189 | String sep = ""; |
||
190 | for(String activeDegree: activeDegrees) |
||
191 | { |
||
192 | %> |
||
193 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
194 | <% |
||
195 | sep = ", "; |
||
196 | } |
||
197 | %> |
||
198 | ) |
||
199 | </div> |
||
1040 | jmachado | 200 | <ul> |
201 | <% |
||
202 | for(CourseUnit cu: evaluations) |
||
203 | { |
||
204 | %> |
||
205 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitFromHome.do?id=<%=cu.getId()%>"><%=cu.getName()%>/<%=cu.getCode()%> (<%=cu.getCourseName() + "/" +cu.getCourseCode()%>)</a></li> |
||
206 | <% |
||
207 | } |
||
208 | %> |
||
209 | </ul> |
||
210 | <% |
||
211 | } |
||
212 | %> |
||
213 | </div> |
||
1029 | jmachado | 214 | </div> |
1040 | jmachado | 215 | </div> |
1029 | jmachado | 216 | <% |
217 | } |
||
1070 | jmachado | 218 | |
1024 | jmachado | 219 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
220 | }catch(Throwable e) |
||
221 | { |
||
222 | System.out.println(e); |
||
223 | e.printStackTrace(); |
||
224 | } |
||
225 | %> |
||
226 | |||
227 | |||
228 | <% |
||
1034 | jmachado | 229 | |
1024 | jmachado | 230 | try{ |
1034 | jmachado | 231 | HibernateUtils.getCurrentSession().beginTransaction(); |
232 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
1070 | jmachado | 233 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
234 | |||
1040 | jmachado | 235 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result0 = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession); |
236 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result1 = DaoFactory.getCourseUnitDaoImpl().loadMissingProgramValidate(UserSession); |
||
1034 | jmachado | 237 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result2 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluationValidate(UserSession); |
238 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result3 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluation(UserSession); |
||
1040 | jmachado | 239 | if(result0.size() > 0 || result1.size() > 0 || result2.size() > 0 || result3.size()>0) |
1034 | jmachado | 240 | { |
241 | %> |
||
242 | <div class="block"> |
||
1040 | jmachado | 243 | <div class="panel panel-primary"> |
244 | <div class="panel-heading">Tarefas das Comissões de Curso (<%=activeYear%>)</div> |
||
245 | <div class="panel-body"> |
||
1041 | jmachado | 246 | <p>Expanda os cursos e clique nas unidades para validar os relatórios de avaliação.</p> |
247 | <p>No final de cada relatório existe um botão de validação para os membros das comissões dos cursos respectivos.</p> |
||
981 | jmachado | 248 | |
960 | jmachado | 249 | |
250 | |||
1040 | jmachado | 251 | |
252 | |||
1041 | jmachado | 253 | |
254 | <% |
||
1040 | jmachado | 255 | if(result1.size()>0) |
256 | { |
||
257 | %> |
||
258 | |||
259 | <div class="panel-body-h1">Fichas curriculares por validar</div> |
||
260 | <ul> |
||
261 | <% |
||
262 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result1) |
||
263 | { |
||
264 | %> |
||
265 | <li><a href="<%=request.getContextPath()%>/user/startLoadCoursesProgramsFromHome.do?courseId=<%=mis.course.getId()%>#<%=mis.course.getId()%>"><%=mis.course.getName()%> (<%=mis.courseUnits.size()%>)</a></li> |
||
266 | <% |
||
267 | } |
||
268 | %> |
||
269 | </ul> |
||
270 | |||
271 | <% |
||
272 | } |
||
273 | %> |
||
274 | |||
275 | <% |
||
276 | if(result0.size()>0) |
||
277 | { |
||
278 | %> |
||
279 | |||
280 | <div class="panel-body-h1">Fichas curriculares por preencher</div> |
||
1034 | jmachado | 281 | <ul> |
282 | <% |
||
1040 | jmachado | 283 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result0) |
1034 | jmachado | 284 | { |
285 | %> |
||
1039 | jmachado | 286 | <li><a href="<%=request.getContextPath()%>/user/startLoadCoursesProgramsFromHome.do?courseId=<%=mis.course.getId()%>#<%=mis.course.getId()%>"><%=mis.course.getName()%> (<%=mis.courseUnits.size()%>)</a></li> |
1034 | jmachado | 287 | <% |
288 | } |
||
289 | %> |
||
290 | </ul> |
||
291 | |||
1040 | jmachado | 292 | <% |
293 | } |
||
294 | %> |
||
295 | |||
1034 | jmachado | 296 | <% |
1040 | jmachado | 297 | if(result2.size()>0) |
1034 | jmachado | 298 | { |
1040 | jmachado | 299 | |
300 | %> |
||
301 | |||
1070 | jmachado | 302 | <div class="panel-body-h1">Relatórios de avaliação por validar (graus em processo de validação: |
303 | <% |
||
304 | String sep = ""; |
||
305 | for(String activeDegree: activeDegrees) |
||
306 | { |
||
307 | %> |
||
308 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
309 | <% |
||
310 | sep = ", "; |
||
311 | } |
||
312 | %>) |
||
313 | </div> |
||
1040 | jmachado | 314 | |
315 | <% |
||
316 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result2) |
||
317 | { |
||
1034 | jmachado | 318 | %> |
1040 | jmachado | 319 | |
320 | <h2><a href="javascript:showOrHide('evaluationValidate<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>)</h2> |
||
321 | <div id="evaluationValidate<%=mis.course.getId()%>" style="display: none"> |
||
322 | <ul> |
||
323 | <% |
||
324 | for(CourseUnit cu: mis.courseUnits) |
||
325 | { |
||
326 | %> |
||
1070 | jmachado | 327 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getName()%> / <%=cu.getCode()%></a></li> |
1040 | jmachado | 328 | <% |
329 | } |
||
330 | %> |
||
331 | </ul> |
||
332 | </div> |
||
333 | |||
334 | |||
1034 | jmachado | 335 | <% |
1040 | jmachado | 336 | } |
337 | %> |
||
1034 | jmachado | 338 | |
1040 | jmachado | 339 | <% |
340 | |||
1034 | jmachado | 341 | } |
342 | %> |
||
343 | <% |
||
1040 | jmachado | 344 | if(result3.size()>0) |
1034 | jmachado | 345 | { |
1040 | jmachado | 346 | |
960 | jmachado | 347 | %> |
1040 | jmachado | 348 | |
1070 | jmachado | 349 | <div class="panel-body-h1">Relatórios de avaliação ainda não preenchidos (graus em processo de validação: |
350 | <% |
||
351 | String sep = ""; |
||
352 | for(String activeDegree: activeDegrees) |
||
353 | { |
||
354 | %> |
||
355 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
356 | <% |
||
357 | sep = ","; |
||
358 | } |
||
359 | %>) |
||
360 | </div> |
||
1040 | jmachado | 361 | |
960 | jmachado | 362 | <% |
1040 | jmachado | 363 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result3) |
960 | jmachado | 364 | { |
365 | %> |
||
1040 | jmachado | 366 | |
367 | <h2><a href="javascript:showOrHide('evaluationFill<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>)</h2> |
||
368 | <div id="evaluationFill<%=mis.course.getId()%>" style="display: none"> |
||
369 | <ul> |
||
370 | <% |
||
371 | for(CourseUnit cu: mis.courseUnits) |
||
372 | { |
||
373 | %> |
||
1070 | jmachado | 374 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getName()%> / <%=cu.getCode()%></a></li> |
1040 | jmachado | 375 | <% |
376 | } |
||
377 | %> |
||
378 | </ul> |
||
379 | </div> |
||
960 | jmachado | 380 | <% |
381 | } |
||
382 | %> |
||
383 | |||
384 | <% |
||
1040 | jmachado | 385 | |
967 | jmachado | 386 | } |
387 | %> |
||
1034 | jmachado | 388 | |
1040 | jmachado | 389 | </div> |
390 | </div> |
||
1034 | jmachado | 391 | </div> |
392 | <% |
||
393 | } |
||
1070 | jmachado | 394 | |
1034 | jmachado | 395 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
961 | jmachado | 396 | }catch(Throwable e) |
397 | { |
||
398 | System.out.println(e); |
||
399 | e.printStackTrace(); |
||
400 | } |
||
960 | jmachado | 401 | %> |
402 | |||
403 | |||
404 | |||
204 | jmachado | 405 | </td> |
406 | </tr> |
||
407 | </tbody> |
||
408 | </table> |
||
409 | </div> |