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