Rev 1354 | Rev 1373 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1354 | Rev 1372 | ||
---|---|---|---|
Line 19... | Line 19... | ||
19 | <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> |
19 | <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> |
20 | <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> |
20 | <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> |
21 | <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> |
21 | <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> |
22 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
22 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
23 | 23 | ||
- | 24 | <% |
|
- | 25 | String all = request.getParameter("all"); |
|
- | 26 | %> |
|
24 | <div class="panel panel-default"> |
27 | <div class="panel panel-default"> |
25 | <div class="panel-heading"> |
28 | <div class="panel-heading"> |
26 | Estatisticas Unidades nos Cursos |
29 | Estatisticas Unidades nos Cursos |
27 | </div> |
30 | </div> |
28 | <div class="panel-body"> |
31 | <div class="panel-body"> |
Line 133... | Line 136... | ||
133 | <% |
136 | <% |
134 | try |
137 | try |
135 | { |
138 | { |
136 | AbstractDao.getCurrentSession().beginTransaction(); |
139 | AbstractDao.getCurrentSession().beginTransaction(); |
137 | 140 | ||
- | 141 | if(all == null) |
|
- | 142 | { |
|
138 | %> |
143 | %> |
139 | <div class="dropdown"> |
144 | <div class="row"> |
- | 145 | <div class="dropdown col-sm-3"> |
|
140 | <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Escolha Comissão |
146 | <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Escolha Comissão |
141 | <span class="caret"></span></button> |
147 | <span class="caret"></span></button> |
142 | <ul class="dropdown-menu"> |
148 | <ul class="dropdown-menu"> |
143 | <%--<ul class="nav nav-tabs">--%> |
149 | <%--<ul class="nav nav-tabs">--%> |
144 | <% |
150 | <% |
145 | for(String roleCourse: comissionsRoles) |
151 | for(String roleCourse: comissionsRoles) |
146 | { |
152 | { |
147 | request.setAttribute("roleCourse",roleCourse); |
153 | request.setAttribute("roleCourse",roleCourse); |
148 | %> |
154 | %> |
149 | <li id="rolesSeparators<%=roleCourse%>"><a href="javascript:showRoleSeparator('<%=roleCourse%>')"><bean:message key="user.role.${roleCourse}"/></a></li> |
155 | <li id="rolesSeparators<%=roleCourse%>"><a href="javascript:showRoleSeparator('<%=roleCourse%>')"><bean:message key="user.role.${roleCourse}"/></a></li> |
150 | <% |
156 | <% |
- | 157 | } |
|
151 | } |
158 | %> |
- | 159 | </ul> |
|
152 | %> |
160 | </div> |
- | 161 | <div class="col-sm-3"> |
|
- | 162 | <html:link styleClass="btn btn-default" action="/user/startLoadCourseCourseUnitsStatistics?all=true">Mostrar Tudo na mesma tabela</html:link> |
|
153 | </ul> |
163 | </div> |
154 | </div> |
164 | </div> |
155 | 165 | ||
156 | <% |
166 | <% |
- | 167 | } |
|
- | 168 | else if(all!=null && all.equals("true")) |
|
- | 169 | { |
|
- | 170 | %> |
|
- | 171 | <html:link styleClass="btn btn-default" action="/user/startLoadCourseCourseUnitsStatistics">Filtrar por Comissão de Curso</html:link> |
|
- | 172 | <table class="tablesorter tablesorterfiltered"> |
|
- | 173 | <thead> |
|
- | 174 | <tr> |
|
- | 175 | <th>Cod Curso.</th> |
|
- | 176 | <th class="filter-name filter-select">Curso</th> |
|
- | 177 | <th>Cod.</th> |
|
- | 178 | <th class="filter-name filter-select">Sem.</th> |
|
- | 179 | <th>Nome</th> |
|
- | 180 | ||
- | 181 | ||
- | 182 | <th>Sums</th> |
|
- | 183 | <th>Sums Pre</th> |
|
- | 184 | <th>Sums Falt</th> |
|
- | 185 | ||
- | 186 | <th><P></P>lan</th> |
|
- | 187 | <th class="filter-name filter-select">Ficha</th> |
|
- | 188 | <th>Aval.Enu</th> |
|
- | 189 | <th>Aval.Paut</th> |
|
- | 190 | <th class="filter-name filter-select">Relat.</th> |
|
- | 191 | <th class="filter-name filter-select">Pedag.</th> |
|
- | 192 | ||
- | 193 | <th>Conteud.</th> |
|
- | 194 | <th class="filter-name filter-select">Detalhes</th> |
|
- | 195 | ||
- | 196 | </tr> |
|
- | 197 | </thead> |
|
- | 198 | <tbody> |
|
- | 199 | <% |
|
- | 200 | } |
|
157 | for(String roleCourse: comissionsRoles) |
201 | for(String roleCourse: comissionsRoles) |
158 | { |
202 | { |
159 | request.setAttribute("roleCourse",roleCourse); |
203 | request.setAttribute("roleCourse",roleCourse); |
- | 204 | if(all == null) |
|
- | 205 | { |
|
160 | %> |
206 | %> |
161 | <div id="ROLE_VALIDATION_<%=roleCourse%>" style="display: none"> |
207 | <div id="ROLE_VALIDATION_<%=roleCourse%>" style="display: none"> |
162 | <h1><bean:message key="user.role.${roleCourse}"/></h1> |
208 | <h1><bean:message key="user.role.${roleCourse}"/></h1> |
163 | <% |
209 | <% |
- | 210 | } |
|
164 | Criteria c = AbstractDao.getCurrentSession().createCriteria(CourseUnit.class) |
211 | Criteria c = AbstractDao.getCurrentSession().createCriteria(CourseUnit.class) |
165 | .setProjection(Projections.projectionList() |
212 | .setProjection(Projections.projectionList() |
166 | .add(Projections.groupProperty("c.id")) |
213 | .add(Projections.groupProperty("c.id")) |
167 | .add(Projections.property("c.name")) |
214 | .add(Projections.property("c.name")) |
168 | .add(Projections.property("c.code"))) |
215 | .add(Projections.property("c.code"))) |
169 | .createAlias("course", "c") |
216 | .createAlias("course", "c") |
170 | .add(eq("importYear", UserSession.getNowConfiguration().getInterfaceImportYear())) |
217 | .add(eq("importYear", UserSession.getNowConfiguration().getInterfaceImportYear())) |
171 | .add(eq("c.validationRole", roleCourse)); |
218 | .add(eq("c.validationRole", roleCourse)); |
172 | List<Object[]> coursesForRole = c.list(); |
219 | List<Object[]> coursesForRole = c.list(); |
173 | 220 | ||
174 | if(coursesForRole.size() > 1) |
221 | if(all==null && coursesForRole.size() > 1) |
175 | { |
222 | { |
176 | %> |
223 | %> |
177 | <div class="alert alert-info alert-small">Mais que um curso para o papel <bean:message key="user.role.${roleCourse}"/></div> |
224 | <div class="alert alert-info alert-small">Mais que um curso para o papel <bean:message key="user.role.${roleCourse}"/></div> |
178 | <% |
225 | <% |
179 | } |
226 | } |
- | 227 | if(all == null) |
|
- | 228 | { |
|
180 | %> |
229 | %> |
181 | <hr/> |
230 | <hr/> |
182 | <% |
231 | <% |
- | 232 | } |
|
- | 233 | ||
- | 234 | ||
183 | for(Object[] courseArray: coursesForRole) |
235 | for(Object[] courseArray: coursesForRole) |
184 | { |
236 | { |
185 | Long courseId = (Long) courseArray[0]; |
237 | Long courseId = (Long) courseArray[0]; |
186 | String courseName = (String) courseArray[1]; |
238 | String courseName = (String) courseArray[1]; |
187 | String courseCode = (String) courseArray[2]; |
239 | String courseCode = (String) courseArray[2]; |
Line 193... | Line 245... | ||
193 | .add(eq("c.id", courseId)) |
245 | .add(eq("c.id", courseId)) |
194 | ; |
246 | ; |
195 | c.addOrder(Order.asc("name")); |
247 | c.addOrder(Order.asc("name")); |
196 | List<Long> courseUnits = c.list(); |
248 | List<Long> courseUnits = c.list(); |
197 | 249 | ||
198 | if(courseUnits.size() == 0) |
250 | if(all==null && courseUnits.size() == 0) |
199 | { |
251 | { |
200 | %> |
252 | %> |
201 | <h2><bean:message key="user.role.${roleCourse}"/> </h2> |
253 | <h2><bean:message key="user.role.${roleCourse}"/> </h2> |
202 | <div class="alert alert-info alert-small"> |
254 | <div class="alert alert-info alert-small"> |
203 | Não foram encontradas unidades curriculares no ano ${UserSession.nowConfiguration.interfaceImportYear} |
255 | Não foram encontradas unidades curriculares no ano ${UserSession.nowConfiguration.interfaceImportYear} |
Line 206... | Line 258... | ||
206 | } |
258 | } |
207 | else |
259 | else |
208 | { |
260 | { |
209 | // |
261 | // |
210 | // List<Student> students = DaoFactory.getStudentDaoImpl().loadFromCoursesWithValidationRoles(comissionsRoles,UserSession.getNowConfiguration().getInterfaceImportYear()); |
262 | // List<Student> students = DaoFactory.getStudentDaoImpl().loadFromCoursesWithValidationRoles(comissionsRoles,UserSession.getNowConfiguration().getInterfaceImportYear()); |
- | 263 | if(all == null) |
|
- | 264 | { |
|
211 | %> |
265 | %> |
212 | <h2><%=courseName%> (<%=courseCode%>)</h2> |
266 | <h2><%=courseName%> (<%=courseCode%>)</h2> |
213 | <div class="alert alert-info alert-small"> |
267 | <div class="alert alert-info alert-small"> |
214 | Existem <%=courseUnits.size()%> unidades no ano ${UserSession.nowConfiguration.interfaceImportYear} |
268 | Existem <%=courseUnits.size()%> unidades no ano ${UserSession.nowConfiguration.interfaceImportYear} |
215 | </div> |
269 | </div> |
Line 238... | Line 292... | ||
238 | 292 | ||
239 | </tr> |
293 | </tr> |
240 | </thead> |
294 | </thead> |
241 | <tbody> |
295 | <tbody> |
242 | <% |
296 | <% |
- | 297 | } |
|
243 | for(Long unit: courseUnits) |
298 | for(Long unit: courseUnits) |
244 | { |
299 | { |
245 | Long unitId = unit; |
300 | Long unitId = unit; |
246 | CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().load(unitId); |
301 | CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().load(unitId); |
247 | request.setAttribute("cu",cu); |
302 | request.setAttribute("cu",cu); |
248 | %> |
303 | %> |
249 | <tr> |
304 | <tr> |
- | 305 | <% |
|
- | 306 | if(all != null && all.equals("true")) |
|
- | 307 | { |
|
- | 308 | %> |
|
- | 309 | <td><%=courseCode%></td> |
|
- | 310 | <td><%=courseName%></td> |
|
- | 311 | <% |
|
- | 312 | } |
|
- | 313 | %> |
|
250 | <td>${cu.code}</td> |
314 | <td>${cu.code}</td> |
251 | <td>${cu.semestre}</td> |
315 | <td>${cu.semestre}</td> |
252 | <td><html:link target="_blank" action="/user/startLoadCourseUnitFromHome?id=${cu.id}"> ${cu.name}</html:link></td> |
316 | <td><html:link target="_blank" action="/user/startLoadCourseUnitFromHome?id=${cu.id}"> ${cu.name}</html:link></td> |
253 | <td>${cu.statdtpSumaries}</td> |
317 | <td>${cu.statdtpSumaries}</td> |
254 | <td>${cu.statdtpSumariesPrelancados}</td> |
318 | <td>${cu.statdtpSumariesPrelancados}</td> |
Line 262... | Line 326... | ||
262 | <td>${cu.statcontentsFiles}</td> |
326 | <td>${cu.statcontentsFiles}</td> |
263 | <td><button class="btn btn-default" data-href="<%=request.getContextPath()%>/user/courseunits/statsAjax.jsp?courseUnitId=${cu.id}" data-title="Estatisticas da Unidade ${cu.name} (${cu.code})" data-toggle="modal" data-target="#modalAjaxRequest"><span class="glyphicon glyphicon-zoom-in"/></button> </td> |
327 | <td><button class="btn btn-default" data-href="<%=request.getContextPath()%>/user/courseunits/statsAjax.jsp?courseUnitId=${cu.id}" data-title="Estatisticas da Unidade ${cu.name} (${cu.code})" data-toggle="modal" data-target="#modalAjaxRequest"><span class="glyphicon glyphicon-zoom-in"/></button> </td> |
264 | </tr> |
328 | </tr> |
265 | <% |
329 | <% |
266 | } |
330 | } |
- | 331 | ||
- | 332 | if(all == null) |
|
- | 333 | { |
|
267 | %> |
334 | %> |
- | 335 | ||
268 | </tbody> |
336 | </tbody> |
269 | </table> |
337 | </table> |
270 | 338 | ||
271 | <% |
339 | <% |
- | 340 | } |
|
272 | } |
341 | } |
273 | 342 | ||
274 | } |
343 | } |
275 | 344 | ||
- | 345 | if(all == null) |
|
- | 346 | { |
|
276 | %> |
347 | %> |
277 | </div> <!--FIM DE ROLE VALIDATION--> |
348 | </div> <!--FIM DE ROLE VALIDATION--> |
278 | <% |
349 | <% |
- | 350 | } |
|
- | 351 | ||
- | 352 | } |
|
- | 353 | if(all != null && all.equals("true")) |
|
- | 354 | { |
|
- | 355 | %> |
|
- | 356 | </tbody> |
|
- | 357 | </table> |
|
- | 358 | <% |
|
279 | } |
359 | } |
280 | AbstractDao.getCurrentSession().getTransaction().commit(); |
360 | AbstractDao.getCurrentSession().getTransaction().commit(); |
281 | } |
361 | } |
282 | catch(Exception e) |
362 | catch(Exception e) |
283 | { |
363 | { |