Rev 1312 | Rev 1353 | 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" %> |
204 | jmachado | 17 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" 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"> |
1312 | jmachado | 33 | <baco:isModuleOn module="courseunits"> |
787 | jmachado | 34 | |
35 | |||
1312 | jmachado | 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)); |
||
1040 | jmachado | 41 | |
1312 | jmachado | 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 | }); |
||
1040 | jmachado | 48 | |
787 | jmachado | 49 | |
50 | |||
1312 | jmachado | 51 | for(String year: years) |
52 | { |
||
787 | jmachado | 53 | |
1312 | jmachado | 54 | String yearFormatted = pt.estgp.estgweb.utils.DatesUtils.getImportYearFormatted(year); |
55 | |||
56 | |||
1040 | jmachado | 57 | %> |
787 | jmachado | 58 | |
550 | jmachado | 59 | |
1312 | jmachado | 60 | <div class="panel panel-primary"> |
61 | <div class="panel-heading"><bean:message key="intranet.course.units"/> - <%=yearFormatted%></div> |
||
62 | <div class="panel-body"> |
||
787 | jmachado | 63 | |
1040 | jmachado | 64 | |
787 | jmachado | 65 | |
1312 | jmachado | 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"}; |
||
550 | jmachado | 76 | |
1312 | jmachado | 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) |
||
1040 | jmachado | 88 | .invoke(u,year); |
1312 | jmachado | 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> |
||
1040 | jmachado | 98 | |
1312 | jmachado | 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> |
||
1040 | jmachado | 107 | </div> |
787 | jmachado | 108 | <% |
1312 | jmachado | 109 | } |
787 | jmachado | 110 | } |
1312 | jmachado | 111 | |
787 | jmachado | 112 | %> |
1040 | jmachado | 113 | |
1312 | jmachado | 114 | </div> |
115 | </div> |
||
116 | <% |
||
117 | } |
||
118 | %> |
||
1040 | jmachado | 119 | |
1312 | jmachado | 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> |
||
1024 | jmachado | 128 | |
1312 | jmachado | 129 | |
130 | </div> |
||
1320 | jmachado | 131 | <div class="col-md-6 col-sm-12 col-xs-12" style="padding-left: 6px"> |
1312 | jmachado | 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> |
||
1040 | jmachado | 143 | </div> |
1312 | jmachado | 144 | <div class="list-group-item"> |
145 | <html:link action="/user/courseComissions"><bean:message key="course.comissions"/></html:link> |
||
146 | </div> |
||
1040 | jmachado | 147 | </div> |
1312 | jmachado | 148 | <!--</li> |
149 | </ul>--> |
||
150 | </div> |
||
151 | </div> |
||
1070 | jmachado | 152 | |
1312 | jmachado | 153 | <% |
154 | try{ |
||
155 | HibernateUtils.getCurrentSession().beginTransaction(); |
||
156 | String activeYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYear(); |
||
157 | List<String> activeDegrees = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveDegrees(); |
||
1040 | jmachado | 158 | |
1312 | jmachado | 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 | %> |
||
1040 | jmachado | 164 | |
165 | |||
166 | |||
1077 | jmachado | 167 | |
1312 | jmachado | 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> |
||
1029 | jmachado | 178 | <% |
1312 | jmachado | 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> |
||
1070 | jmachado | 187 | |
1312 | jmachado | 188 | <% |
189 | } |
||
190 | if(evaluations != null && evaluations.size() > 0) |
||
1024 | jmachado | 191 | { |
1312 | jmachado | 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 | <% |
||
1024 | jmachado | 227 | } |
228 | %> |
||
1312 | jmachado | 229 | </div> |
230 | </div> |
||
1024 | jmachado | 231 | |
1312 | jmachado | 232 | <% |
233 | } |
||
1024 | jmachado | 234 | |
1312 | jmachado | 235 | HibernateUtils.getCurrentSession().getTransaction().commit(); |
236 | }catch(Throwable e) |
||
237 | { |
||
238 | System.out.println(e); |
||
239 | e.printStackTrace(); |
||
240 | } |
||
241 | %> |
||
1034 | jmachado | 242 | |
1312 | jmachado | 243 | <jsp:include page="courseComission.jsp"/> |
1070 | jmachado | 244 | |
1312 | jmachado | 245 | </div> |
246 | </div> |
||
981 | jmachado | 247 |