Commit 7bbf523611dcaf373244748ad02260f811d0238f
1 parent
32d27bdc
2.限制出题数为64
3.修改重复任课bug 4.修改按时间搜索,开始大于结束时间问题
Showing
7 changed files
with
91 additions
and
22 deletions
WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp
... | ... | @@ -31,6 +31,16 @@ |
31 | 31 | <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
32 | 32 | <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> |
33 | 33 | <![endif]--> |
34 | + <style> | |
35 | + .date-picker{ | |
36 | + height:30px; | |
37 | + line-height:30px; | |
38 | + } | |
39 | + .search_btn{ | |
40 | + display:inline-block; | |
41 | + vertical-align:bottom; | |
42 | + } | |
43 | + </style> | |
34 | 44 | </head> |
35 | 45 | <body> |
36 | 46 | <form action="../paper/list2.do?SCHOOL_ID=${pd.SCHOOL_ID }" method="post" name="Form" id="Form"> |
... | ... | @@ -43,8 +53,8 @@ |
43 | 53 | </div> |
44 | 54 | <div class="head_box_r"> |
45 | 55 | <input class="date-picker" type="text" placeholder="开始日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTSTART }"/> |
46 | - <input type="text" class="date-picker" placeholder="结束日期" name="lastEnd" name="lastEnd" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTEND}"/> | |
47 | - <a href="#" onclick="tosearch();"><img | |
56 | + <input type="text" class="date-picker" placeholder="结束日期" name="lastEnd" id="lastEnd" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTEND}"/> | |
57 | + <a href="#" class="search_btn" onclick="tosearch();"><img | |
48 | 58 | src="../static/images/search.png" /></a> |
49 | 59 | </div> |
50 | 60 | <div class="clear"></div> |
... | ... | @@ -94,11 +104,15 @@ |
94 | 104 | <td >${var.TEST_NUM}</td> |
95 | 105 | <td >${var.SCORE}</td> |
96 | 106 | <td> |
97 | - <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> | |
107 | + <c:if test="${var.PAPER_TYPE ==1 }"> | |
108 | + <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> | |
109 | + </c:if> | |
98 | 110 | <c:if test="${var.PAPER_TYPE ==2 }"> |
99 | 111 | <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析</a> |
100 | 112 | </c:if> |
101 | - <a href="#" onclick="del('${var.PAPER_ID}');" style="float:right"><img src="../static/images/remove.png" /></a> | |
113 | + <c:if test="${var.PAPER_TYPE ==1 }"> | |
114 | + <a href="#" onclick="del('${var.PAPER_ID}');" style="float:right"><img src="../static/images/remove.png" /></a> | |
115 | + </c:if> | |
102 | 116 | </td> |
103 | 117 | </tr> |
104 | 118 | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | <th><div style="width:80px" title="及格率=及格人数/班级人数">及格率<img src="../static/images/tip.png" style="width:16px"></div></th> |
79 | 79 | <th><div style="width:80px" title="得分<=30%">低分人数<img src="../static/images/tip.png" style="width:16px"></div></th> |
80 | 80 | <th><div style="width:80px" title="低分率=低分人数/班级人数">低分率<img src="../static/images/tip.png" style="width:16px"></div></th> |
81 | - <th><div style="width:80px">操作</div></th> | |
81 | + <!-- <th><div style="width:80px">操作</div></th> --> | |
82 | 82 | </tr> |
83 | 83 | </thead> |
84 | 84 | <tbody> |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | ${myelfun:findClassName(var.class_id)} |
101 | 101 | </c:if> |
102 | 102 | <c:if test="${empty var.class_id }"> |
103 | - 年级平均 | |
103 | + 班级平均 | |
104 | 104 | </c:if> |
105 | 105 | </td> |
106 | 106 | <td > |
... | ... | @@ -172,7 +172,7 @@ |
172 | 172 | value="${var.student_num == 0 ? 0: (var.difen / var.student_num * 100)}" |
173 | 173 | maxFractionDigits="2" />% |
174 | 174 | </td> |
175 | - <td > | |
175 | + <%-- <td > | |
176 | 176 | |
177 | 177 | <c:if test="${not empty var.class_id }"> |
178 | 178 | <a href="<%=basePath%>paper/paperRep2.do?MB1=${pd.MB1 }&CLASS_ID=${var.class_id}&PAPER_ID=${pd.PAPER_ID}&TESTPAPER_ID=${var.testpaper_id}&CREAT_TIME=${var.creat_time}">查看成绩</a> |
... | ... | @@ -181,7 +181,7 @@ |
181 | 181 | <a href="<%=basePath%>paper/paperRep2.do?MB1=${pd.MB1 }&PAPER_ID=${pd.PAPER_ID}&TESTPAPER_ID=${var.testpaperList}">查看成绩</a> |
182 | 182 | |
183 | 183 | </c:if> |
184 | - </td> | |
184 | + </td> --%> | |
185 | 185 | </tr> |
186 | 186 | |
187 | 187 | </c:forEach> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp
... | ... | @@ -32,8 +32,8 @@ |
32 | 32 | <div class="pull-left"><h3>总分:<span id='score_all'>0</span> 分</h3></div> |
33 | 33 | <div class="btn_box pull-right"> |
34 | 34 | <input type="button" class="btn btn-success btn-lg" name="save" value="保存" id="save"/> |
35 | - <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target=".fast" id="fast">单选出题</button> | |
36 | - <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target=".addQuestion" id="addQuestion">多选出题</button> | |
35 | + <!-- <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target=".fast" id="fast">单选出题</button> --> | |
36 | + <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target=".addQuestion" id="addQuestion">添加试题</button> | |
37 | 37 | <div class="clearfix"></div> |
38 | 38 | </div> |
39 | 39 | </div> | ... | ... |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp
... | ... | @@ -26,7 +26,16 @@ |
26 | 26 | <style> |
27 | 27 | .font span{ font-size: 12px; |
28 | 28 | font-weight: initial;color:#000;} |
29 | - </style> | |
29 | + .date-picker{ | |
30 | + height:30px; | |
31 | + line-height:30px; | |
32 | + } | |
33 | + .search_btn{ | |
34 | + width:30px; | |
35 | + display:inline-block; | |
36 | + vertical-align:bottom; | |
37 | + } | |
38 | +</style> | |
30 | 39 | </head> |
31 | 40 | |
32 | 41 | <body style="background:#fff;"> |
... | ... | @@ -62,13 +71,17 @@ |
62 | 71 | class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}" |
63 | 72 | type="text" data-date-format="yyyy-mm-dd" readonly="readonly" |
64 | 73 | style="width:88px;" placeholder="结束日期" title="结束日期" /></td> |
65 | - <td style="padding-left:2px"><a style="height:30px;" | |
74 | + <td style="padding-left:10px"> | |
75 | + <a href="#" class="search_btn" onclick="tosearch();"><img | |
76 | + width="30px" src="static/images/search.png" /></a> | |
77 | + <!-- <a style="height:30px;" | |
66 | 78 | class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><i |
67 | 79 | id="nav-search-icon" style="line-height:20px" |
68 | - class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | |
69 | - <td style="padding-left:2px"> | |
70 | - <a style="height:30px;width:3em" | |
71 | - class="btn btn-light btn-xs" onclick="export2();" title="导出">导出</a> | |
80 | + class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a> --></td> | |
81 | + <td style="padding-left:10px"> | |
82 | + <a style="height:30px;width:3em;padding:0;border:0;line-height:30px;border-radius:3px;" | |
83 | + class="btn btn-primary btn-xs" onclick="export2();" title="导出">导出</a> | |
84 | + | |
72 | 85 | </td> |
73 | 86 | </tr> |
74 | 87 | </table> | ... | ... |
WebRoot/static/js/control-604.js
... | ... | @@ -240,7 +240,7 @@ $(function() { |
240 | 240 | option = String.fromCharCode(0x41 + j); |
241 | 241 | $( |
242 | 242 | ".section-" + answer_index_b + " .question" |
243 | - + questionNUm + ' ul').append( | |
243 | + + i + ' ul').append( | |
244 | 244 | '<li class="btn btn-default">' + option + '</li>'); |
245 | 245 | } |
246 | 246 | } |
... | ... | @@ -292,9 +292,12 @@ $(function() { |
292 | 292 | $(".section").eq(i).find(".que_num").text(SectionToChinese(i+1)+'、'); |
293 | 293 | |
294 | 294 | var className = $(".section").attr("class").replace(/\d+/g,i); |
295 | - console.log(className) | |
296 | 295 | $(".section").attr("class",className); |
297 | 296 | } |
297 | + var section = $(this).parent().parent(".section"); | |
298 | + var this_score = parseFloat(section.attr("data-score")); | |
299 | + total_score = total_score-this_score; | |
300 | + $("#score_all").text(total_score); | |
298 | 301 | }) |
299 | 302 | |
300 | 303 | $("#fast_submit").click(function() { // 点击确定,创建答案列表 |
... | ... | @@ -345,8 +348,13 @@ $(function() { |
345 | 348 | return; |
346 | 349 | } |
347 | 350 | // console.log(typeof(type_2)); |
348 | - addQuestion(type_2, num_ans_2, index_s_2, index_e_2, fraction2); | |
349 | - $('.addQuestion').modal('hide'); | |
351 | + var qestion_num = $(".question").length+index_e_2; | |
352 | + if(qestion_num<=64){ | |
353 | + addQuestion(type_2, num_ans_2, index_s_2, index_e_2, fraction2); | |
354 | + $('.addQuestion').modal('hide'); | |
355 | + }else{ | |
356 | + alert("题目总不能超过64题,请检查后在提交"); | |
357 | + } | |
350 | 358 | }) |
351 | 359 | $("#type").change(function() { |
352 | 360 | if ($("#type").val() == 4) { | ... | ... |
resources/mybatis1/sunvote/CourseManagementMapper.xml
src/com/fh/controller/sunvote/paper/PaperController.java
... | ... | @@ -50,6 +50,7 @@ import com.fh.util.Jurisdiction; |
50 | 50 | import com.fh.util.ObjectExcelView; |
51 | 51 | import com.fh.util.ObjectExcelView2; |
52 | 52 | import com.fh.util.PageData; |
53 | +import com.hp.hpl.sparta.ParseException; | |
53 | 54 | |
54 | 55 | /** |
55 | 56 | * 说明:试卷 创建时间:2018-05-17 |
... | ... | @@ -1188,6 +1189,17 @@ public class PaperController extends BaseController { |
1188 | 1189 | String userID = getUserID(); |
1189 | 1190 | pd.put("USER_ID", userID); |
1190 | 1191 | pd.put("PAPER_TYPE", "1"); |
1192 | + String last_start = pd.getString("LASTSTART"); | |
1193 | + String last_end = pd.getString("LASTEND"); | |
1194 | + if(!last_start.isEmpty()&&!last_end.isEmpty()){ | |
1195 | + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); | |
1196 | + Date begin = fmt.parse(last_start); //开始时间 | |
1197 | + Date end = fmt.parse(last_end); //结束时间 | |
1198 | + if(begin.compareTo(end)==1){ | |
1199 | + pd.put("LASTSTART", last_end); | |
1200 | + pd.put("LASTEND", last_start); | |
1201 | + } | |
1202 | + } | |
1191 | 1203 | page.setPd(pd); |
1192 | 1204 | List<PageData> varList = paperService.listAllBySidAndTid(pd); // 列出Paper列表 |
1193 | 1205 | page.setLangIsChina(isChineseLanguageClient()); |
... | ... | @@ -1251,6 +1263,17 @@ public class PaperController extends BaseController { |
1251 | 1263 | pd.put("keywords", keywords.trim()); |
1252 | 1264 | } |
1253 | 1265 | pd.put("PAPER_TYPE", "1"); |
1266 | + String last_start = pd.getString("LASTSTART"); | |
1267 | + String last_end = pd.getString("LASTEND"); | |
1268 | + if(!last_start.isEmpty()&&!last_end.isEmpty()){ | |
1269 | + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); | |
1270 | + Date begin = fmt.parse(last_start); //开始时间 | |
1271 | + Date end = fmt.parse(last_end); //结束时间 | |
1272 | + if(begin.compareTo(end)==1){ | |
1273 | + pd.put("LASTSTART", last_end); | |
1274 | + pd.put("LASTEND", last_start); | |
1275 | + } | |
1276 | + } | |
1254 | 1277 | page.setPd(pd); |
1255 | 1278 | page.setLangIsChina(isChineseLanguageClient()); |
1256 | 1279 | List<PageData> varList = paperService.list(page); // 列出Paper列表 |
... | ... | @@ -1329,6 +1352,17 @@ public class PaperController extends BaseController { |
1329 | 1352 | } |
1330 | 1353 | pd.put("PAPER_TYPE", "2"); |
1331 | 1354 | pd.put("USER_ID", this.getUserID()); |
1355 | + String last_start = pd.getString("LASTSTART"); | |
1356 | + String last_end = pd.getString("LASTEND"); | |
1357 | + if(!last_start.isEmpty()&&!last_end.isEmpty()){ | |
1358 | + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); | |
1359 | + Date begin = fmt.parse(last_start); //开始时间 | |
1360 | + Date end = fmt.parse(last_end); //结束时间 | |
1361 | + if(begin.compareTo(end)==1){ | |
1362 | + pd.put("LASTSTART", last_end); | |
1363 | + pd.put("LASTEND", last_start); | |
1364 | + } | |
1365 | + } | |
1332 | 1366 | page.setPd(pd); |
1333 | 1367 | page.setLangIsChina(isChineseLanguageClient()); |
1334 | 1368 | List<PageData> varList = paperService.list(page); // 列出Paper列表 | ... | ... |