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