Rev 981 | Rev 1024 | 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" %> |
10 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
11 | <%@ page import="pt.estgp.estgweb.domain.dao.impl.CourseUnitDaoImpl" %> |
||
787 | jmachado | 12 | <%@ page import="java.util.List" %> |
960 | jmachado | 13 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
995 | jmachado | 14 | <%@ page import="pt.estgp.estgweb.domain.Configuration" %> |
15 | <%@ page import="pt.estgp.estgweb.domain.ConfigurationImpl" %> |
||
16 | <%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
||
204 | jmachado | 17 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
18 | <div class="portal"> |
||
432 | jmachado | 19 | <logic:notMatch value="TeacherImpl" name="UserSession" property="user.class.name"> |
301 | jmachado | 20 | <ul> |
21 | <li class="WARNING"> |
||
432 | jmachado | 22 | <bean:message key="profile.bad.profile.teacher.iregular.user.class"/> |
301 | jmachado | 23 | </li> |
24 | </ul> |
||
432 | jmachado | 25 | </logic:notMatch> |
204 | jmachado | 26 | <table class="columnTable" width="100%"> |
27 | <tbody> |
||
28 | <tr> |
||
215 | jmachado | 29 | <baco:isModuleOn module="courseunits"> |
30 | <td class="column"> |
||
31 | <div class="block"> |
||
787 | jmachado | 32 | <% |
33 | java.util.List<String> years = new java.util.ArrayList<String>(); |
||
995 | jmachado | 34 | String nowImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction(); |
35 | years.add(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction()); |
||
36 | years.add(DatesUtils.getPreviousImportYear(nowImportYear)); |
||
787 | jmachado | 37 | |
38 | java.util.Collections.sort(years, new java.util.Comparator<String>() |
||
39 | { |
||
40 | public int compare(String o1, String o2) { |
||
41 | return o2.compareTo(o1); |
||
42 | } |
||
43 | }); |
||
44 | |||
45 | for(String year: years) |
||
46 | { |
||
47 | |||
48 | String yearFormatted = pt.estgp.estgweb.utils.DatesUtils.getImportYearFormatted(year); |
||
49 | |||
50 | %> |
||
51 | |||
789 | jmachado | 52 | <h2><bean:message key="intranet.course.units"/> - <%=yearFormatted%></h2> |
787 | jmachado | 53 | <ul> |
54 | <li> |
||
55 | <p><bean:message key="courseunit.semestre"/> 1</p> |
||
56 | <% |
||
57 | List<pt.estgp.estgweb.domain.CourseUnit> cus = ((pt.estgp.estgweb.domain.TeacherImpl)UserSession.getUser()).getTeachedUnitsViewS1(year); |
||
58 | if(cus == null || cus.size() == 0) |
||
59 | { |
||
60 | %><bean:message key="courseunit.zero.units"/><% |
||
61 | } |
||
789 | jmachado | 62 | else if(cus.size() > 0) |
787 | jmachado | 63 | { |
64 | %> |
||
65 | <ul> |
||
550 | jmachado | 66 | <% |
787 | jmachado | 67 | for(pt.estgp.estgweb.domain.CourseUnit unit:cus) |
550 | jmachado | 68 | { |
787 | jmachado | 69 | request.setAttribute("unit",unit); |
70 | %> |
||
71 | <li> |
||
72 | <% |
||
73 | String courseCode = ""; |
||
74 | if(unit.getCourse() != null) |
||
75 | { |
||
76 | String courseName = unit.getCourse().getName(); |
||
77 | String[] words = courseName.split(" "); |
||
78 | for(String word: words) |
||
79 | { |
||
80 | if(word != null && word.length() > 3 && word.charAt(0) >= 'A' && word.charAt(0) <= 'Z' ) |
||
81 | { |
||
82 | courseCode += word.charAt(0); |
||
83 | } |
||
84 | } |
||
85 | } |
||
86 | |||
87 | %> |
||
88 | <html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}))</html:link> |
||
89 | <html:link action="/user/startLoadCourseUnitRootFromHome?courseUnitView.id=${unit.id}"><img border="0" alt="Pastas" src="<%=request.getContextPath()%>/imgs/folder.gif"></html:link> |
||
90 | </li> |
||
91 | <% |
||
550 | jmachado | 92 | } |
787 | jmachado | 93 | %> |
94 | </ul> |
||
95 | <% |
||
96 | } |
||
97 | %> |
||
550 | jmachado | 98 | |
787 | jmachado | 99 | |
100 | </li> |
||
101 | <li> |
||
102 | <p><bean:message key="courseunit.semestre"/> 2</p> |
||
103 | <% |
||
104 | cus = ((pt.estgp.estgweb.domain.TeacherImpl)UserSession.getUser()).getTeachedUnitsViewS2(year); |
||
105 | if(cus == null || cus.size() == 0) |
||
106 | { |
||
107 | %><bean:message key="courseunit.zero.units"/><% |
||
108 | } |
||
789 | jmachado | 109 | else if(cus.size() > 0) |
787 | jmachado | 110 | { |
111 | %> |
||
112 | <ul> |
||
113 | <% |
||
114 | for(pt.estgp.estgweb.domain.CourseUnit unit:cus) |
||
550 | jmachado | 115 | { |
787 | jmachado | 116 | request.setAttribute("unit",unit); |
117 | %> |
||
118 | <li> |
||
119 | <% |
||
120 | String courseCode = ""; |
||
121 | if(unit.getCourse() != null) |
||
122 | { |
||
123 | String courseName = unit.getCourse().getName(); |
||
124 | String[] words = courseName.split(" "); |
||
125 | for(String word: words) |
||
126 | { |
||
127 | if(word != null && word.length() > 3 && word.charAt(0) >= 'A' && word.charAt(0) <= 'Z' ) |
||
128 | { |
||
129 | courseCode += word.charAt(0); |
||
130 | } |
||
131 | } |
||
132 | } |
||
133 | |||
134 | %> |
||
135 | <html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}))</html:link> |
||
136 | <html:link action="/user/startLoadCourseUnitRootFromHome?courseUnitView.id=${unit.id}"><img border="0" alt="Pastas" src="<%=request.getContextPath()%>/imgs/folder.gif"></html:link> |
||
137 | </li> |
||
138 | <% |
||
550 | jmachado | 139 | } |
787 | jmachado | 140 | %> |
141 | </ul> |
||
142 | <% |
||
143 | } |
||
144 | %> |
||
550 | jmachado | 145 | |
787 | jmachado | 146 | |
147 | </li> |
||
148 | <li> |
||
149 | <p><bean:message key="courseunit.semestre"/> (Anuais)</p> |
||
150 | <% |
||
151 | cus = ((pt.estgp.estgweb.domain.TeacherImpl)UserSession.getUser()).getTeachedUnitsViewA(year); |
||
152 | if(cus == null || cus.size() == 0) |
||
153 | { |
||
154 | %><bean:message key="courseunit.zero.units"/><% |
||
155 | } |
||
789 | jmachado | 156 | else if(cus.size() > 0) |
787 | jmachado | 157 | { |
158 | %> |
||
159 | <ul> |
||
728 | jmachado | 160 | <% |
787 | jmachado | 161 | for(pt.estgp.estgweb.domain.CourseUnit unit:cus) |
728 | jmachado | 162 | { |
787 | jmachado | 163 | request.setAttribute("unit",unit); |
164 | %> |
||
165 | <li> |
||
166 | <% |
||
167 | String courseCode = ""; |
||
168 | if(unit.getCourse() != null) |
||
169 | { |
||
170 | String courseName = unit.getCourse().getName(); |
||
171 | String[] words = courseName.split(" "); |
||
172 | for(String word: words) |
||
173 | { |
||
174 | if(word != null && word.length() > 3 && word.charAt(0) >= 'A' && word.charAt(0) <= 'Z' ) |
||
175 | { |
||
176 | courseCode += word.charAt(0); |
||
177 | } |
||
178 | } |
||
179 | } |
||
180 | |||
181 | %> |
||
182 | <html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}))</html:link> |
||
183 | <html:link action="/user/startLoadCourseUnitRootFromHome?courseUnitView.id=${unit.id}"><img border="0" alt="Pastas" src="<%=request.getContextPath()%>/imgs/folder.gif"></html:link> |
||
184 | </li> |
||
185 | <% |
||
728 | jmachado | 186 | } |
787 | jmachado | 187 | %> |
188 | </ul> |
||
189 | <% |
||
190 | } |
||
191 | %> |
||
192 | </li> |
||
193 | </ul> |
||
194 | <% |
||
195 | } |
||
196 | %> |
||
728 | jmachado | 197 | |
215 | jmachado | 198 | </div> |
376 | jmachado | 199 | <div class="block"> |
200 | <p><bean:message key="intranet.home.curricular"/></p> |
||
201 | <ul> |
||
202 | <li> |
||
203 | <html:link action="/user/startLoadCoursesProgramsFromHome"><bean:message key="courseunit.programs"/></html:link> |
||
204 | </li> |
||
205 | </ul> |
||
206 | </div> |
||
215 | jmachado | 207 | </td> |
208 | </baco:isModuleOn> |
||
204 | jmachado | 209 | <td class="column"> |
215 | jmachado | 210 | <baco:isModuleOn module="courseunits"> |
211 | <jsp:include page="/user/home/courseUnitsAnnouncements.jsp"/> |
||
212 | </baco:isModuleOn> |
||
213 | <baco:isModuleOn module="todos"> |
||
214 | <jsp:include page="/user/home/todos.jsp"/> |
||
215 | </baco:isModuleOn> |
||
960 | jmachado | 216 | <% |
961 | jmachado | 217 | try{ |
960 | jmachado | 218 | HibernateUtils.getCurrentSession().beginTransaction(); |
219 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result = DaoFactory.getCourseUnitDaoImpl().loadMissingProgramValidate(UserSession); |
||
220 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result2 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluationValidate(UserSession); |
||
967 | jmachado | 221 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result3 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluation(UserSession); |
222 | if(result.size() > 0 || result2.size() > 0 || result3.size()>0) |
||
960 | jmachado | 223 | { |
224 | %> |
||
225 | <div class="block"> |
||
965 | jmachado | 226 | <p class="WARNING"><label class="WARNING"> Tarefas das Comissões de Curso</label></p> |
981 | jmachado | 227 | |
961 | jmachado | 228 | <ul> |
960 | jmachado | 229 | |
230 | |||
231 | <% |
||
232 | if(result.size()>0) |
||
233 | { |
||
234 | %> |
||
961 | jmachado | 235 | <li> |
980 | jmachado | 236 | <h1>Fichas curriculares por validar</h1> |
961 | jmachado | 237 | <ul> |
238 | <% |
||
239 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result) |
||
240 | { |
||
241 | %> |
||
242 | <li><a href="<%=request.getContextPath()%>/user/startLoadCoursesProgramsFromHome.do#<%=mis.course.getId()%>"><%=mis.course.getName()%> (<%=mis.courseUnits.size()%>)</a></li> |
||
243 | <% |
||
244 | } |
||
245 | %> |
||
246 | </ul> |
||
247 | </li> |
||
960 | jmachado | 248 | <% |
249 | } |
||
250 | %> |
||
251 | <% |
||
252 | if(result2.size()>0) |
||
253 | { |
||
961 | jmachado | 254 | |
960 | jmachado | 255 | %> |
961 | jmachado | 256 | <li> |
980 | jmachado | 257 | <h1>Relatórios de avaliação por validar</h1> |
981 | jmachado | 258 | <p>Expanda os cursos e clique nas unidades para validar os relatórios de avaliação.</p> |
259 | <p>No final de cada relatório existe um botão de validação para os membros das comissões dos cursos respectivos.</p> |
||
960 | jmachado | 260 | <ul> |
261 | <% |
||
262 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result2) |
||
263 | { |
||
264 | %> |
||
980 | jmachado | 265 | <li> |
266 | <h2><a href="javascript:showOrHide('evaluationValidate<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>)</h2> |
||
267 | <ul id="evaluationValidate<%=mis.course.getId()%>" style="display: none"> |
||
960 | jmachado | 268 | <% |
269 | for(CourseUnit cu: mis.courseUnits) |
||
270 | { |
||
271 | %> |
||
963 | jmachado | 272 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getImportYear()%> / <%=cu.getName()%> / <%=cu.getCode()%></a></li> |
960 | jmachado | 273 | <% |
274 | } |
||
275 | %> |
||
276 | </ul> |
||
277 | |||
278 | </li> |
||
279 | <% |
||
280 | } |
||
281 | %> |
||
282 | </ul> |
||
961 | jmachado | 283 | </li> |
960 | jmachado | 284 | <% |
961 | jmachado | 285 | |
960 | jmachado | 286 | } |
287 | %> |
||
967 | jmachado | 288 | <% |
289 | if(result3.size()>0) |
||
290 | { |
||
291 | |||
292 | %> |
||
293 | <li> |
||
980 | jmachado | 294 | <h1>Relatórios de avaliação ainda não preenchidos</h1> |
967 | jmachado | 295 | <ul> |
296 | <% |
||
297 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result3) |
||
298 | { |
||
299 | %> |
||
980 | jmachado | 300 | <li> |
301 | <h2><a href="javascript:showOrHide('evaluationFill<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>)</h2> |
||
302 | <ul id="evaluationFill<%=mis.course.getId()%>" style="display: none"> |
||
967 | jmachado | 303 | <% |
304 | for(CourseUnit cu: mis.courseUnits) |
||
305 | { |
||
306 | %> |
||
307 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getImportYear()%> / <%=cu.getName()%> / <%=cu.getCode()%></a></li> |
||
308 | <% |
||
309 | } |
||
310 | %> |
||
311 | </ul> |
||
312 | |||
313 | </li> |
||
314 | <% |
||
315 | } |
||
316 | %> |
||
317 | </ul> |
||
318 | </li> |
||
319 | <% |
||
320 | |||
321 | } |
||
322 | %> |
||
961 | jmachado | 323 | </ul> |
960 | jmachado | 324 | </div> |
325 | <% |
||
326 | } |
||
327 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
||
961 | jmachado | 328 | }catch(Throwable e) |
329 | { |
||
330 | System.out.println(e); |
||
331 | e.printStackTrace(); |
||
332 | } |
||
960 | jmachado | 333 | %> |
334 | |||
335 | |||
336 | |||
204 | jmachado | 337 | </td> |
338 | </tr> |
||
339 | </tbody> |
||
340 | </table> |
||
341 | </div> |