Rev 1039 | Rev 1041 | 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--> |
||
22 | <link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/offcanvas.css"/> |
||
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(); |
152 | if(activeYear != null) |
||
1024 | jmachado | 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 | %> |
1040 | jmachado | 187 | <div class="panel-body-h1">Relatórios de avaliação por preencher/entregar</div> |
188 | <ul> |
||
189 | <% |
||
190 | for(CourseUnit cu: evaluations) |
||
191 | { |
||
192 | %> |
||
193 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitFromHome.do?id=<%=cu.getId()%>"><%=cu.getName()%>/<%=cu.getCode()%> (<%=cu.getCourseName() + "/" +cu.getCourseCode()%>)</a></li> |
||
194 | <% |
||
195 | } |
||
196 | %> |
||
197 | </ul> |
||
198 | <% |
||
199 | } |
||
200 | %> |
||
201 | </div> |
||
1029 | jmachado | 202 | </div> |
1040 | jmachado | 203 | </div> |
1029 | jmachado | 204 | <% |
205 | } |
||
1024 | jmachado | 206 | } |
207 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
||
208 | }catch(Throwable e) |
||
209 | { |
||
210 | System.out.println(e); |
||
211 | e.printStackTrace(); |
||
212 | } |
||
213 | %> |
||
214 | |||
215 | |||
216 | <% |
||
1034 | jmachado | 217 | |
1024 | jmachado | 218 | try{ |
1034 | jmachado | 219 | HibernateUtils.getCurrentSession().beginTransaction(); |
220 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
221 | if(activeYear != null) |
||
222 | { |
||
1040 | jmachado | 223 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result0 = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession); |
224 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result1 = DaoFactory.getCourseUnitDaoImpl().loadMissingProgramValidate(UserSession); |
||
1034 | jmachado | 225 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result2 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluationValidate(UserSession); |
226 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result3 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluation(UserSession); |
||
1040 | jmachado | 227 | if(result0.size() > 0 || result1.size() > 0 || result2.size() > 0 || result3.size()>0) |
1034 | jmachado | 228 | { |
229 | %> |
||
230 | <div class="block"> |
||
1040 | jmachado | 231 | <div class="panel panel-primary"> |
232 | <div class="panel-heading">Tarefas das Comissões de Curso (<%=activeYear%>)</div> |
||
233 | <div class="panel-body"> |
||
981 | jmachado | 234 | |
960 | jmachado | 235 | |
236 | |||
1040 | jmachado | 237 | |
238 | |||
239 | <% |
||
240 | if(result1.size()>0) |
||
241 | { |
||
242 | %> |
||
243 | |||
244 | <div class="panel-body-h1">Fichas curriculares por validar</div> |
||
245 | <ul> |
||
246 | <% |
||
247 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result1) |
||
248 | { |
||
249 | %> |
||
250 | <li><a href="<%=request.getContextPath()%>/user/startLoadCoursesProgramsFromHome.do?courseId=<%=mis.course.getId()%>#<%=mis.course.getId()%>"><%=mis.course.getName()%> (<%=mis.courseUnits.size()%>)</a></li> |
||
251 | <% |
||
252 | } |
||
253 | %> |
||
254 | </ul> |
||
255 | |||
256 | <% |
||
257 | } |
||
258 | %> |
||
259 | |||
260 | <% |
||
261 | if(result0.size()>0) |
||
262 | { |
||
263 | %> |
||
264 | |||
265 | <div class="panel-body-h1">Fichas curriculares por preencher</div> |
||
1034 | jmachado | 266 | <ul> |
267 | <% |
||
1040 | jmachado | 268 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result0) |
1034 | jmachado | 269 | { |
270 | %> |
||
1039 | jmachado | 271 | <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 | 272 | <% |
273 | } |
||
274 | %> |
||
275 | </ul> |
||
276 | |||
1040 | jmachado | 277 | <% |
278 | } |
||
279 | %> |
||
280 | |||
1034 | jmachado | 281 | <% |
1040 | jmachado | 282 | if(result2.size()>0) |
1034 | jmachado | 283 | { |
1040 | jmachado | 284 | |
285 | %> |
||
286 | |||
287 | <div class="panel-body-h1">Relatórios de avaliação por validar</div> |
||
288 | <p>Expanda os cursos e clique nas unidades para validar os relatórios de avaliação.</p> |
||
289 | <p>No final de cada relatório existe um botão de validação para os membros das comissões dos cursos respectivos.</p> |
||
290 | |||
291 | <% |
||
292 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result2) |
||
293 | { |
||
1034 | jmachado | 294 | %> |
1040 | jmachado | 295 | |
296 | <h2><a href="javascript:showOrHide('evaluationValidate<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>)</h2> |
||
297 | <div id="evaluationValidate<%=mis.course.getId()%>" style="display: none"> |
||
298 | <ul> |
||
299 | <% |
||
300 | for(CourseUnit cu: mis.courseUnits) |
||
301 | { |
||
302 | %> |
||
303 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getImportYear()%> / <%=cu.getName()%> / <%=cu.getCode()%></a></li> |
||
304 | <% |
||
305 | } |
||
306 | %> |
||
307 | </ul> |
||
308 | </div> |
||
309 | |||
310 | |||
1034 | jmachado | 311 | <% |
1040 | jmachado | 312 | } |
313 | %> |
||
1034 | jmachado | 314 | |
1040 | jmachado | 315 | <% |
316 | |||
1034 | jmachado | 317 | } |
318 | %> |
||
319 | <% |
||
1040 | jmachado | 320 | if(result3.size()>0) |
1034 | jmachado | 321 | { |
1040 | jmachado | 322 | |
960 | jmachado | 323 | %> |
1040 | jmachado | 324 | |
325 | <div class="panel-body-h1">Relatórios de avaliação ainda não preenchidos</div> |
||
326 | |||
960 | jmachado | 327 | <% |
1040 | jmachado | 328 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result3) |
960 | jmachado | 329 | { |
330 | %> |
||
1040 | jmachado | 331 | |
332 | <h2><a href="javascript:showOrHide('evaluationFill<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>)</h2> |
||
333 | <div id="evaluationFill<%=mis.course.getId()%>" style="display: none"> |
||
334 | <ul> |
||
335 | <% |
||
336 | for(CourseUnit cu: mis.courseUnits) |
||
337 | { |
||
338 | %> |
||
339 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getImportYear()%> / <%=cu.getName()%> / <%=cu.getCode()%></a></li> |
||
340 | <% |
||
341 | } |
||
342 | %> |
||
343 | </ul> |
||
344 | </div> |
||
960 | jmachado | 345 | <% |
346 | } |
||
347 | %> |
||
348 | |||
349 | <% |
||
1040 | jmachado | 350 | |
967 | jmachado | 351 | } |
352 | %> |
||
1034 | jmachado | 353 | |
1040 | jmachado | 354 | </div> |
355 | </div> |
||
1034 | jmachado | 356 | </div> |
357 | <% |
||
358 | } |
||
359 | } |
||
360 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
||
961 | jmachado | 361 | }catch(Throwable e) |
362 | { |
||
363 | System.out.println(e); |
||
364 | e.printStackTrace(); |
||
365 | } |
||
960 | jmachado | 366 | %> |
367 | |||
368 | |||
369 | |||
204 | jmachado | 370 | </td> |
371 | </tr> |
||
372 | </tbody> |
||
373 | </table> |
||
374 | </div> |