Rev 1310 | Rev 1633 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
207 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.domain.Teacher" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.TeacherImpl" %> |
||
3 | <%@ page import="jomm.utils.MessageResources" %> |
||
486 | jmachado | 4 | <%@ page import="java.util.Collections" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.views.utils.CourseUnitDeliverableComparator" %> |
||
207 | jmachado | 6 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
7 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
10 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
14 | <jsp:useBean id="CourseUnitsForm" type="pt.estgp.estgweb.web.form.courseunits.CourseUnitsForm" scope="request"/> |
||
15 | <jsp:useBean id="CourseUnitView" type="pt.estgp.estgweb.domain.views.CourseUnitView" scope="request"/> |
||
16 | <jsp:useBean id="CourseUnitAssignementView" type="pt.estgp.estgweb.domain.views.CourseUnitAssignementView" scope="request"/> |
||
17 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
||
215 | jmachado | 18 | <div id="contentIntranet"> |
19 | <div id="contentPane"> |
||
208 | jmachado | 20 | <html:errors/> |
21 | <jomm:messages/> |
||
207 | jmachado | 22 | |
1482 | jmachado | 23 | <div class="panel panel-default"> |
24 | <div class="panel-heading"> |
||
25 | <bean:message key="courseunit.assignement" arg0="${CourseUnitAssignementView.title}"/> |
||
26 | </div> |
||
27 | <div class="panel-body"> |
||
28 | <table class="tablesorter-blue"> |
||
208 | jmachado | 29 | <tr> |
30 | <th> |
||
1482 | jmachado | 31 | <bean:message key="courseunit.title"/> |
208 | jmachado | 32 | </th> |
33 | <td> |
||
1482 | jmachado | 34 | <bean:write name="CourseUnitAssignementView" property="title"/> |
208 | jmachado | 35 | </td> |
36 | </tr> |
||
1482 | jmachado | 37 | <tr> |
38 | <th> |
||
39 | <bean:message key="courseunit.assignement.deliver.date"/> |
||
40 | </th> |
||
41 | <td> |
||
42 | <bean:write name="CourseUnitAssignementView" property="deliverDate"/> |
||
43 | </td> |
||
44 | </tr> |
||
45 | <tr> |
||
46 | <th> |
||
47 | <bean:message key="courseunit.assignement.deliver.type"/> |
||
48 | </th> |
||
49 | <td> |
||
50 | <bean:message key="courseunit.assignement.deliver.type.${CourseUnitAssignementView.deliverType}"/> |
||
51 | </td> |
||
52 | </tr> |
||
53 | <tr> |
||
54 | <th> |
||
55 | <bean:message key="courseunit.assignement.deliver.late.permission"/> |
||
56 | </th> |
||
57 | <td> |
||
58 | <logic:equal value="true" name="CourseUnitAssignementView" property="lateDelivers"> |
||
59 | <bean:message key="yes"/> |
||
60 | </logic:equal> |
||
61 | <logic:notEqual value="true" name="CourseUnitAssignementView" property="lateDelivers"> |
||
62 | <bean:message key="no"/> |
||
63 | </logic:notEqual> |
||
64 | </td> |
||
65 | </tr> |
||
66 | <tr> |
||
67 | <th> |
||
68 | <bean:message key="courseunit.description"/> |
||
69 | </th> |
||
70 | <td> |
||
71 | ${CourseUnitAssignementView.formatedDescription} |
||
72 | </td> |
||
73 | </tr> |
||
74 | <tr> |
||
75 | <th> |
||
76 | <bean:message key="courseunit.status"/> |
||
77 | </th> |
||
78 | <td> |
||
79 | <logic:equal value="true" name="CourseUnitAssignementView" property="status"> |
||
80 | <bean:message key="status.active"/> |
||
81 | </logic:equal> |
||
82 | <logic:notEqual value="true" name="CourseUnitAssignementView" property="status"> |
||
83 | <bean:message key="status.inactive"/> |
||
84 | </logic:notEqual> |
||
85 | </td> |
||
86 | </tr> |
||
87 | <logic:notEmpty name="CourseUnitAssignementView" property="workFile"> |
||
88 | <tr> |
||
89 | <th> |
||
90 | <bean:message key="courseunit.assignement.file"/> |
||
91 | </th> |
||
92 | <td> |
||
93 | <a target="_blank" href="<%=request.getContextPath()%>/repositoryStream/${CourseUnitAssignementView.workFile}"><bean:message key="courseunit.assignement.file"/></a> |
||
94 | </td> |
||
95 | </tr> |
||
96 | </logic:notEmpty> |
||
97 | </table> |
||
486 | jmachado | 98 | |
1482 | jmachado | 99 | |
100 | |||
486 | jmachado | 101 | <bean:define id="orderFirst" type="java.lang.String" scope="request" value=""/> |
102 | <bean:define id="orderLast" type="java.lang.String" scope="request" value=""/> |
||
103 | |||
104 | <% |
||
105 | // String orderFirst = ""; |
||
106 | // String orderLast = ""; |
||
107 | |||
108 | if (request.getParameter("sort") != null) { |
||
109 | String sortBy = request.getParameter("sort"); |
||
110 | if (sortBy.equals("firstAsc")) |
||
111 | { |
||
112 | Collections.sort(CourseUnitAssignementView.getDeliverables(), CourseUnitDeliverableComparator.FIRST_VERSION_ASC); |
||
113 | %> |
||
114 | <bean:define id="orderFirst" type="java.lang.String" scope="request" value="firstDesc"/> |
||
115 | <bean:define id="orderLast" type="java.lang.String" scope="request" value="lastAsc"/> |
||
116 | <% |
||
117 | } |
||
118 | else if (sortBy.equals("firstDesc")) |
||
119 | { |
||
120 | Collections.sort(CourseUnitAssignementView.getDeliverables(), CourseUnitDeliverableComparator.FIRST_VERSION_DESC); |
||
121 | %> |
||
122 | <bean:define id="orderFirst" type="java.lang.String" scope="request" value="firstAsc"/> |
||
123 | <bean:define id="orderLast" type="java.lang.String" scope="request" value="lastAsc"/> |
||
124 | <% |
||
125 | } |
||
126 | else if (sortBy.equals("lastAsc")) |
||
127 | { |
||
128 | Collections.sort(CourseUnitAssignementView.getDeliverables(), CourseUnitDeliverableComparator.LAST_VERSION_ASC); |
||
129 | %> |
||
130 | <bean:define id="orderLast" type="java.lang.String" scope="request" value="lastDesc"/> |
||
131 | <bean:define id="orderFirst" type="java.lang.String" scope="request" value="firstAsc"/> |
||
132 | <% |
||
133 | } |
||
134 | else if (sortBy.equals("lastDesc")) |
||
135 | { |
||
136 | Collections.sort(CourseUnitAssignementView.getDeliverables(), CourseUnitDeliverableComparator.LAST_VERSION_DESC); |
||
137 | %> |
||
138 | <bean:define id="orderLast" type="java.lang.String" scope="request" value="lastAsc"/> |
||
139 | <bean:define id="orderFirst" type="java.lang.String" scope="request" value="firstAsc"/> |
||
140 | <% |
||
141 | } |
||
142 | else |
||
143 | { |
||
144 | %> |
||
145 | <bean:define id="orderFirst" type="java.lang.String" scope="request" value="firstAsc"/> |
||
146 | <bean:define id="orderLast" type="java.lang.String" scope="request" value="lastAsc"/> |
||
147 | |||
148 | <% |
||
149 | } |
||
150 | } |
||
151 | |||
152 | %> |
||
153 | |||
208 | jmachado | 154 | <nested:form action="/user/courseUnitControllerFromHome"> |
155 | <input type="hidden" name="dispatch" value="updateDeliverables"> |
||
156 | <html:hidden property="courseUnitAssignementView.id" value="${CourseUnitAssignementView.id}"/> |
||
157 | |||
158 | <html:hidden property="courseUnitView.id" value="${CourseUnitView.id}"/> |
||
159 | |||
1482 | jmachado | 160 | <a name="works"> </a> |
161 | <table class="tablesorter-blue"> |
||
162 | <thead> |
||
163 | <tr> |
||
164 | <th><bean:message key="courseunit.assignement.delivered.versions"/></th> |
||
165 | <th><bean:message key="courseunit.assignement.delivered.date.first.version"/></th> |
||
166 | <th><bean:message key="courseunit.assignement.delivered.date"/></th> |
||
167 | <th><bean:message key="courseunit.assignement.deliver.time"/></th> |
||
168 | <th><bean:message key="number"/></th> |
||
169 | <th><bean:message key="name"/></th> |
||
170 | <th><bean:message key="courseunit.assignement.deliver.version"/></th> |
||
171 | <th><bean:message key="courseunit.assignement.deliver.grade"/></th> |
||
172 | <th><bean:message key="courseunit.assignement.deliver.obs"/></th> |
||
173 | </tr> |
||
174 | </thead> |
||
175 | <tbody> |
||
208 | jmachado | 176 | <nested:iterate id="deliverable" property="courseUnitAssignementView.deliverables" type="pt.estgp.estgweb.domain.views.CourseUnitDeliverableView"> |
177 | <tr> |
||
486 | jmachado | 178 | <td align="right"> |
179 | |||
180 | <a href="javascript:showOrHideOne('work${deliverable.id}')">${deliverable.versionsSize}</a> |
||
181 | <div id="work${deliverable.id}" style="display:none;"> |
||
182 | <nested:iterate id="version" name="deliverable" property="versions" type="pt.estgp.estgweb.domain.RepositoryFileVersion"> |
||
183 | - <bean:message key="courseunit.assignement.deliver.version"/> (${version.saveDate}) <br/> |
||
184 | </nested:iterate> |
||
185 | </div> |
||
186 | |||
187 | </td> |
||
188 | <td nowrap="nowrap" align="center">${deliverable.deliverDateMinutesSecondsStrFirstVersion} </td> |
||
189 | <td nowrap="nowrap" align="center">${deliverable.deliverDateStrMinutesSeconds} </td> |
||
208 | jmachado | 190 | <logic:equal name="deliverable" property="lateDeliver" value="true"> |
1482 | jmachado | 191 | <td> |
192 | <label class="statusERROR"> |
||
193 | <bean:message key="courseunit.assignement.deliver.time.late"/> |
||
194 | </label> |
||
207 | jmachado | 195 | </td> |
208 | jmachado | 196 | </logic:equal> |
197 | <logic:notEqual name="deliverable" property="lateDeliver" value="true"> |
||
1482 | jmachado | 198 | <td > |
199 | <label class="statusOK"> |
||
200 | <bean:message key="courseunit.assignement.deliver.time.ok"/> |
||
201 | </label> |
||
207 | jmachado | 202 | </td> |
208 | jmachado | 203 | </logic:notEqual> |
316 | jmachado | 204 | <td align="right">${deliverable.student.code}</td> |
208 | jmachado | 205 | <td>${deliverable.student.name}</td> |
486 | jmachado | 206 | <td><a target="_blank" href="<%=request.getContextPath()%>/repositoryStream/${deliverable.fileStreamId}"><bean:message key="courseunit.assignement.deliver.version"/> (${deliverable.deliverDateMinutesSecondsStr})</a></td> |
208 | jmachado | 207 | <td> |
208 | <nested:hidden property="id"/> |
||
209 | <nested:text property="grade"/> |
||
210 | </td> |
||
211 | <td> |
||
223 | jmachado | 212 | <%--<a href="javascript:showOrHideOne('obs${deliverable.id}')"><bean:message key="courseunit.assignement.deliver.show.obs"/></a>--%> |
208 | jmachado | 213 | |
214 | <nested:textarea styleId="obs${deliverable.id}" styleClass="textarea" property="obs"/> |
||
215 | |||
216 | </td> |
||
207 | jmachado | 217 | </tr> |
208 | jmachado | 218 | </nested:iterate> |
1482 | jmachado | 219 | |
220 | </tbody> |
||
208 | jmachado | 221 | </table> |
1482 | jmachado | 222 | <input type="button" onclick="this.form.submit()" value="<bean:message key="confirm"/>"/> |
208 | jmachado | 223 | </nested:form> |
1482 | jmachado | 224 | </div> |
208 | jmachado | 225 | </div> |
1482 | jmachado | 226 |