Rev 1975 | 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" %> |
||
1701 | jmachado | 9 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
960 | jmachado | 10 | <%@ page import="jomm.dao.utils.HibernateUtils" %> |
1040 | jmachado | 11 | <%@ page import="jomm.utils.MessageResources" %> |
12 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
||
1701 | jmachado | 13 | <%@ page import="pt.estgp.estgweb.domain.Teacher" %> |
1040 | jmachado | 14 | <%@ page import="pt.estgp.estgweb.domain.TeacherImpl" %> |
960 | jmachado | 15 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
995 | jmachado | 16 | <%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
1040 | jmachado | 17 | <%@ page import="java.util.List" %> |
1988 | grupo4 | 18 | |
19 | |||
1353 | jmachado | 20 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
1040 | jmachado | 21 | |
22 | <!-- PARA BOOTSTRAP NOVO PORTAL--> |
||
1045 | jmachado | 23 | <%--<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/offcanvas.css"/>--%> |
1040 | jmachado | 24 | |
1312 | jmachado | 25 | |
432 | jmachado | 26 | <logic:notMatch value="TeacherImpl" name="UserSession" property="user.class.name"> |
1312 | jmachado | 27 | <div class="alert alert-warning"> |
432 | jmachado | 28 | <bean:message key="profile.bad.profile.teacher.iregular.user.class"/> |
1312 | jmachado | 29 | </div> |
432 | jmachado | 30 | </logic:notMatch> |
1312 | jmachado | 31 | |
1254 | jmachado | 32 | <jsp:include page="todosAfazer.jsp"/> |
1040 | jmachado | 33 | |
1312 | jmachado | 34 | <div class="row"> |
1320 | jmachado | 35 | <div class="col-md-6 col-sm-12 col-xs-12" style="padding-right: 6px"> |
1353 | jmachado | 36 | |
1312 | jmachado | 37 | <baco:isModuleOn module="courseunits"> |
1353 | jmachado | 38 | <div class="panel panel-primary"> |
39 | <div class="panel-heading"><bean:message key="intranet.home.curricular"/></div> |
||
40 | <div class="panel-body"> |
||
41 | <!--<p><bean:message key="intranet.home.curricular"/></p>--> |
||
42 | <!--<ul> |
||
43 | <li>--> |
||
44 | <div class="list-group"> |
||
45 | <div class="list-group-item"> |
||
46 | <html:link action="/user/startLoadCoursesProgramsFromHome"><bean:message key="courseunit.indexes"/></html:link> |
||
47 | </div> |
||
48 | <div class="list-group-item"> |
||
49 | <html:link action="/user/courseComissions"><bean:message key="course.comissions"/></html:link> |
||
50 | </div> |
||
1371 | jmachado | 51 | <div class="list-group-item"> |
52 | <a href="<%=request.getContextPath()%>/dir/utilsIntranet/comAvalDesemp">Avaliação de Desempenho Docente</a> |
||
53 | </div> |
||
1353 | jmachado | 54 | </div> |
55 | <!--</li> |
||
56 | </ul>--> |
||
57 | </div> |
||
58 | </div> |
||
787 | jmachado | 59 | |
60 | |||
1312 | jmachado | 61 | <% |
62 | java.util.List<String> years = new java.util.ArrayList<String>(); |
||
63 | String nowImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction(); |
||
64 | years.add(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction()); |
||
65 | years.add(DatesUtils.getPreviousImportYear(nowImportYear)); |
||
1040 | jmachado | 66 | |
1312 | jmachado | 67 | java.util.Collections.sort(years, new java.util.Comparator<String>() |
68 | { |
||
69 | public int compare(String o1, String o2) { |
||
70 | return o2.compareTo(o1); |
||
71 | } |
||
72 | }); |
||
1040 | jmachado | 73 | |
787 | jmachado | 74 | |
75 | |||
1312 | jmachado | 76 | for(String year: years) |
77 | { |
||
787 | jmachado | 78 | |
1312 | jmachado | 79 | String yearFormatted = pt.estgp.estgweb.utils.DatesUtils.getImportYearFormatted(year); |
80 | |||
81 | |||
1040 | jmachado | 82 | %> |
787 | jmachado | 83 | |
550 | jmachado | 84 | |
1312 | jmachado | 85 | <div class="panel panel-primary"> |
86 | <div class="panel-heading"><bean:message key="intranet.course.units"/> - <%=yearFormatted%></div> |
||
87 | <div class="panel-body"> |
||
787 | jmachado | 88 | |
1040 | jmachado | 89 | |
787 | jmachado | 90 | |
1312 | jmachado | 91 | <% |
92 | String[] semestres = new String[]{"A","S1","S2","T1","T2","T3","T4"}; |
||
93 | String[] semestreLabel = new String[]{ |
||
94 | MessageResources.getMessage(request,"courseunit.anuais"), |
||
95 | MessageResources.getMessage(request,"courseunit.semestre") + "1", |
||
96 | MessageResources.getMessage(request,"courseunit.semestre") + "2", |
||
97 | MessageResources.getMessage(request,"courseunit.trimestre") + "1", |
||
98 | MessageResources.getMessage(request,"courseunit.trimestre") + "2", |
||
99 | MessageResources.getMessage(request,"courseunit.trimestre") + "3", |
||
100 | MessageResources.getMessage(request,"courseunit.trimestre") + "4"}; |
||
550 | jmachado | 101 | |
1312 | jmachado | 102 | for(int i =0;i< semestres.length;i++) |
103 | { |
||
104 | request.setAttribute("LABEL",semestreLabel[i]); |
||
105 | %> |
||
106 | |||
107 | <jsp:useBean id="LABEL" scope="request" type="java.lang.String"/> |
||
108 | <% |
||
109 | TeacherImpl u = ((pt.estgp.estgweb.domain.TeacherImpl)UserSession.getUser()); |
||
110 | List<pt.estgp.estgweb.domain.CourseUnit> cus= |
||
111 | (List<CourseUnit>) |
||
112 | u.getClass().getMethod("getTeachedUnitsView" + semestres[i],String.class) |
||
1040 | jmachado | 113 | .invoke(u,year); |
1312 | jmachado | 114 | request.setAttribute("units",cus); |
115 | if(cus == null || cus.size() == 0) |
||
116 | {} |
||
117 | else if(cus.size() > 0) |
||
118 | { |
||
119 | %> |
||
120 | <jsp:useBean id="units" scope="request" type="java.util.Collection"/> |
||
121 | <div class="list-group"> |
||
122 | <div class="list-group-item list-group-item-heading"><bean:write name="LABEL"/></div> |
||
1040 | jmachado | 123 | |
1312 | jmachado | 124 | <logic:iterate id="unit" name="units" type="pt.estgp.estgweb.domain.CourseUnit"> |
125 | <div class="list-group-item"> |
||
126 | <div class="row"> |
||
127 | <div class="col-sm-10"><html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}) ${unit.cdTurma}</html:link></div> |
||
128 | <div class="col-sm-2"><html:link action="/user/startLoadCourseUnitRootFromHome?courseUnitView.id=${unit.id}"> <span style="padding:5px" class="glyphicon glyphicon-folder-open"></span> </html:link></div> |
||
129 | </div> |
||
130 | </div> |
||
131 | </logic:iterate> |
||
1040 | jmachado | 132 | </div> |
787 | jmachado | 133 | <% |
1312 | jmachado | 134 | } |
787 | jmachado | 135 | } |
1312 | jmachado | 136 | |
787 | jmachado | 137 | %> |
1040 | jmachado | 138 | |
1312 | jmachado | 139 | </div> |
140 | </div> |
||
141 | <% |
||
142 | } |
||
143 | %> |
||
1040 | jmachado | 144 | |
1312 | jmachado | 145 | </baco:isModuleOn> |
146 | <%-- |
||
147 | <baco:isModuleOn module="todos"> |
||
148 | <jsp:include page="/user/home/todos.jsp"/> |
||
149 | </baco:isModuleOn>--%> |
||
150 | <baco:isModuleOn module="courseunits"> |
||
151 | <jsp:include page="/user/home/courseUnitsAnnouncements.jsp"/> |
||
152 | </baco:isModuleOn> |
||
1024 | jmachado | 153 | |
1312 | jmachado | 154 | |
155 | </div> |
||
1320 | jmachado | 156 | <div class="col-md-6 col-sm-12 col-xs-12" style="padding-left: 6px"> |
1312 | jmachado | 157 | |
1353 | jmachado | 158 | <% |
1701 | jmachado | 159 | AbstractDao.getCurrentSession().beginTransaction(); |
160 | TeacherImpl tLoggedIn = (TeacherImpl) DaoFactory.getTeacherDaoImpl().get(UserSession.getUser().getId()); |
||
161 | boolean hasCommisionsOrCoordinations = tLoggedIn.hasCoordinationsOrBelongToCourseCommissions(); |
||
1988 | grupo4 | 162 | |
163 | request.setAttribute("tLoggedIn", tLoggedIn); |
||
164 | |||
1701 | jmachado | 165 | AbstractDao.getCurrentSession().getTransaction().commit(); |
1988 | grupo4 | 166 | |
1701 | jmachado | 167 | if( hasCommisionsOrCoordinations ) |
1353 | jmachado | 168 | { |
1988 | grupo4 | 169 | |
1353 | jmachado | 170 | %> |
1975 | grupo4 | 171 | |
172 | <!--Painel de Coordenadores --> |
||
173 | |||
1353 | jmachado | 174 | <div class="panel panel-primary"> |
175 | <div class="panel-heading">As minhas Comissões de Curso</div> |
||
176 | <div class="panel-body"> |
||
1312 | jmachado | 177 | |
1353 | jmachado | 178 | <div class="list-group"> |
179 | <div class="list-group-item"> |
||
180 | <html:link action="/user/startSubmitMessageCourseComission"> |
||
181 | Enviar email aos alunos |
||
182 | </html:link> |
||
183 | </div> |
||
184 | <div class="list-group-item"> |
||
1525 | jmachado | 185 | <html:link action="/user/startLoadCourseCourseUnitsStatistics?importYear=${UserSession.nowConfiguration.interfaceImportYear}">Consultar estatisticas das Unidades Curriculares (${UserSession.nowConfiguration.interfaceImportYear})</html:link> |
1353 | jmachado | 186 | </div> |
187 | <div class="list-group-item"> |
||
1525 | jmachado | 188 | <html:link action="/user/startLoadCourseCourseUnitsStatistics?importYear=${UserSession.nowConfiguration.previousInterfaceImportYear}">Consultar estatisticas das Unidades Curriculares (${UserSession.nowConfiguration.previousInterfaceImportYear})</html:link> |
189 | </div> |
||
190 | <div class="list-group-item"> |
||
1353 | jmachado | 191 | <html:link action="/user/listStudentsCourseComission"> |
192 | Consultar Alunos |
||
193 | </html:link> |
||
194 | </div> |
||
1366 | jmachado | 195 | <!--<div class="list-group-item"> |
1353 | jmachado | 196 | <html:link action="/user/startSubmitMessageCourseComission"> |
197 | Consultar Docentes |
||
198 | </html:link> |
||
1366 | jmachado | 199 | </div>--> |
1353 | jmachado | 200 | <div class="list-group-item"> |
201 | <html:link action="/user/startLoadCoursesProgramsFromHome?importYear=${UserSession.nowConfiguration.interfaceImportYear}&forUser=courseCommission">Atalho para as validações (${UserSession.nowConfiguration.interfaceImportYear})</html:link> |
||
202 | </div> |
||
203 | <div class="list-group-item"> |
||
204 | <html:link action="/user/startLoadCoursesProgramsFromHome?importYear=${UserSession.nowConfiguration.previousInterfaceImportYear}&forUser=courseCommission">Atalho para as validações (${UserSession.nowConfiguration.previousInterfaceImportYear})</html:link> |
||
205 | </div> |
||
1817 | jmachado | 206 | |
207 | <div class="list-group-item"> |
||
208 | <html:link action="/user/courseReportTools?importYear=${UserSession.nowConfiguration.previousInterfaceImportYear}">Utilitários do Relatório de Curso (${UserSession.nowConfiguration.previousInterfaceImportYear})</html:link> |
||
209 | </div> |
||
1975 | grupo4 | 210 | |
211 | |||
212 | |||
1988 | grupo4 | 213 | <logic:iterate id="idCourse" name="tLoggedIn" property="coordinatorCourses" type="pt.estgp.estgweb.domain.Course"> |
214 | <div class="list-group-item"> |
||
215 | <html:link action="/user/editCourseReport.do?courseCode=${idCourse.code}&year=${UserSession.nowConfiguration.courseReportImportYear}">Editar o relatório de Curso do ano (${UserSession.nowConfiguration.courseReportImportYear})</html:link> |
||
216 | </div> |
||
217 | </logic:iterate> |
||
1975 | grupo4 | 218 | |
219 | |||
220 | |||
221 | |||
222 | |||
223 | |||
1988 | grupo4 | 224 | |
225 | |||
226 | |||
227 | |||
228 | |||
229 | |||
1353 | jmachado | 230 | </div> |
231 | <!--</li> |
||
232 | </ul>--> |
||
1040 | jmachado | 233 | </div> |
234 | </div> |
||
1353 | jmachado | 235 | <jsp:include page="courseComission.jsp"/> |
236 | <% |
||
237 | } |
||
1701 | jmachado | 238 | |
1353 | jmachado | 239 | %> |
1070 | jmachado | 240 | |
1353 | jmachado | 241 | |
1312 | jmachado | 242 | <% |
243 | try{ |
||
244 | HibernateUtils.getCurrentSession().beginTransaction(); |
||
245 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
246 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
||
1040 | jmachado | 247 | |
1428 | jmachado | 248 | |
249 | long time = System.currentTimeMillis(); |
||
1312 | jmachado | 250 | List<CourseUnit> evaluations = DaoFactory.getCourseUnitDaoImpl().loadTeacherUnitsMissingEvaluation(UserSession); |
1701 | jmachado | 251 | //System.out.println("TIME10: " + (System.currentTimeMillis()-time)); |
1428 | jmachado | 252 | time = System.currentTimeMillis(); |
1312 | jmachado | 253 | List<CourseUnit> programs = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession.getUser().getId()); |
1701 | jmachado | 254 | //System.out.println("TIME11: " + (System.currentTimeMillis()-time)); |
1428 | jmachado | 255 | time = System.currentTimeMillis(); |
1312 | jmachado | 256 | if(programs != null && programs.size() > 0 || evaluations!= null && evaluations.size() > 0) |
257 | { |
||
258 | %> |
||
1040 | jmachado | 259 | |
260 | |||
261 | |||
1077 | jmachado | 262 | |
1525 | jmachado | 263 | <div class="panel panel-info"> |
264 | <div class="panel-heading"><span class="glyphicon glyphicon-education"> </span> Tarefas Docentes</div> |
||
1312 | jmachado | 265 | <div class="panel-body"> |
266 | <% |
||
267 | if(programs != null && programs.size() > 0) |
||
268 | { |
||
269 | %> |
||
270 | |||
271 | <div class="list-group"> |
||
1525 | jmachado | 272 | <div class="list-group-item list-group-item-heading"><span class="icon icon-file-pdf"></span> <label class="label label-info" style="font-size:1em">${UserSession.nowConfiguration.interfaceImportYear}</label> Fichas Curriculares por preencher </div> |
1029 | jmachado | 273 | <% |
1312 | jmachado | 274 | for(CourseUnit cu: programs) |
275 | { |
||
276 | %> |
||
277 | <div class="list-group-item"><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitProgram.do?courseUnitId=<%=cu.getId()%>"><%=cu.getName()%>/<%=cu.getCode()%> (<%=cu.getCourseName() + "/" +cu.getCourseCode()%>)</a></div> |
||
278 | <% |
||
279 | } |
||
280 | %> |
||
281 | </div> |
||
1070 | jmachado | 282 | |
1312 | jmachado | 283 | <% |
284 | } |
||
285 | if(evaluations != null && evaluations.size() > 0) |
||
1024 | jmachado | 286 | { |
1312 | jmachado | 287 | %> |
288 | <div class="list-group"> |
||
1525 | jmachado | 289 | <div class="list-group-item list-group-item-warning"><span class="icon icon-clipboard"></span> <label class="label label-warning" style="font-size:1em"><%=activeYear%></label> Relatórios de avaliação por preencher/entregar de <%=activeYear%> |
290 | <%--<% |
||
1312 | jmachado | 291 | if(activeDegrees != null) |
292 | { |
||
293 | %> |
||
294 | (graus em processo de validação: |
||
295 | <% |
||
296 | String sep = ""; |
||
297 | for(String activeDegree: activeDegrees) |
||
298 | { |
||
299 | %> |
||
300 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
301 | <% |
||
302 | sep = ", "; |
||
303 | } |
||
304 | %> |
||
305 | ) |
||
306 | <% |
||
307 | } |
||
308 | %> |
||
1525 | jmachado | 309 | --%> |
1312 | jmachado | 310 | </div> |
311 | |||
312 | <% |
||
313 | for(CourseUnit cu: evaluations) |
||
314 | { |
||
315 | %> |
||
316 | <div class="list-group-item"><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitFromHome.do?id=<%=cu.getId()%>"><%=cu.getName()%>/<%=cu.getCode()%> (<%=cu.getCourseName() + "/" +cu.getCourseCode()%>)</a></div> |
||
317 | <% |
||
318 | } |
||
319 | %> |
||
320 | </div> |
||
321 | <% |
||
1024 | jmachado | 322 | } |
323 | %> |
||
1312 | jmachado | 324 | </div> |
325 | </div> |
||
1024 | jmachado | 326 | |
1312 | jmachado | 327 | <% |
328 | } |
||
1024 | jmachado | 329 | |
1312 | jmachado | 330 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
331 | }catch(Throwable e) |
||
332 | { |
||
333 | System.out.println(e); |
||
334 | e.printStackTrace(); |
||
335 | } |
||
336 | %> |
||
1034 | jmachado | 337 | |
1070 | jmachado | 338 | |
1353 | jmachado | 339 | |
1312 | jmachado | 340 | </div> |
341 | </div> |
||
981 | jmachado | 342 |