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