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