Commit ce1cff6caefa22c1a3772f26fd6b5de18792dac0
1 parent
a9f5da51
报表
Showing
2 changed files
with
8 additions
and
10 deletions
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_test.jsp
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> |
34 | 34 | <table style="margin-top:5px;"> |
35 | 35 | <tr> |
36 | - <td>试卷名称: ${testpaperInfo.NAME}</td> | |
36 | + <td>测验名称: ${testpaperInfo.NAME}</td> | |
37 | 37 | </tr> |
38 | 38 | <tr> |
39 | 39 | <td>收卷时间: ${testpaperInfo.END_DATE}</td> | ... | ... |
src/com/fh/controller/sunvote/report/ReportController.java
... | ... | @@ -217,7 +217,6 @@ public class ReportController extends BaseController { |
217 | 217 | |
218 | 218 | @RequestMapping(value="/test_report") |
219 | 219 | public ModelAndView paper_report() throws Exception{ |
220 | - logBefore(logger, Jurisdiction.getUsername()+"测试试卷报表"); | |
221 | 220 | ModelAndView mv = this.getModelAndView(); |
222 | 221 | PageData pd = getPageData(); |
223 | 222 | |
... | ... | @@ -239,18 +238,17 @@ public class ReportController extends BaseController { |
239 | 238 | studentPd.put("STUDENT_ID", studentPd.getString("ID")); |
240 | 239 | List<PageData> detail = testpaperinfoService.reportPaperDetail(studentPd); |
241 | 240 | studentPd.put("detail", detail); |
242 | - | |
241 | + if(questionList.size() < 1){ | |
242 | + for(int i = 0 ; i < detail.size(); i++){ | |
243 | + questionList.add(0); | |
244 | + } | |
245 | + } | |
243 | 246 | float score = 0 ; |
244 | 247 | for(int i = 0 ; i < detail.size(); i++){ |
245 | 248 | PageData pad = detail.get(i); |
246 | - if("1".equals(pad.getString("RIGHT"))){ | |
247 | - if (questionList.size() > i) { | |
248 | - questionList.set(i, questionList.get(i) + 1); | |
249 | - }else{ | |
250 | - questionList.add(1); | |
251 | - } | |
249 | + if ("1".equals(pad.getString("RIGHT"))) { | |
250 | + questionList.set(i, questionList.get(i) + 1); | |
252 | 251 | } |
253 | - | |
254 | 252 | String scoreStr = pad.getString("SCORE"); |
255 | 253 | |
256 | 254 | try{ | ... | ... |