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