Commit 579f3266d0140939c578856c634634c2c5aed642

Authored by jack
1 parent 28b5883d

1.studenttest增加增加lost_test字段,用来判断是否缺考

2.修复教师端试卷列表bug
3.修改报表页面文案
WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp
... ... @@ -53,17 +53,21 @@
53 53 <div style="padding:0 5%;background:#fff;">
54 54 <table class="table table-striped">
55 55 <col style="width: 10%" />
56   - <col style="width: 20%" />
57   - <col style="width: 20%" />
58   - <col style="width: 20%" />
59 56 <col style="width: 10%" />
60   - <col style="width: 20%" />
  57 + <col style="width: 10%" />
  58 + <col style="width: 10%" />
  59 + <col style="width: 10%" />
  60 + <col style="width: 10%" />
  61 + <col style="width: 10%" />
  62 + <col style="width: 10%" />
  63 + <col style="width: 10%" />
61 64 <thead>
62 65 <tr>
63 66 <th><input type="checkbox" name='ids' id="ids" />序号</th>
64 67 <th>测验标题</th>
65 68 <th>创建时间</th>
66 69 <th>建议考试时长</th>
  70 + <th>考试次数</th>
67 71 <th>总分</th>
68 72 <th>操作</th>
69 73 </tr>
... ... @@ -75,11 +79,14 @@
75 79  
76 80 <table class="table table-striped">
77 81 <col style="width: 10%" />
78   - <col style="width: 20%" />
79   - <col style="width: 20%" />
80   - <col style="width: 20%" />
81 82 <col style="width: 10%" />
82   - <col style="width: 20%" />
  83 + <col style="width: 10%" />
  84 + <col style="width: 10%" />
  85 + <col style="width: 10%" />
  86 + <col style="width: 10%" />
  87 + <col style="width: 10%" />
  88 + <col style="width: 10%" />
  89 + <col style="width: 10%" />
83 90 <tbody>
84 91 <c:choose>
85 92 <c:when test="${not empty varList}">
... ... @@ -89,9 +96,10 @@
89 96 <td ><a target="_blank" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.PAPER_ID}">${var.TITLE}</a></td>
90 97 <td >${var.CREATE_DATE}</td>
91 98 <td >${var.EXAM_TIME}</td>
  99 + <td >${var.TEST_NUM}</td>
92 100 <td >${var.SCORE}</td>
93 101 <td>
94   - <a href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩</a>
  102 + <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩</a>
95 103 <a href="#" onclick="del('${var.PAPER_ID}');"><img src="../static/images/remove.png" /></a>
96 104 </td>
97 105 </tr>
... ...
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp
... ... @@ -78,7 +78,7 @@
78 78 <thead>
79 79 <tr>
80 80 <th class="center th_name"><div style="width:150px;">姓名</div></th>
81   - <th class="center "><div style="width:150px;" title="个人平均正确率=总答对数/总题目数">个人平均正确率<img src="static/images/tip.png" style="width:16px"></div></th>
  81 + <th class="center "><div style="width:150px;" title="个人平均正确率=个人总分/试卷总分">个人平均正确率<img src="static/images/tip.png" style="width:16px"></div></th>
82 82 <th class="center"><div style="width:80px;" title="得分汇总=学生历史考试得分之和">得分汇总<img src="static/images/tip.png" style="width:16px"></div></th>
83 83 <c:forEach items="${testpaperList}" var="var" varStatus="vs">
84 84 <th class="center kc"><a
... ...
resources/mybatis1/api/V1Mapper.xml
... ... @@ -259,6 +259,7 @@
259 259 sv_studenttest.STUDENT_ID,
260 260 sv_studenttest.TEST_ID,
261 261 sv_studenttest.SCORE,
  262 + sv_studenttest.LOST_TEST,
262 263 sv_testpaper.`NAME` AS PAPER_NAME,
263 264 sv_testpaper.CREATE_DATE,
264 265 sv_testpaper.AVG_SCORE,
... ...
resources/mybatis1/sunvote/StudentTestMapper.xml
... ... @@ -14,7 +14,8 @@
14 14 PAPER_ID,
15 15 SCORE,
16 16 CLASS_ID,
17   - STUDENTTEST_ID
  17 + STUDENTTEST_ID,
  18 + LOST_TEST
18 19 </sql>
19 20  
20 21 <!-- 字段值 -->
... ... @@ -24,7 +25,8 @@
24 25 #{PAPER_ID},
25 26 #{SCORE},
26 27 #{CLASS_ID},
27   - #{STUDENTTEST_ID}
  28 + #{STUDENTTEST_ID},
  29 + #{LOST_TEST}
28 30 </sql>
29 31  
30 32 <!-- 新增-->
... ...
src/com/fh/controller/api/V1.java
... ... @@ -1567,6 +1567,7 @@ public class V1 extends BaseController {
1567 1567 testPaperInfo.getQuestionId());
1568 1568 testInfoPd.put("ANSWER",
1569 1569 testPaperInfo.getAnswer());
  1570 +
1570 1571 testInfoPd.put("RIGHT",
1571 1572 testPaperInfo.getRight());
1572 1573 testInfoPd.put("SCORE",
... ... @@ -1591,6 +1592,7 @@ public class V1 extends BaseController {
1591 1592 testPaperInfo.getMarkNo());
1592 1593 testInfoPdList.add(testInfoPd);
1593 1594 }
  1595 +
1594 1596 }
1595 1597 }
1596 1598 if(testInfoPdList != null && testInfoPdList.size() > 0){
... ... @@ -1682,8 +1684,8 @@ public class V1 extends BaseController {
1682 1684 studentPageData.put("CLASS_ID",
1683 1685 testPaper.getClassId());
1684 1686 studentPageData.put("STUDENTTEST_ID", get32UUID());
1685   - studenttestService.save(studentPageData);
1686   -
  1687 +
  1688 + String flag = "";
1687 1689 for (TestPaperInfo testPaperInfo : studentAnswer
1688 1690 .getQuestions()) {
1689 1691 testInfoPd = new PageData();
... ... @@ -1698,6 +1700,7 @@ public class V1 extends BaseController {
1698 1700 testPaperInfo.getQuestionId());
1699 1701 testInfoPd.put("ANSWER",
1700 1702 testPaperInfo.getAnswer());
  1703 + flag = testPaperInfo.getAnswer().toString().equals("")?"":testPaperInfo.getAnswer().toString();
1701 1704 testInfoPd.put("RIGHT",
1702 1705 testPaperInfo.getRight());
1703 1706 testInfoPd.put("SCORE",
... ... @@ -1718,6 +1721,11 @@ public class V1 extends BaseController {
1718 1721 testPaperInfo.getMarkNo());
1719 1722 testInfoPdList.add(testInfoPd);
1720 1723 }
  1724 +
  1725 + if(flag.equals("")){
  1726 + studentPageData.put("LOST_TEST","1");
  1727 + }
  1728 + studenttestService.save(studentPageData);
1721 1729 }
1722 1730 }
1723 1731 if(testInfoPdList != null && testInfoPdList.size() > 0){
... ...
src/com/fh/controller/sunvote/paper/PaperController.java
... ... @@ -801,6 +801,9 @@ public class PaperController extends BaseController {
801 801  
802 802 for(PageData p:varList){
803 803 String examTime = p.getString("EXAM_TIME");
  804 + PageData temp = new PageData();
  805 + temp.put("PAPER_ID", p.getString("PAPER_ID"));
  806 + List<PageData> li = testpaperService.listAll(temp);
804 807 if(examTime != null){
805 808 try{
806 809 int et = Integer.parseInt(examTime);
... ... @@ -825,6 +828,7 @@ public class PaperController extends BaseController {
825 828 examTime = "00:00";
826 829 }
827 830 p.put("EXAM_TIME", examTime);
  831 + p.put("TEST_NUM", li.size());
828 832 }
829 833  
830 834 mv.addObject("varList", varList);
... ...
src/com/fh/controller/sunvote/report/ReportController.java
... ... @@ -99,7 +99,8 @@ public class ReportController extends BaseController {
99 99 if(studentPd != null && item.get("STUDENT_ID").equals(studentPd.get("STUDENT_ID"))){
100 100 //
101 101 String score = item.getString("SCORE");
102   - if(!"".equals(score)){
  102 + String lost = item.getString("LOST_TEST");
  103 + if(lost.isEmpty()){
103 104 studentPd.put(item.get("TEST_ID"), item.get("SCORE"));
104 105 }else{
105 106 studentPd.put(item.get("TEST_ID"), "--");
... ... @@ -131,7 +132,8 @@ public class ReportController extends BaseController {
131 132 studentPd.put("STUDENT_ID", item.get("STUDENT_ID"));
132 133 studentPd.put("NAME", item.get("NAME"));
133 134 String score = item.getString("SCORE");
134   - if(!"".equals(score)){
  135 + String lost = item.getString("LOST_TEST");
  136 + if(lost.isEmpty()){
135 137 studentPd.put(item.get("TEST_ID"), item.get("SCORE"));
136 138 }else{
137 139 studentPd.put(item.get("TEST_ID"), "--");
... ...