Blame view

WebRoot/WEB-INF/jsp/sunvote/homework/homework_report.jsp 12.2 KB
892c3766   =   1、增加练习报表页面
1
2
3
4
  <%@ page language="java" contentType="text/html; charset=UTF-8"
  	pageEncoding="UTF-8"%>
  <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
5361dc04   jack   1、小修改提交
5
  <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
e7fce508   jack   1.修改练习报表(4)
6
  <%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%>
892c3766   =   1、增加练习报表页面
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  <%
  	String path = request.getContextPath();
  	String basePath = request.getScheme() + "://"
  			+ request.getServerName() + ":" + request.getServerPort()
  			+ path + "/";
  %>
  
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <html>
  <head>
  <base href="<%=basePath%>">
  
  <title>${info.CLASS_NAME}成绩报表</title>
  <base href="<%=basePath%>">
  <!-- 下拉框 -->
  <link rel="stylesheet" href="static/ace/css/chosen.css" />
    <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" />
3cc65186   =   1、修改练习报表页(1)
24
  
b638e17a   jack   1.英文翻译(三)
25
  <!-- <link
3cc65186   =   1、修改练习报表页(1)
26
  	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
b638e17a   jack   1.英文翻译(三)
27
28
  	rel="stylesheet"> -->
  	<link rel="stylesheet" href="static/css/bootstrap.min.css" />
892c3766   =   1、增加练习报表页面
29
30
  <!-- 日期框 -->
  <link rel="stylesheet" href="static/ace/css/datepicker.css" />
0f2e7abc   jack   1.界面优化
31
32
  
  <link rel="stylesheet" href="static/css/teach.css" />
892c3766   =   1、增加练习报表页面
33
34
35
  <style>
  	.font span{    font-size: 12px;
      font-weight: initial;color:#000;}
1aab9692   =   1.修改练习报表页面(2)
36
37
      .search_btn{width:30px;}
      .btn{margin:0 5px;}
40af1dd5   jack   1、修改学生报表界面(2)
38
      .center{height:39px;}
257a6d53   jack   1.修改课后练
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
      .box_header{position:fixed;top:0;left:0;width:100%;}
      .clear{clear:both}
      ul{
      	padding:0;
      }
  	.list{
  		width:120px;
  		height:40px;
  		line-height:40px;
  		font-weight:bold;
  		text-align:center;
  		margin-right:10px;
  		margin-top:10px;
  		float:left;
  		list-style:none;
  		border:1px solid #ddd;
d7348237   jack   1.修改课后练报表页面
55
  		cursor: pointer;
257a6d53   jack   1.修改课后练
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  	}
  	.correct{
  		color:#28be56;
  	}
  	.erro{
  		color:#ff5353;
  	}
  	.overall h3,.single h3{
  		font-size:16px;
  		font-weight:bold;
  	}
  	.single{
  		margin-top:50px;
  	}
  	.q_charts{
  		width:100%;
d7348237   jack   1.修改课后练报表页面
72
73
74
75
  		height:240px;
  		postion:relative;
  		margin-top:20px;
  		text-align:center;
257a6d53   jack   1.修改课后练
76
77
  	}
  	.rel{
d7348237   jack   1.修改课后练报表页面
78
  		width:40px;
257a6d53   jack   1.修改课后练
79
  		height:100%;
d7348237   jack   1.修改课后练报表页面
80
  		position:relative;
257a6d53   jack   1.修改课后练
81
82
  	}
  	.ans_correct{
d7348237   jack   1.修改课后练报表页面
83
  		background:#28be56;
257a6d53   jack   1.修改课后练
84
85
  	}
  	.ans_error{
d7348237   jack   1.修改课后练报表页面
86
  		background:#ff5353;
257a6d53   jack   1.修改课后练
87
88
89
90
91
92
93
  	}
  	.ans_list{
  		display:inline-block;
  		
  		margin:0 10px;
  	}
  	.ans_list p{
d7348237   jack   1.修改课后练报表页面
94
95
  		margin-bottom:0;
  		margin-top:5px;
257a6d53   jack   1.修改课后练
96
  		line-height:20px;
d7348237   jack   1.修改课后练报表页面
97
98
99
100
  		text-align:center;
  	}
  	.ans_option{
  		cursor: pointer;
257a6d53   jack   1.修改课后练
101
102
  	}
  	.p_num{
d7348237   jack   1.修改课后练报表页面
103
104
  		position:absolute;
  		top:-20px;
257a6d53   jack   1.修改课后练
105
  	}
d7348237   jack   1.修改课后练报表页面
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
  	.ans_error_round{
  		width:20px;
  		height:20px;
  		margin:0 auto;
  		background:#ff5353;
  		color:#fff;
  		border-radius:10px;
  	}
  	.ans_correct_round{
  		width:20px;
  		height:20px;
  		margin:0 auto;
  		background:#28be56;
  		color:#fff;
  		border-radius:10px;
  	}
  	.student_list{
  		width:100%;
  		padding:10px;
  		background:#f3f3f3;
  		box-sizing:border-box;
  	}
  	.cle:after{
  		visibility:hidden; 
  		display:block; 
  		font-size:0; 
  		content:'\20'; 
  		clear:both; 
  		height:0;
  		}
  	.student_list li{
  		width:120px;
  		height:20px;
  		list-style:none;
  		text-align:center;
  		line-height:20px;
  		float:left;
  	}
  
892c3766   =   1、增加练习报表页面
145
146
147
  	</style>
  </head>
  
2be0f169   jack   1.修改密码
148
  <body style="background:#fff;height:auto;">
0f2e7abc   jack   1.界面优化
149
150
151
152
153
154
155
156
  <div class="box_header">
  	<div class="head_box_l">
  		<p>
  			<span class="right_b"></span>练习报表
  		</p>
  	</div>						
  	<div class="clear"></div>
  </div>
d7348237   jack   1.修改课后练报表页面
157
  <div style="padding:0 20px;padding-top:3%;padding-bottom:3%;margin-top:102px;">
257a6d53   jack   1.修改课后练
158
159
160
161
162
163
164
165
166
  	<div class="overall">
  		<h3>作业总体情况:</h3>
  		<table class="table table-bordered ">
  			<col style="width: 20%" />
  			<col style="width: 20%" />
  			<col style="width: 20%" />
  			<col style="width: 20%" />
  			<col style="width: 20%" />
  			<tbody>
5361dc04   jack   1、小修改提交
167
  				<tr>
257a6d53   jack   1.修改课后练
168
  					<td>提交情况:25/30</td>
d7348237   jack   1.修改课后练报表页面
169
170
  					<td>题量:${page_data.QUESTION_COUNT}</td>
  					<td>最高得分率:${page_data.GET_MAX_SCORE*100/page_data.ALL_SCORE}%</td>
257a6d53   jack   1.修改课后练
171
  					<td>最低得分率:10%</td>
d7348237   jack   1.修改课后练报表页面
172
  					<td>平均得分率:${page_data.GET_SCORE_PERSENT}</td>
5361dc04   jack   1、小修改提交
173
  				</tr>
257a6d53   jack   1.修改课后练
174
  				<tr>
d7348237   jack   1.修改课后练报表页面
175
176
177
178
179
  					<td colspan="5">未提交人:${data[0].STUDENT_NAME }
  						<c:forEach items="${data}" begin="1" var="var" varStatus="vs">
  							、${var.STUDENT_NAME}							
  						</c:forEach>
  					</td>
257a6d53   jack   1.修改课后练
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
  				</tr>
  			</tbody>
  		</table>
  	</div>
  	<div class="single">
  		<h3>单题正确率详情:</h3>
  		<ul>
  			<li class="list correct">1(60%)</li>
  			<li class="list erro">2(60%)</li>
  			<li class="list correct">3(60%)</li>
  			<li class="list correct">4(60%)</li>
  			<li class="list correct">5(60%)</li>
  			<li class="list correct">6(60%)</li>
  			<li class="list correct">7(60%)</li>
  			<li class="list correct">8(60%)</li>
  			<li class="list correct">9(60%)</li>
  			<li class="list correct">10(60%)</li>
  			<li class="list correct">11(60%)</li>
  			<li class="list correct">12(60%)</li>
  		</ul>
  		<div class="clear"></div>
3cc65186   =   1、修改练习报表页(1)
201
  	</div>
5361dc04   jack   1、小修改提交
202
203
  
  </div>
40af1dd5   jack   1、修改学生报表界面(2)
204
  
257a6d53   jack   1.修改课后练
205
206
207
208
209
210
211
212
213
214
215
216
  	<!-- Modal -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="z-index:1041">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">第一题【3分】</h4>
        </div>
        <div class="modal-body">
          <p>正确答案:D  得分率:84%</p>
          <div class="q_charts">
          	<div class="ans_list" style="height:50px;">
d7348237   jack   1.修改课后练报表页面
217
218
219
220
          		
          		<div class="rel ans_correct">
          			<p class="p_num">8人</p>
          		</div>
257a6d53   jack   1.修改课后练
221
222
          		<p class="ans_option">A</p>
          	</div>
d7348237   jack   1.修改课后练报表页面
223
224
225
226
227
          	<div class="ans_list" style="height:100px;">	
          		<div class="rel ans_error">
          			<p class="p_num">16人</p>
          		</div>
          		<p class="ans_option">B</p>
257a6d53   jack   1.修改课后练
228
          	</div>
d7348237   jack   1.修改课后练报表页面
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
          	<div class="ans_list" style="height:200px;">	
          		<div class="rel ans_correct">
          			<p class="p_num">32人</p>
          		</div>
          		<p class="ans_option">C</p>
          	</div>
          	<div class="ans_list" style="height:150px;">	
          		<div class="rel ans_correct">
          			<p class="p_num">24人</p>
          		</div>
          		<p class="ans_option ans_correct_round">D</p>
          	</div>
          </div>
          <div class="student_list cle">
          	<li>黄某某</li>
          	<li>黄某某</li>
          	<li>黄某某</li>
          	<li>黄某某</li>
          	<li>黄某某</li>
          	<li>黄某某</li>
          	<li>黄某某</li>
          	<li>黄某某</li>
257a6d53   jack   1.修改课后练
251
252
253
254
255
          </div>
        </div>
      </div>
    </div>
  </div>	
40af1dd5   jack   1、修改学生报表界面(2)
256
  		
ec3fd70c   jack   1、修改练习报表(5)
257
  	
892c3766   =   1、增加练习报表页面
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
  
  	<%@ include file="../../system/index/foot.jsp"%>
  	<script src="static/ace/js/bootbox.js"></script>
  	<!-- ace scripts -->
  	<script src="static/ace/js/ace/ace.js"></script>
  	<!-- 下拉框 -->
  	<script src="static/ace/js/chosen.jquery.js"></script>
  	<!-- 日期框 -->
  	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
  	<!--提示框-->
  	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
  
   	<script language="javascript" src="static/js/tablescroller.js"></script>
      <script language="javascript" src="static/js/tablescroller.jquery.js"></script>
      
    
      
  	<script type="text/javascript">
  		$(function() {
d7348237   jack   1.修改课后练报表页面
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
  			var ans_details = '${page_data.ANSWER_PERSENT}';
  			
  			if(ans_details != ''){
  				var _html="";
  				var ans_arry = ans_details.split(",");
  				for(i = 0;i<ans_arry.length;i++){
  					temp = parseInt(ans_arry[i].replace("%",""));
  					if(temp>=80){
  						_html+='<li class="list correct">'+i+'('+ans_arry[i]+')'+'</li>';
  					}else{
  						_html+='<li class="list erro">'+(i+1)+'('+ans_arry[i]+')'+'</li>';
  					}				
  				}
  				$(".single ul").html(_html);
  			}
892c3766   =   1、增加练习报表页面
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
  			
  			//日期框
  			$('.date-picker').datepicker({
  				autoclose : true,
  				todayHighlight : true
  			});
  
  			//下拉框
  			if (!ace.vars['touch']) {
  				$('.chosen-select').chosen({
  					allow_single_deselect : true
  				});
  				$(window).off('resize.chosen').on('resize.chosen', function() {
  					$('.chosen-select').each(function() {
  						var $this = $(this);
  						$this.next().css({
  							'width' : $this.parent().width()
  						});
  					});
  				}).trigger('resize.chosen');
  				$(document).on('settings.ace.chosen',
  						function(e, event_name, event_val) {
  							if (event_name != 'sidebar_collapsed')
  								return;
  							$('.chosen-select').each(function() {
  								var $this = $(this);
  								$this.next().css({
  									'width' : $this.parent().width()
  								});
  							});
  						});
  				$('#chosen-multiple-style .btn').on(
  						'click',
  						function(e) {
  							var target = $(this).find('input[type=radio]');
  							var which = parseInt(target.val());
  							if (which == 2)
  								$('#form-field-select-4').addClass(
  										'tag-input-style');
  							else
  								$('#form-field-select-4').removeClass(
  										'tag-input-style');
  						});
  			}
  
  			//复选框全选控制
  			var active_class = 'active';
  			$('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on(
  					'click',
  					function() {
  						var th_checked = this.checked;//checkbox inside "TH" table header
  						$(this).closest('table').find('tbody > tr').each(
  								function() {
  									var row = this;
  									if (th_checked)
  										$(row).addClass(active_class).find(
  												'input[type=checkbox]').eq(0)
  												.prop('checked', true);
  									else
  										$(row).removeClass(active_class).find(
  												'input[type=checkbox]').eq(0)
  												.prop('checked', false);
  								});
  					});
  		});
  		
  		var role = '${pd.ROLE}';
  		
  		function precent(avg,total){
  			if(total == 0){
  				return "0%"
  			}
  			return Math.round(avg / total * 100)/100 + '%' ;
  		}
  		
ec3fd70c   jack   1、修改练习报表(5)
367
  		function homeReport(classId){
b3c44d84   孙向锦   课后练bug修复
368
  			var path = '<%=basePath%>homework/report.do?School_id=${pd.SCHOOL_ID}&CLASS_ID='+classId;
ec3fd70c   jack   1、修改练习报表(5)
369
370
371
372
373
  			console.log(path);
  			parent.$("#mainFrame").attr('src',path);
  			window.top.loading.show();
  		}
  		
892c3766   =   1、增加练习报表页面
374
  		function tosearch(){
c7b08501   jack   1、修改练习报表(6)
375
  			
ec3fd70c   jack   1、修改练习报表(5)
376
  			var url = "<%=basePath%>homework/report.do?CLASS_ID=${pd.CLASS_ID}" ;
892c3766   =   1、增加练习报表页面
377
378
  			var startDate = $("#lastStart").val();
  			var endDate =  $("#lastEnd").val();
ec3fd70c   jack   1、修改练习报表(5)
379
380
  			//var subject_id =  $("#SUBJECT_ID").val();
  			url = url + "&START_DATE=" + startDate ;
892c3766   =   1、增加练习报表页面
381
  			if(endDate != null){
ec3fd70c   jack   1、修改练习报表(5)
382
  				url = url + "&END_DATE=" + endDate;
892c3766   =   1、增加练习报表页面
383
  			}
c7b08501   jack   1、修改练习报表(6)
384
  
ec3fd70c   jack   1、修改练习报表(5)
385
386
387
388
  			window.location.href = url;
  			window.top.loading.show();
  			/* $("#Form").sumbit(); */
  		}
c7b08501   jack   1、修改练习报表(6)
389
  		function tosearch_week(type){   //上一周 本周 下一周
ec3fd70c   jack   1、修改练习报表(5)
390
391
  			console.log('${pd.CLASS_ID}');
  			var url = "<%=basePath%>homework/report.do?CLASS_ID=${pd.CLASS_ID}" ;
ec3fd70c   jack   1、修改练习报表(5)
392
393
394
  			url = url + "&CURRENT_WEEK=" + type ;
  			
  			console.log(url);
892c3766   =   1、增加练习报表页面
395
396
397
398
399
400
401
  			window.location.href = url;
  			window.top.loading.show();
  			/* $("#Form").sumbit(); */
  		}
  		
  		function student(classid,studentid){
  		
d69f4887   jack   1.修改学生报表界面(1)
402
  			var url = "<%=basePath%>homework/student.do?STUDENT_ID=" + studentid + "&CLASS_ID=" + classid ;
892c3766   =   1、增加练习报表页面
403
404
  			var startDate = $("#lastStart").val();
  			var endDate =  $("#lastEnd").val();
d69f4887   jack   1.修改学生报表界面(1)
405
406
407
  			url = url + "&START_DATE=" + startDate + "&END_DATE=" + endDate ;
  			
  			window.location.href = url;
892c3766   =   1、增加练习报表页面
408
409
410
411
  			window.top.loading.show();
  		}
  		
  		function paper(class_id,testpaper_id){
4adcdb80   jack   1.优化部分交互
412
  			var url = "<%=basePath%>homework/homework_report?HOMEWORK_ID=" + testpaper_id + "&CLASS_ID=" + class_id;
892c3766   =   1、增加练习报表页面
413
414
  			var startDate = $("#lastStart").val();
  			var endDate =  $("#lastEnd").val();
b7789a4d   jack   1.修改单次练习报表(1)
415
  			url = url + "&START_DATE=" + startDate + "&END_DATE=" + endDate ;
892c3766   =   1、增加练习报表页面
416
417
418
419
420
421
422
  			window.self.location.href = url;
  			window.top.loading.show();
  		}
  		
  		$(document).ready(function(){
  			window.top.loading.remove();
  			
40af1dd5   jack   1、修改学生报表界面(2)
423
424
  			 var sour = "${pd.DATA.HOMEWORKS}";
  			
892c3766   =   1、增加练习报表页面
425
426
427
  			
  			 if(sour != null && sour.length > 3){
  				var _width = $('#mainFrame', parent.document).width()-40;
0f2e7abc   jack   1.界面优化
428
  				var _heigh = $('#mainFrame', parent.document).height()-350;
892c3766   =   1、增加练习报表页面
429
430
431
  				var options = {
  	            width: _width,
  	            height: _heigh,
4faf6356   jack   1.修改练习报表
432
433
  	            pinnedRows: 5,
  	            pinnedCols: 4,
892c3766   =   1、增加练习报表页面
434
435
436
437
438
439
440
441
  	            container: "#scrollableTable",
  	            removeOriginal: true
  	        	};
  				$("#simple-table").tablescroller(options);
  		        var name_height = $(".kc").last().parent().height()-18.5;
  		        console.log(name_height);
  		        $(".th_name").height(name_height);
  			} 
257a6d53   jack   1.修改课后练
442
443
444
445
  			 
  			 
  			 $(document).on("click",".list",function(){
  				 $('#myModal').modal('toggle')
d7348237   jack   1.修改课后练报表页面
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
  			 });
  			 
  			 $(document).on("click",".ans_option",function(){
  				 var className = $(this).siblings(".rel").attr("class");
  				 
  				 
  				 $(".ans_option").attr("class","ans_option");
  				 if(className.indexOf("ans_error")>0){
  					 if($(this).hasClass("ans_error_round")){
  						 return;
  					 }else{
  						 $(this).addClass("ans_error_round");
  					 }
  					 
  				 }else{
  					 if($(this).hasClass("ans_correct_round")){
  						 return;
  					 }else{
  						 $(this).addClass("ans_correct_round");
  					 }
  				 }
257a6d53   jack   1.修改课后练
467
  			 })
892c3766   =   1、增加练习报表页面
468
469
470
471
472
473
474
  				
  		});
  		
  	</script>
  
  </body>
  </html>