Rev 1346 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1312 | 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" %> |
||
9 | <%@ page import="jomm.dao.utils.HibernateUtils" %> |
||
10 | <%@ page import="jomm.utils.MessageResources" %> |
||
11 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
||
12 | <%@ page import="pt.estgp.estgweb.domain.TeacherImpl" %> |
||
13 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
14 | <%@ page import="pt.estgp.estgweb.domain.dao.impl.CourseUnitDaoImpl" %> |
||
15 | <%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
||
16 | <%@ page import="java.util.List" %> |
||
17 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
||
18 | |||
19 | <!-- PARA BOOTSTRAP NOVO PORTAL--> |
||
20 | <%--<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/offcanvas.css"/>--%> |
||
21 | |||
22 | |||
23 | <logic:notMatch value="TeacherImpl" name="UserSession" property="user.class.name"> |
||
24 | <div class="alert alert-warning"> |
||
25 | <bean:message key="profile.bad.profile.teacher.iregular.user.class"/> |
||
26 | </div> |
||
27 | </logic:notMatch> |
||
28 | |||
29 | <jsp:include page="todosAfazer.jsp"/> |
||
30 | |||
31 | <div class="row"> |
||
32 | <div class="col-md-6 col-sm-12 col-xs-12"> |
||
33 | <baco:isModuleOn module="courseunits"> |
||
34 | |||
35 | |||
36 | <% |
||
37 | java.util.List<String> years = new java.util.ArrayList<String>(); |
||
38 | String nowImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction(); |
||
39 | years.add(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction()); |
||
40 | years.add(DatesUtils.getPreviousImportYear(nowImportYear)); |
||
41 | |||
42 | java.util.Collections.sort(years, new java.util.Comparator<String>() |
||
43 | { |
||
44 | public int compare(String o1, String o2) { |
||
45 | return o2.compareTo(o1); |
||
46 | } |
||
47 | }); |
||
48 | |||
49 | |||
50 | |||
51 | for(String year: years) |
||
52 | { |
||
53 | |||
54 | String yearFormatted = pt.estgp.estgweb.utils.DatesUtils.getImportYearFormatted(year); |
||
55 | |||
56 | |||
57 | %> |
||
58 | |||
59 | |||
60 | <div class="panel panel-primary"> |
||
61 | <div class="panel-heading"><bean:message key="intranet.course.units"/> - <%=yearFormatted%></div> |
||
62 | <div class="panel-body"> |
||
63 | |||
64 | |||
65 | |||
66 | <% |
||
67 | String[] semestres = new String[]{"A","S1","S2","T1","T2","T3","T4"}; |
||
68 | String[] semestreLabel = new String[]{ |
||
69 | MessageResources.getMessage(request,"courseunit.anuais"), |
||
70 | MessageResources.getMessage(request,"courseunit.semestre") + "1", |
||
71 | MessageResources.getMessage(request,"courseunit.semestre") + "2", |
||
72 | MessageResources.getMessage(request,"courseunit.trimestre") + "1", |
||
73 | MessageResources.getMessage(request,"courseunit.trimestre") + "2", |
||
74 | MessageResources.getMessage(request,"courseunit.trimestre") + "3", |
||
75 | MessageResources.getMessage(request,"courseunit.trimestre") + "4"}; |
||
76 | |||
77 | for(int i =0;i< semestres.length;i++) |
||
78 | { |
||
79 | request.setAttribute("LABEL",semestreLabel[i]); |
||
80 | %> |
||
81 | |||
82 | <jsp:useBean id="LABEL" scope="request" type="java.lang.String"/> |
||
83 | <% |
||
84 | TeacherImpl u = ((pt.estgp.estgweb.domain.TeacherImpl)UserSession.getUser()); |
||
85 | List<pt.estgp.estgweb.domain.CourseUnit> cus= |
||
86 | (List<CourseUnit>) |
||
87 | u.getClass().getMethod("getTeachedUnitsView" + semestres[i],String.class) |
||
88 | .invoke(u,year); |
||
89 | request.setAttribute("units",cus); |
||
90 | if(cus == null || cus.size() == 0) |
||
91 | {} |
||
92 | else if(cus.size() > 0) |
||
93 | { |
||
94 | %> |
||
95 | <jsp:useBean id="units" scope="request" type="java.util.Collection"/> |
||
96 | <div class="list-group"> |
||
97 | <div class="list-group-item list-group-item-heading"><bean:write name="LABEL"/></div> |
||
98 | |||
99 | <logic:iterate id="unit" name="units" type="pt.estgp.estgweb.domain.CourseUnit"> |
||
100 | <div class="list-group-item"> |
||
101 | <div class="row"> |
||
102 | <div class="col-sm-10"><html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}) ${unit.cdTurma}</html:link></div> |
||
103 | <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> |
||
104 | </div> |
||
105 | </div> |
||
106 | </logic:iterate> |
||
107 | </div> |
||
108 | <% |
||
109 | } |
||
110 | } |
||
111 | |||
112 | %> |
||
113 | |||
114 | </div> |
||
115 | </div> |
||
116 | <% |
||
117 | } |
||
118 | %> |
||
119 | |||
120 | </baco:isModuleOn> |
||
121 | <%-- |
||
122 | <baco:isModuleOn module="todos"> |
||
123 | <jsp:include page="/user/home/todos.jsp"/> |
||
124 | </baco:isModuleOn>--%> |
||
125 | <baco:isModuleOn module="courseunits"> |
||
126 | <jsp:include page="/user/home/courseUnitsAnnouncements.jsp"/> |
||
127 | </baco:isModuleOn> |
||
128 | |||
129 | |||
130 | </div> |
||
131 | <div class="col-md-6 col-sm-12 col-xs-12"> |
||
132 | |||
133 | |||
134 | <div class="panel panel-primary"> |
||
135 | <div class="panel-heading"><bean:message key="intranet.home.curricular"/></div> |
||
136 | <div class="panel-body"> |
||
137 | <!--<p><bean:message key="intranet.home.curricular"/></p>--> |
||
138 | <!--<ul> |
||
139 | <li>--> |
||
140 | <div class="list-group"> |
||
141 | <div class="list-group-item"> |
||
142 | <html:link action="/user/startLoadCoursesProgramsFromHome"><bean:message key="courseunit.indexes"/></html:link> |
||
143 | </div> |
||
144 | <div class="list-group-item"> |
||
145 | <html:link action="/user/courseComissions"><bean:message key="course.comissions"/></html:link> |
||
146 | </div> |
||
147 | </div> |
||
148 | <!--</li> |
||
149 | </ul>--> |
||
150 | </div> |
||
151 | </div> |
||
152 | |||
153 | <% |
||
154 | try{ |
||
155 | HibernateUtils.getCurrentSession().beginTransaction(); |
||
156 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
157 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
||
158 | |||
159 | List<CourseUnit> evaluations = DaoFactory.getCourseUnitDaoImpl().loadTeacherUnitsMissingEvaluation(UserSession); |
||
160 | List<CourseUnit> programs = DaoFactory.getCourseUnitDaoImpl().loadMissingPrograms(UserSession.getUser().getId()); |
||
161 | if(programs != null && programs.size() > 0 || evaluations!= null && evaluations.size() > 0) |
||
162 | { |
||
163 | %> |
||
164 | |||
165 | |||
166 | |||
167 | |||
168 | <div class="panel panel-primary"> |
||
169 | <div class="panel-heading">Tarefas Docente Relativas a Unidades (<%=activeYear%>)</div> |
||
170 | <div class="panel-body"> |
||
171 | <% |
||
172 | if(programs != null && programs.size() > 0) |
||
173 | { |
||
174 | %> |
||
175 | |||
176 | <div class="list-group"> |
||
177 | <div class="list-group-item active">Fichas Curriculares por preencher</div> |
||
178 | <% |
||
179 | for(CourseUnit cu: programs) |
||
180 | { |
||
181 | %> |
||
182 | <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> |
||
183 | <% |
||
184 | } |
||
185 | %> |
||
186 | </div> |
||
187 | |||
188 | <% |
||
189 | } |
||
190 | if(evaluations != null && evaluations.size() > 0) |
||
191 | { |
||
192 | %> |
||
193 | <div class="list-group"> |
||
194 | <div class="list-group-item active">Relatórios de avaliação por preencher/entregar |
||
195 | <% |
||
196 | if(activeDegrees != null) |
||
197 | { |
||
198 | %> |
||
199 | (graus em processo de validação: |
||
200 | <% |
||
201 | String sep = ""; |
||
202 | for(String activeDegree: activeDegrees) |
||
203 | { |
||
204 | %> |
||
205 | <%=sep + MessageResources.getInstance(request).getMessage("course."+activeDegree)%> |
||
206 | <% |
||
207 | sep = ", "; |
||
208 | } |
||
209 | %> |
||
210 | ) |
||
211 | <% |
||
212 | } |
||
213 | %> |
||
214 | |||
215 | </div> |
||
216 | |||
217 | <% |
||
218 | for(CourseUnit cu: evaluations) |
||
219 | { |
||
220 | %> |
||
221 | <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> |
||
222 | <% |
||
223 | } |
||
224 | %> |
||
225 | </div> |
||
226 | <% |
||
227 | } |
||
228 | %> |
||
229 | </div> |
||
230 | </div> |
||
231 | |||
232 | <% |
||
233 | } |
||
234 | |||
235 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
||
236 | }catch(Throwable e) |
||
237 | { |
||
238 | System.out.println(e); |
||
239 | e.printStackTrace(); |
||
240 | } |
||
241 | %> |
||
242 | |||
243 | <jsp:include page="courseComission.jsp"/> |
||
244 | |||
245 | </div> |
||
246 | </div> |
||
247 |