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,7 +33,7 @@ | ||
| 33 | <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | 33 | <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> |
| 34 | <table style="margin-top:5px;"> | 34 | <table style="margin-top:5px;"> |
| 35 | <tr> | 35 | <tr> |
| 36 | - <td>试卷名称: ${testpaperInfo.NAME}</td> | 36 | + <td>测验名称: ${testpaperInfo.NAME}</td> |
| 37 | </tr> | 37 | </tr> |
| 38 | <tr> | 38 | <tr> |
| 39 | <td>收卷时间: ${testpaperInfo.END_DATE}</td> | 39 | <td>收卷时间: ${testpaperInfo.END_DATE}</td> |
src/com/fh/controller/sunvote/report/ReportController.java
| @@ -217,7 +217,6 @@ public class ReportController extends BaseController { | @@ -217,7 +217,6 @@ public class ReportController extends BaseController { | ||
| 217 | 217 | ||
| 218 | @RequestMapping(value="/test_report") | 218 | @RequestMapping(value="/test_report") |
| 219 | public ModelAndView paper_report() throws Exception{ | 219 | public ModelAndView paper_report() throws Exception{ |
| 220 | - logBefore(logger, Jurisdiction.getUsername()+"测试试卷报表"); | ||
| 221 | ModelAndView mv = this.getModelAndView(); | 220 | ModelAndView mv = this.getModelAndView(); |
| 222 | PageData pd = getPageData(); | 221 | PageData pd = getPageData(); |
| 223 | 222 | ||
| @@ -239,18 +238,17 @@ public class ReportController extends BaseController { | @@ -239,18 +238,17 @@ public class ReportController extends BaseController { | ||
| 239 | studentPd.put("STUDENT_ID", studentPd.getString("ID")); | 238 | studentPd.put("STUDENT_ID", studentPd.getString("ID")); |
| 240 | List<PageData> detail = testpaperinfoService.reportPaperDetail(studentPd); | 239 | List<PageData> detail = testpaperinfoService.reportPaperDetail(studentPd); |
| 241 | studentPd.put("detail", detail); | 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 | float score = 0 ; | 246 | float score = 0 ; |
| 244 | for(int i = 0 ; i < detail.size(); i++){ | 247 | for(int i = 0 ; i < detail.size(); i++){ |
| 245 | PageData pad = detail.get(i); | 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 | String scoreStr = pad.getString("SCORE"); | 252 | String scoreStr = pad.getString("SCORE"); |
| 255 | 253 | ||
| 256 | try{ | 254 | try{ |