Rev 1310 | Rev 1505 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
507 | jmachado | 1 | <%@ page import="java.util.List" %> |
2 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
||
3 | <%@ page import="pt.estgp.estgweb.Globals" %> |
||
4 | <%@ page import="java.util.ArrayList" %> |
||
1283 | jmachado | 5 | <%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %> |
214 | jmachado | 6 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
7 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
10 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
15 | <jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/> |
||
1133 | jmachado | 16 | <script> |
17 | function alertPermissions() |
||
18 | { |
||
1285 | jmachado | 19 | alert("Aviso a transmitir ao Centro Informático. Este procedimento afecta as permissões atuais no sistema de ficheiros da intranet. Após salvar estas alterações, por favor gere o BAT de geração de pastas e corra-o novamente na raiz do servidor IONLINE") |
1133 | jmachado | 20 | } |
21 | function alertFolders(place) |
||
22 | { |
||
1285 | jmachado | 23 | alert("Aviso a transmitir ao Centro Informático. Caro administrador, lembramos-lhe que alterar o " + place + " de uma unidade curricular implica trocar a pasta de ficheiros da intranet do " + place + " onde esta se encontrava para o " + place + " onde actualmente se encontra. O BACO irá actualizar a nova LOCALIZAÇÃO da pasta de ficheiros na sua base de dados. Mas a pasta terá de ser fisicamente alterada pela administração de sistemas."); |
1133 | jmachado | 24 | } |
25 | |||
26 | </script> |
||
444 | jmachado | 27 | <html:errors/> |
28 | <jomm:messages/> |
||
214 | jmachado | 29 | <html:form action="/user/courseControllerFromServiceZone" enctype="multipart/form-data"> |
30 | <input type="hidden" name="dispatch" value="submit"/> |
||
31 | <html:hidden property="courseView.id"/> |
||
248 | jmachado | 32 | <logic:present name="CourseView" property="htmlResult"> |
33 | <pre class="log"> |
||
34 | <bean:write name="CourseView" property="htmlResult"/> |
||
35 | </pre> |
||
36 | </logic:present> |
||
1133 | jmachado | 37 | |
214 | jmachado | 38 | <table class="form"> |
39 | <tr> |
||
40 | <th> |
||
41 | <bean:message key="course.code"/> |
||
42 | </th> |
||
43 | <td> |
||
44 | <html:text property="courseView.code"/> |
||
45 | </td> |
||
46 | </tr> |
||
47 | <tr> |
||
48 | <th> |
||
376 | jmachado | 49 | <bean:message key="course.area"/> |
50 | </th> |
||
51 | |||
52 | <td> |
||
53 | <html:select property="courseView.area"> |
||
54 | <logic:iterate id="area" name="CourseForm" property="areas"> |
||
55 | <html:option value="${area}" key="area.${area}"/> |
||
56 | </logic:iterate> |
||
57 | </html:select> |
||
58 | </td> |
||
59 | </tr> |
||
60 | <tr> |
||
61 | <th> |
||
214 | jmachado | 62 | <bean:message key="name"/> |
63 | </th> |
||
64 | <td> |
||
65 | <html:text property="courseView.name"/> |
||
66 | </td> |
||
67 | </tr> |
||
68 | <tr> |
||
69 | <th> |
||
790 | jmachado | 70 | <bean:message key="status"/> |
71 | </th> |
||
72 | <td> |
||
791 | jmachado | 73 | <html:select property="courseView.status"> |
797 | jmachado | 74 | <html:option value="true"><bean:message key="yes"/></html:option> |
75 | <html:option value="false"><bean:message key="no"/></html:option> |
||
790 | jmachado | 76 | </html:select> |
77 | </td> |
||
78 | </tr> |
||
79 | <tr> |
||
80 | <th> |
||
214 | jmachado | 81 | <bean:message key="course.degree"/> |
82 | </th> |
||
83 | <td> |
||
84 | <html:select property="courseView.degree"> |
||
249 | jmachado | 85 | <html:option value="B"><bean:message key="course.B"/></html:option> |
86 | <html:option value="L"><bean:message key="course.L"/></html:option> |
||
87 | <html:option value="M"><bean:message key="course.M"/></html:option> |
||
88 | <html:option value="P"><bean:message key="course.P"/></html:option> |
||
89 | <html:option value="E"><bean:message key="course.E"/></html:option> |
||
417 | jmachado | 90 | <html:option value="A"><bean:message key="course.A"/></html:option> |
91 | <html:option value="C"><bean:message key="course.C"/></html:option> |
||
92 | <html:option value="O"><bean:message key="course.O"/></html:option> |
||
896 | jmachado | 93 | <html:option value="T"><bean:message key="course.T"/></html:option> |
214 | jmachado | 94 | </html:select> |
1133 | jmachado | 95 | ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento |
214 | jmachado | 96 | </td> |
97 | </tr> |
||
1312 | jmachado | 98 | <logic:notEmpty name="CourseForm" property="courseView.courseYearViews"> |
99 | <tr> |
||
100 | <th> |
||
101 | Politica de Separação de Turmas |
||
102 | </th> |
||
103 | <td colspan="2"> |
||
104 | |||
105 | <table class="tablesorterfiltered"> |
||
106 | <thead> |
||
107 | <tr> |
||
108 | <th>Ano Lectivo</th> |
||
109 | <th>Usar Turmas Separadas</th> |
||
110 | <th>Ultima alteração</th> |
||
111 | </tr> |
||
112 | </thead> |
||
113 | <tbody> |
||
114 | <nested:iterate id="cyv" property="courseView.courseYearViews" type="pt.estgp.estgweb.domain.views.CourseView.CourseYearView"> |
||
115 | <tr> |
||
116 | <td>${cyv.importYear}</td> |
||
117 | <td><nested:hidden property="id"/> |
||
118 | <nested:checkbox property="separatedTurmas"/></td> |
||
119 | <td>${cyv.updateDate}</td> |
||
120 | </tr> |
||
121 | </nested:iterate> |
||
122 | </tbody> |
||
123 | </table> |
||
124 | |||
125 | |||
126 | </td> |
||
127 | </tr> |
||
128 | </logic:notEmpty> |
||
214 | jmachado | 129 | <tr> |
130 | <th> |
||
131 | <bean:message key="course.importYear"/> |
||
132 | </th> |
||
133 | <td> |
||
134 | <html:select property="courseView.importYear"> |
||
135 | <logic:iterate id="item" name="CourseForm" property="importYears"> |
||
136 | <html:option value="${item}">${item}</html:option> |
||
137 | </logic:iterate> |
||
138 | </html:select> |
||
139 | </td> |
||
140 | </tr> |
||
141 | <tr> |
||
142 | <th> |
||
143 | <bean:message key="course.institutionalCode"/> |
||
144 | </th> |
||
145 | <td> |
||
146 | <html:text property="courseView.institutionalCode"/> |
||
147 | </td> |
||
148 | </tr> |
||
901 | jmachado | 149 | |
214 | jmachado | 150 | <tr> |
151 | <th> |
||
901 | jmachado | 152 | <bean:message key="course.userGroupStudents"/> |
153 | </th> |
||
154 | <td> |
||
1133 | jmachado | 155 | <html:text onchange="alertPermissions()" property="courseView.userGroupStudents"/> |
901 | jmachado | 156 | </td> |
157 | </tr> |
||
158 | |||
159 | <tr> |
||
160 | <th> |
||
214 | jmachado | 161 | <bean:message key="course.description"/> |
162 | </th> |
||
163 | <td> |
||
164 | <html:textarea property="courseView.description"/> |
||
165 | </td> |
||
166 | </tr> |
||
167 | <tr> |
||
168 | <th> |
||
169 | <bean:message key="course.coordinator"/> |
||
170 | </th> |
||
171 | <td> |
||
1133 | jmachado | 172 | <html:select onchange="alertPermissions()" property="courseView.coordinator.id"> |
214 | jmachado | 173 | <html:option value="0"> |
174 | <bean:message key="none"/> |
||
175 | </html:option> |
||
176 | <logic:present name="CourseForm" property="teachers"> |
||
177 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
178 | <html:option value="${teacher.id}"> |
||
179 | (${teacher.code}) ${teacher.name} |
||
180 | </html:option> |
||
181 | </logic:iterate> |
||
182 | </logic:present> |
||
183 | </html:select> |
||
184 | </td> |
||
185 | </tr> |
||
186 | <tr> |
||
187 | <th> |
||
188 | <bean:message key="course.director"/> |
||
189 | </th> |
||
190 | <td> |
||
1133 | jmachado | 191 | <html:select onchange="alertPermissions()" property="courseView.director.id"> |
214 | jmachado | 192 | <html:option value="0"> |
193 | <bean:message key="none"/> |
||
194 | </html:option> |
||
195 | <logic:present name="CourseForm" property="teachers"> |
||
196 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
197 | <html:option value="${teacher.id}"> |
||
198 | (${teacher.code}) ${teacher.name} |
||
199 | </html:option> |
||
200 | </logic:iterate> |
||
201 | </logic:present> |
||
202 | </html:select> |
||
203 | </td> |
||
204 | </tr> |
||
507 | jmachado | 205 | |
206 | |||
207 | |||
208 | |||
209 | |||
214 | jmachado | 210 | <tr> |
507 | jmachado | 211 | <th> |
212 | <bean:message key="course.validation.role"/> |
||
213 | </th> |
||
214 | <% |
||
215 | |||
216 | List<String> targetRoles = new ArrayList<String>(); |
||
1283 | jmachado | 217 | for(String role: UserRoleProxy.getUserRoles()) |
507 | jmachado | 218 | { |
219 | if(role.startsWith("courseValidateProgram")) |
||
220 | targetRoles.add(role); |
||
221 | } |
||
222 | request.setAttribute("targetRoles",targetRoles); |
||
223 | %> |
||
249 | jmachado | 224 | <td> |
1133 | jmachado | 225 | <html:select onchange="alertPermissions()" property="courseView.validationRole"> |
507 | jmachado | 226 | <logic:iterate id="role" name="targetRoles"> |
227 | <html:option value="${role}" key="user.role.${role}"/> |
||
228 | </logic:iterate> |
||
229 | </html:select> |
||
230 | </td> |
||
231 | </tr> |
||
249 | jmachado | 232 | |
507 | jmachado | 233 | |
234 | |||
235 | |||
236 | |||
237 | <tr> |
||
1133 | jmachado | 238 | <th> |
249 | jmachado | 239 | <bean:message key="course.externalSite"/> |
1133 | jmachado | 240 | </th> |
249 | jmachado | 241 | <td> |
242 | <html:select property="courseView.externalSiteServer"> |
||
243 | <html:option value="estgp">ESTG</html:option> |
||
244 | </html:select> |
||
245 | <html:text property="courseView.externalSitePath"/> |
||
246 | </td> |
||
247 | </tr> |
||
248 | <tr> |
||
214 | jmachado | 249 | <th> |
250 | <bean:message key="course.studies.plan"/> |
||
251 | </th> |
||
252 | <td> |
||
253 | <html:file property="studiesPlan"/> |
||
254 | <logic:present name="CourseView" property="studiesPlan"> |
||
255 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate}) |
||
256 | </logic:present> |
||
257 | <logic:notPresent name="CourseView" property="studiesPlan"> |
||
258 | <bean:message key="course.studies.plan.not.available"/> |
||
259 | </logic:notPresent> |
||
260 | </td> |
||
261 | </tr> |
||
262 | <tr class="buttons"> |
||
263 | <td colspan="2"> |
||
264 | <input type="button" |
||
265 | onclick="set(this.form,'submit');this.form.submit()" |
||
266 | value="<bean:message key="confirm"/>"/> |
||
267 | </td> |
||
268 | </tr> |
||
269 | </table> |
||
270 | |||
271 | </html:form> |