Rev 1371 | Rev 1525 | 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"> |
||
1354 | jmachado | 170 | <html:link action="/user/startLoadCourseCourseUnitsStatistics">Consultar estatisticas das Unidades Curriculares</html:link> |
1353 | jmachado | 171 | </div> |
172 | <div class="list-group-item"> |
||
173 | <html:link action="/user/listStudentsCourseComission"> |
||
174 | Consultar Alunos |
||
175 | </html:link> |
||
176 | </div> |
||
1366 | jmachado | 177 | <!--<div class="list-group-item"> |
1353 | jmachado | 178 | <html:link action="/user/startSubmitMessageCourseComission"> |
179 | Consultar Docentes |
||
180 | </html:link> |
||
1366 | jmachado | 181 | </div>--> |
1353 | jmachado | 182 | <div class="list-group-item"> |
183 | <html:link action="/user/startLoadCoursesProgramsFromHome?importYear=${UserSession.nowConfiguration.interfaceImportYear}&forUser=courseCommission">Atalho para as validações (${UserSession.nowConfiguration.interfaceImportYear})</html:link> |
||
184 | </div> |
||
185 | <div class="list-group-item"> |
||
186 | <html:link action="/user/startLoadCoursesProgramsFromHome?importYear=${UserSession.nowConfiguration.previousInterfaceImportYear}&forUser=courseCommission">Atalho para as validações (${UserSession.nowConfiguration.previousInterfaceImportYear})</html:link> |
||
187 | </div> |
||
188 | </div> |
||
189 | <!--</li> |
||
190 | </ul>--> |
||
1040 | jmachado | 191 | </div> |
192 | </div> |
||
1353 | jmachado | 193 | <jsp:include page="courseComission.jsp"/> |
194 | <% |
||
195 | } |
||
196 | %> |
||
1070 | jmachado | 197 | |
1353 | jmachado | 198 | |
1312 | jmachado | 199 | <% |
200 | try{ |
||
201 | HibernateUtils.getCurrentSession().beginTransaction(); |
||
202 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
203 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
||
1040 | jmachado | 204 | |
1428 | jmachado | 205 | |
206 | long time = System.currentTimeMillis(); |
||
1312 | jmachado | 207 | List<CourseUnit> evaluations = DaoFactory.getCourseUnitDaoImpl().loadTeacherUnitsMissingEvaluation(UserSession); |
1428 | jmachado | 208 | System.out.println("TIME10: " + (System.currentTimeMillis()-time)); |
209 | time = System.currentTimeMillis(); |
||
1312 | jmachado | 210 | List<CourseUnit> programs = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession.getUser().getId()); |
1428 | jmachado | 211 | System.out.println("TIME11: " + (System.currentTimeMillis()-time)); |
212 | time = System.currentTimeMillis(); |
||
1312 | jmachado | 213 | if(programs != null && programs.size() > 0 || evaluations!= null && evaluations.size() > 0) |
214 | { |
||
215 | %> |
||
1040 | jmachado | 216 | |
217 | |||
218 | |||
1077 | jmachado | 219 | |
1312 | jmachado | 220 | <div class="panel panel-primary"> |
221 | <div class="panel-heading">Tarefas Docente Relativas a Unidades (<%=activeYear%>)</div> |
||
222 | <div class="panel-body"> |
||
223 | <% |
||
224 | if(programs != null && programs.size() > 0) |
||
225 | { |
||
226 | %> |
||
227 | |||
228 | <div class="list-group"> |
||
229 | <div class="list-group-item active">Fichas Curriculares por preencher</div> |
||
1029 | jmachado | 230 | <% |
1312 | jmachado | 231 | for(CourseUnit cu: programs) |
232 | { |
||
233 | %> |
||
234 | <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> |
||
235 | <% |
||
236 | } |
||
237 | %> |
||
238 | </div> |
||
1070 | jmachado | 239 | |
1312 | jmachado | 240 | <% |
241 | } |
||
242 | if(evaluations != null && evaluations.size() > 0) |
||
1024 | jmachado | 243 | { |
1312 | jmachado | 244 | %> |
245 | <div class="list-group"> |
||
246 | <div class="list-group-item active">Relatórios de avaliação por preencher/entregar |
||
247 | <% |
||
248 | if(activeDegrees != null) |
||
249 | { |
||
250 | %> |
||
251 | (graus em processo de validação: |
||
252 | <% |
||
253 | String sep = ""; |
||
254 | for(String activeDegree: activeDegrees) |
||
255 | { |
||
256 | %> |
||
257 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
258 | <% |
||
259 | sep = ", "; |
||
260 | } |
||
261 | %> |
||
262 | ) |
||
263 | <% |
||
264 | } |
||
265 | %> |
||
266 | |||
267 | </div> |
||
268 | |||
269 | <% |
||
270 | for(CourseUnit cu: evaluations) |
||
271 | { |
||
272 | %> |
||
273 | <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> |
||
274 | <% |
||
275 | } |
||
276 | %> |
||
277 | </div> |
||
278 | <% |
||
1024 | jmachado | 279 | } |
280 | %> |
||
1312 | jmachado | 281 | </div> |
282 | </div> |
||
1024 | jmachado | 283 | |
1312 | jmachado | 284 | <% |
285 | } |
||
1024 | jmachado | 286 | |
1312 | jmachado | 287 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
288 | }catch(Throwable e) |
||
289 | { |
||
290 | System.out.println(e); |
||
291 | e.printStackTrace(); |
||
292 | } |
||
293 | %> |
||
1034 | jmachado | 294 | |
1070 | jmachado | 295 | |
1353 | jmachado | 296 | |
1312 | jmachado | 297 | </div> |
298 | </div> |
||
981 | jmachado | 299 |