Blame view

WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_test.jsp 5.79 KB
9338b563   孙向锦   添加报表
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  <%@ 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"%>
  <%
  	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%>">
  
4d39642d   孙向锦   添加学生报表
17
  <title>试卷成绩报表</title>
9338b563   孙向锦   添加报表
18
19
20
21
22
23
24
25
26
27
  <base href="<%=basePath%>">
  <!-- 下拉框 -->
  <link rel="stylesheet" href="static/ace/css/chosen.css" />
  <!-- jsp文件头和头部 -->
  <%@ include file="../../system/index/top.jsp"%>
  <!-- 日期框 -->
  <link rel="stylesheet" href="static/ace/css/datepicker.css" />
  </head>
  
  <body style="background:#fff">
4d39642d   孙向锦   添加学生报表
28
29
30
31
  	<div style="min-width:1360px; margin:0 100px">
  	</br>
  	</br>
  	</br>
9338b563   孙向锦   添加报表
32
33
34
35
  		<form action="report/report_test.do" method="post" name="Form" id="Form">
  			<input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" />
  			<table style="margin-top:5px;">
  				<tr>
066f7673   孙向锦   修复bug
36
  					<td>试卷名称: ${testpaperInfo.NAME}</td>
9338b563   孙向锦   添加报表
37
38
  				</tr>
  				<tr>
066f7673   孙向锦   修复bug
39
  					<td>收卷时间: ${testpaperInfo.END_DATE}</td>
9338b563   孙向锦   添加报表
40
41
  				</tr>
  				<tr>
066f7673   孙向锦   修复bug
42
  					<td>班级名册:${classInfo.CLASS_NAME}</td>
4d39642d   孙向锦   添加学生报表
43
  					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
066f7673   孙向锦   修复bug
44
  					<td><span>学生人数: ${classInfo.studentNum}</span></td>
4d39642d   孙向锦   添加学生报表
45
  					
9338b563   孙向锦   添加报表
46
47
48
49
50
51
52
  				</tr>
  			</table>
  			<table id="simple-table"
  				class="table table-striped table-bordered table-hover"
  				style="margin-top:5px;">
  				<thead>
  					<tr>
4d39642d   孙向锦   添加学生报表
53
54
  						<th class="center">键盘</th>
  						<th class="center">学号</th>
9338b563   孙向锦   添加报表
55
  						<th class="center">姓名</th>
4d39642d   孙向锦   添加学生报表
56
57
58
  						<th class="center">得分</th>
  						<th class="center">正确率</th>
  						<th class="center">排名</th>
066f7673   孙向锦   修复bug
59
60
  						<c:forEach items="${questionInfo}" var="var" varStatus="vs">
  							<th class="center">题目${vs.index+1}</th>
9338b563   孙向锦   添加报表
61
  						</c:forEach>
4d39642d   孙向锦   添加学生报表
62
63
  						<th class="center">非选择题得分</th>
  						<th class="center">总分</th>
9338b563   孙向锦   添加报表
64
65
66
67
  					</tr>
  				</thead>
  				<tbody>
  					<tr>
9338b563   孙向锦   添加报表
68
69
  						<td class="center"></td>
  						<td class="center"></td>
9338b563   孙向锦   添加报表
70
71
  						<td class="center"></td>
  						<td class="center"></td>
9338b563   孙向锦   添加报表
72
73
  						<td class="center"></td>
  						<td class="center"></td>
066f7673   孙向锦   修复bug
74
75
76
77
  						<c:forEach items="${questionInfo}" var="var" varStatus="vs">
  							<td class="center"><fmt:formatNumber type="number"
  									value="${var == 0 ? 0: (var / classInfo.studentNum * 100)}"
  									maxFractionDigits="1" />%</td>
9338b563   孙向锦   添加报表
78
  						</c:forEach>
4d39642d   孙向锦   添加学生报表
79
80
  						<td class="center"></td>
  						<td class="center"></td>
9338b563   孙向锦   添加报表
81
82
83
  					</tr>
  
  					<c:choose>
066f7673   孙向锦   修复bug
84
85
  						<c:when test="${not empty studentInfo}">
  							<c:forEach items="${studentInfo}" var="var" varStatus="vs">
9338b563   孙向锦   添加报表
86
  								<tr>
066f7673   孙向锦   修复bug
87
88
89
90
91
92
93
94
  									<td class="center">${var.KEYPAD_ID}</td>
  									<td class="center">${var.SNO}</td>
  									<td class="center">${var.NAME}</td>
  									<td class="center">${var.GETSCORE}</td>
  									<td class="center">${var.RIGHT}</td>
  									<td class="center">${vs.index + 1}</td>
  									<c:forEach items="${questionInfo}" var="var1" varStatus="vs1">
  										<td class="center">${var.detail[vs1.index].ANSWER}</td>
9338b563   孙向锦   添加报表
95
  									</c:forEach>
066f7673   孙向锦   修复bug
96
97
  									<td class="center">${var.OTHER_SCORE}</td>
  									<td class="center">${var.GETSCORE}</td>
9338b563   孙向锦   添加报表
98
99
100
101
102
103
104
105
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
  								</tr>
  							</c:forEach>
  						</c:when>
  					</c:choose>
  				</tbody>
  			</table>
  		</form>
  	</div>
  
  	<%@ 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 type="text/javascript">
  		$(function() {
  
  			//日期框
  			$('.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);
  								});
  					});
  		});
  		
  		
  		function precent(avg,total){
  			if(total == 0){
  				return "0%"
  			}
  			return Math.round(avg / total * 100)/100 + '%' ;
  		}
  	</script>
  
  </body>
  </html>