Rev 1428 | Rev 1699 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1094 | jmachado | 1 | <%@ page import="jomm.dao.utils.HibernateUtils" %> |
2 | <%@ page import="jomm.utils.MessageResources" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
||
4 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
5 | <%@ page import="pt.estgp.estgweb.domain.dao.impl.CourseUnitDaoImpl" %> |
||
6 | <%@ page import="java.util.List" %> |
||
7 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
1525 | jmachado | 8 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
1094 | jmachado | 9 | <% |
10 | |||
11 | try{ |
||
12 | HibernateUtils.getCurrentSession().beginTransaction(); |
||
13 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
14 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
||
1428 | jmachado | 15 | long time = System.currentTimeMillis(); |
1094 | jmachado | 16 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result0 = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession); |
1428 | jmachado | 17 | System.out.println("TIME1: " + (System.currentTimeMillis()-time)); |
18 | time = System.currentTimeMillis(); |
||
1094 | jmachado | 19 | List<CourseUnitDaoImpl.CourseMissingValidationProgram> result1 = DaoFactory.getCourseUnitDaoImpl().loadMissingProgramValidate(UserSession); |
1428 | jmachado | 20 | System.out.println("TIME2: " + (System.currentTimeMillis()-time)); |
21 | time = System.currentTimeMillis(); |
||
1094 | jmachado | 22 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result2 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluationValidate(UserSession); |
1428 | jmachado | 23 | System.out.println("TIME3: " + (System.currentTimeMillis()-time)); |
24 | time = System.currentTimeMillis(); |
||
1094 | jmachado | 25 | List<CourseUnitDaoImpl.CourseMissingValidationEvaluation> result3 = DaoFactory.getCourseUnitDaoImpl().loadMissingEvaluation(UserSession); |
1428 | jmachado | 26 | System.out.println("TIME4: " + (System.currentTimeMillis()-time)); |
27 | time = System.currentTimeMillis(); |
||
1094 | jmachado | 28 | if(result0.size() > 0 || result1.size() > 0 || result2.size() > 0 || result3.size()>0) |
29 | { |
||
30 | %> |
||
1312 | jmachado | 31 | |
1525 | jmachado | 32 | <div class="panel panel-default"> |
33 | <div class="panel-heading"><span class="icon icon-library"></span> Tarefas das Comissões de Curso</div> |
||
1094 | jmachado | 34 | <div class="panel-body"> |
35 | <% |
||
36 | if(result1.size()>0) |
||
37 | { |
||
38 | %> |
||
39 | |||
1353 | jmachado | 40 | <div class="list-group"> |
1525 | jmachado | 41 | <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 validar</div> |
1353 | jmachado | 42 | <% |
43 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result1) |
||
44 | { |
||
45 | %> |
||
46 | <div class="list-group-item"><a href="<%=request.getContextPath()%>/user/startLoadCoursesProgramsFromHome.do?courseId=<%=mis.course.getId()%>#<%=mis.course.getId()%>"><%=mis.course.getName()%> (<%=mis.courseUnits.size()%>)</a></div> |
||
47 | <% |
||
48 | } |
||
49 | %> |
||
50 | </div> |
||
1094 | jmachado | 51 | |
52 | <% |
||
53 | } |
||
54 | %> |
||
55 | |||
56 | <% |
||
57 | if(result0.size()>0) |
||
58 | { |
||
59 | %> |
||
60 | |||
1353 | jmachado | 61 | <div class="list-group"> |
1525 | jmachado | 62 | <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> |
1353 | jmachado | 63 | <% |
64 | for(CourseUnitDaoImpl.CourseMissingValidationProgram mis:result0) |
||
65 | { |
||
66 | %> |
||
67 | <div class="list-group-item"><a href="<%=request.getContextPath()%>/user/startLoadCoursesProgramsFromHome.do?courseId=<%=mis.course.getId()%>#<%=mis.course.getId()%>"><%=mis.course.getName()%> (<%=mis.courseUnits.size()%>)</a></div> |
||
68 | <% |
||
69 | } |
||
70 | %> |
||
71 | </div> |
||
1094 | jmachado | 72 | |
73 | <% |
||
74 | } |
||
75 | %> |
||
76 | |||
77 | <% |
||
78 | if(result2.size()>0) |
||
79 | { |
||
80 | |||
81 | %> |
||
82 | |||
1353 | jmachado | 83 | <div class="list-group"> |
1525 | jmachado | 84 | <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 validar |
85 | <%-- |
||
86 | <% |
||
87 | String sep = ""; |
||
88 | if(activeDegrees != null) |
||
89 | { |
||
90 | %> |
||
1353 | jmachado | 91 | |
1525 | jmachado | 92 | (graus em processo de validação: |
93 | <% |
||
94 | for(String activeDegree: activeDegrees) |
||
95 | { |
||
96 | %> |
||
97 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
98 | <% |
||
99 | sep = ", "; |
||
100 | } |
||
101 | %> |
||
102 | ) |
||
103 | <% |
||
104 | } |
||
105 | %> |
||
106 | --%> |
||
107 | </div> |
||
108 | |||
1094 | jmachado | 109 | <% |
1353 | jmachado | 110 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result2) |
1094 | jmachado | 111 | { |
112 | %> |
||
1353 | jmachado | 113 | <div class="list-group-item"><a href="javascript:showOrHide('evaluationValidate<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>) |
114 | <div id="evaluationValidate<%=mis.course.getId()%>" style="display: none"> |
||
115 | <ul> |
||
116 | <% |
||
117 | for(CourseUnit cu: mis.courseUnits) |
||
118 | { |
||
119 | %> |
||
120 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getName()%> / <%=cu.getCode()%></a></li> |
||
121 | <% |
||
122 | } |
||
123 | %> |
||
124 | </ul> |
||
125 | </div> |
||
126 | </div> |
||
1094 | jmachado | 127 | <% |
128 | } |
||
129 | %> |
||
1312 | jmachado | 130 | </div> |
1094 | jmachado | 131 | <% |
132 | |||
133 | } |
||
134 | %> |
||
135 | <% |
||
136 | if(result3.size()>0) |
||
137 | { |
||
138 | |||
139 | %> |
||
140 | |||
1312 | jmachado | 141 | <div class="list-group"> |
1525 | jmachado | 142 | <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 ainda não preenchidos |
143 | |||
144 | <%-- <% |
||
1094 | jmachado | 145 | String sep = ""; |
146 | if(activeDegrees != null) |
||
147 | { |
||
148 | %> |
||
149 | (graus em processo de validação: |
||
150 | <% |
||
151 | for(String activeDegree: activeDegrees) |
||
152 | { |
||
153 | %> |
||
154 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
155 | <% |
||
156 | sep = ","; |
||
157 | } |
||
158 | %> |
||
159 | ) |
||
160 | <% |
||
161 | } |
||
162 | %> |
||
1525 | jmachado | 163 | --%> |
1312 | jmachado | 164 | </div> |
1094 | jmachado | 165 | |
166 | <% |
||
167 | for(CourseUnitDaoImpl.CourseMissingValidationEvaluation mis:result3) |
||
168 | { |
||
169 | %> |
||
170 | |||
1353 | jmachado | 171 | <div class="list-group-item"><a href="javascript:showOrHide('evaluationFill<%=mis.course.getId()%>')"><%=mis.course.getName()%> / <%=mis.course.getCode()%></a> (<%=mis.courseUnits.size()%>) |
172 | <div id="evaluationFill<%=mis.course.getId()%>" style="display: none"> |
||
173 | <ul> |
||
174 | <% |
||
175 | for(CourseUnit cu: mis.courseUnits) |
||
176 | { |
||
177 | %> |
||
178 | <li><a href="<%=request.getContextPath()%>/user/startLoadCourseUnitEvaluation.do?courseUnitId=<%=cu.getId()%>"><%=cu.getName()%> / <%=cu.getCode()%></a></li> |
||
179 | <% |
||
180 | } |
||
181 | %> |
||
182 | </ul> |
||
183 | </div> |
||
184 | </div> |
||
1094 | jmachado | 185 | <% |
186 | } |
||
187 | %> |
||
1312 | jmachado | 188 | </div> |
1094 | jmachado | 189 | <% |
190 | |||
191 | } |
||
192 | %> |
||
193 | |||
1353 | jmachado | 194 | |
1094 | jmachado | 195 | </div> |
196 | </div> |
||
197 | <% |
||
198 | } |
||
199 | |||
200 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
||
201 | }catch(Throwable e) |
||
202 | { |
||
203 | System.out.println(e); |
||
204 | e.printStackTrace(); |
||
205 | } |
||
206 | %> |