Commit efdefb1b07a92ddfca9966f121faaeaf37fc27bb
1 parent
fd0087a8
添加语言English
Showing
24 changed files
with
4261 additions
and
0 deletions
WebRoot/WEB-INF/jsp/sunvote/admin/en_admin_main.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme() + "://" | ||
8 | + + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | +<!DOCTYPE html> | ||
12 | +<html lang="zh-CN"> | ||
13 | +<head> | ||
14 | +<meta charset="utf-8"> | ||
15 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
16 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
17 | +<title>中天电子-教育管理系统</title> | ||
18 | + | ||
19 | +<!-- Bootstrap --> | ||
20 | +<link | ||
21 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
22 | + rel="stylesheet"> | ||
23 | +<link href="../static/css/teach.css?a=1" rel="stylesheet"> | ||
24 | +<link href="../static/css/mb_style.css" rel="stylesheet"> | ||
25 | + | ||
26 | +<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
27 | +<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
28 | +<!--[if lt IE 9]> | ||
29 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
30 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
31 | + <![endif]--> | ||
32 | +</head> | ||
33 | +<body> | ||
34 | + <div class="header"> | ||
35 | + <div class="logo"> | ||
36 | + <img src="../static/images/logo.png" /> | ||
37 | + </div> | ||
38 | + <div class="out"> | ||
39 | + <a href="../logout"><img src="../static/images/close.png" />退出登录</a> | ||
40 | + </div> | ||
41 | + <div class="clear"></div> | ||
42 | + </div> | ||
43 | + <div class="content"> | ||
44 | + <div class="content_l"> | ||
45 | + <div class="info_tab"> | ||
46 | + <div class="head_pic"> | ||
47 | + <img src="../static/images/head_defult.png" /> | ||
48 | + </div> | ||
49 | + <div class="name"> | ||
50 | + <p>欢迎!</p> | ||
51 | + <p id="school">${SNAME }</p> | ||
52 | + <p id="name">${SNAME } 管理员</p> | ||
53 | + </br></br> | ||
54 | + </div> | ||
55 | + </div> | ||
56 | + <div class="class tab1"> | ||
57 | + <p> | ||
58 | + 年级管理<span class="right jiao"></span> | ||
59 | + </p> | ||
60 | + <ul class="menu_1"> | ||
61 | + <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | ||
62 | + <li onclick="event.stopPropagation();chooseListClass('${var.SCHOOL_ID}','${var.GRADE_ID}')"> | ||
63 | + <p>${ var.GNAME }</p> | ||
64 | + </li> | ||
65 | + </c:forEach> | ||
66 | + | ||
67 | + </ul> | ||
68 | + </div> | ||
69 | + <%-- <div class="class tab1"> | ||
70 | + <p> | ||
71 | + 科目管理<span class="right jiao"></span> | ||
72 | + </p> | ||
73 | + <ul class="menu_1"> | ||
74 | + <c:forEach items="${subjectInfos}" var="var" varStatus="vs"> | ||
75 | + <li onclick="event.stopPropagation();"><p>${var.SCNAME}</p> | ||
76 | + </li> | ||
77 | + </c:forEach> | ||
78 | + | ||
79 | + </ul> | ||
80 | + </div> --%> | ||
81 | + <div class="class tab1"> | ||
82 | + <p> | ||
83 | + 任课管理<span class="right jiao"></span> | ||
84 | + </p> | ||
85 | + <ul class="menu_1"> | ||
86 | + <li onclick="event.stopPropagation();subject('${SCHOOL_ID}')"><p>科目管理</p></li> | ||
87 | + <li onclick="event.stopPropagation();coursemanager('${SCHOOL_ID}')"><p>任课管理</p></li> | ||
88 | + <li onclick="event.stopPropagation();teacher('${SCHOOL_ID}')"><p>教师管理</p></li> | ||
89 | + </ul> | ||
90 | + </div> | ||
91 | + <div class="testpaper tab1"> | ||
92 | + <p>试卷管理<span class="right jiao"></span></p> | ||
93 | + <ul class="menu_1"> | ||
94 | + <li > | ||
95 | + <p >轻松考试卷管理</p> | ||
96 | + <ul class="menu_2"> | ||
97 | + <li ><p id="new_paper">出卷</p></li> | ||
98 | + <li ><p id="qingsongkao_paper">查看所有试卷</p></li> | ||
99 | + | ||
100 | + </ul> | ||
101 | + </li> | ||
102 | + <li> | ||
103 | + <p id="jishice_paper">即时测试卷管理</p> | ||
104 | + </li> | ||
105 | + </ul> | ||
106 | + | ||
107 | + </div> | ||
108 | + <div class="analyse tab1"> | ||
109 | + <p> | ||
110 | + 测验分析<span class="right jiao"></span> | ||
111 | + </p> | ||
112 | + | ||
113 | + <ul class="menu_1"> | ||
114 | + <li > | ||
115 | + <p>轻松考统考</p> | ||
116 | + </li> | ||
117 | + <li > | ||
118 | + <p>轻松考班级情况</p> | ||
119 | + <ul class="menu_2"> | ||
120 | + <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | ||
121 | + <c:forEach items="${var.classInfos}" var="var1" varStatus="vs1"> | ||
122 | + <li onclick="event.stopPropagation();report('${var1.ID}')"> | ||
123 | + <p>${ var1.CLASS_NAME }</p> | ||
124 | + </li> | ||
125 | + </c:forEach> | ||
126 | + </c:forEach> | ||
127 | + </ul> | ||
128 | + </li> | ||
129 | + <li> | ||
130 | + <p>即时测测验分析</p> | ||
131 | + <ul class="menu_2"> | ||
132 | + <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | ||
133 | + <c:forEach items="${var.classInfos}" var="var1" varStatus="vs1"> | ||
134 | + <li onclick="event.stopPropagation();report2('${var1.ID}')"> | ||
135 | + <p>${ var1.CLASS_NAME }</p> | ||
136 | + </li> | ||
137 | + </c:forEach> | ||
138 | + </c:forEach> | ||
139 | + </ul> | ||
140 | + </li> | ||
141 | + </ul> | ||
142 | + </div> | ||
143 | + <div class="analyse tab1"> | ||
144 | + <p> | ||
145 | + 系统设置<span class="right jiao"></span> | ||
146 | + </p> | ||
147 | + | ||
148 | + <ul class="menu_1"> | ||
149 | + <li > | ||
150 | + <p>学校设置</p> | ||
151 | + | ||
152 | + </li> | ||
153 | + <li> | ||
154 | + <p >年级设置</p> | ||
155 | + </li> | ||
156 | + <li> | ||
157 | + <p>年级升级</p> | ||
158 | + </li> | ||
159 | + <li> | ||
160 | + <p>其他配置</p> | ||
161 | + </li> | ||
162 | + </ul> | ||
163 | + </div> | ||
164 | + </div> | ||
165 | + <div class="content_r"> | ||
166 | + <iframe name="mainFrame" id="mainFrame" frameborder="0" width="100%" height="100%"></iframe> | ||
167 | + | ||
168 | + </div> | ||
169 | + | ||
170 | + <div class="modal fade title_time" tabindex="-1" role="dialog"> | ||
171 | + <div class="modal-dialog" role="document" style="z-index:1400"> | ||
172 | + <div class="modal-content"> | ||
173 | + <div class="modal-header"> | ||
174 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
175 | + <h4 class="modal-title">新建试卷</h4> | ||
176 | + </div> | ||
177 | + <div class="modal-body"> | ||
178 | + <div class="form-group"> | ||
179 | + <label for="enter_title" class="col-sm-4 control-label">测验标题</label> | ||
180 | + <div class="col-sm-6"> | ||
181 | + <input type="text" class="form-control" id="enter_title" placeholder="输入测验标题(不能超过100个字符)" maxlength="100" minlength="1"> | ||
182 | + </div> | ||
183 | + <div class="clearfix"></div> | ||
184 | + </div> | ||
185 | + | ||
186 | + <div class="form-group"> | ||
187 | + <label for="enter_time" class="col-sm-4 control-label">测验时长(分钟)</label> | ||
188 | + <div class="col-sm-6"> | ||
189 | + <input type="number" class="form-control" id="enter_time" placeholder="输入测验时长(单位:分钟)" maxlength="3" oninput="if(value.length>3) value=value.slice(0,3)"> | ||
190 | + </div> | ||
191 | + <div class="clearfix"></div> | ||
192 | + </div> | ||
193 | + <div class="form-group"> | ||
194 | + <label for="enter_time" class="col-sm-4 control-label">年级</label> | ||
195 | + <div class="col-sm-6"> | ||
196 | + <select class="chosen-select form-control" name="grade_id" id="grade_id" data-placeholder="这里输入所属学校"> | ||
197 | + <c:forEach items="${gradeInfos}" var="var" varStatus="vs"> | ||
198 | + <option value="${var.GRADE_ID}">${var.GNAME}</option> | ||
199 | + </c:forEach> | ||
200 | + </select> | ||
201 | + </div> | ||
202 | + <div class="clearfix"></div> | ||
203 | + </div> | ||
204 | + <div class="form-group"> | ||
205 | + <label for="enter_time" class="col-sm-4 control-label">科目</label> | ||
206 | + <div class="col-sm-6"> | ||
207 | + <select class="chosen-select form-control" name="subject_id" id="subject_id" data-placeholder="这里输入所属学校"> | ||
208 | + <c:forEach items="${subjectInfos}" var="var" varStatus="vs"> | ||
209 | + <option value="${var.SUBJECT_ID}">${var.SCNAME}</option> | ||
210 | + </c:forEach> | ||
211 | + </select> | ||
212 | + </div> | ||
213 | + <div class="clearfix"></div> | ||
214 | + </div> | ||
215 | + <div class="form-group"> | ||
216 | + <label for="enter_time" class="col-sm-4 control-label">模板</label> | ||
217 | + <div class="col-sm-6"> | ||
218 | + <select class="chosen-select form-control" name="TEMPLATE_ID" id="TEMPLATE_ID" data-placeholder="这里输入所属学校"> | ||
219 | + <option value="">自定义</option> | ||
220 | + <c:forEach items="${templateInfos}" var="var" varStatus="vs"> | ||
221 | + <option value="${var.PAGETEMPLATE_ID}">${var.NAME}</option> | ||
222 | + </c:forEach> | ||
223 | + </select> | ||
224 | + </div> | ||
225 | + <div class="clearfix"></div> | ||
226 | + </div> | ||
227 | + </div> | ||
228 | + <div class="modal-footer"> | ||
229 | + <button type="button" class="btn btn-primary" id="time_submit">确定</button> | ||
230 | + <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button> | ||
231 | + </div> | ||
232 | + </div><!-- /.modal-content --> | ||
233 | + </div><!-- /.modal-dialog --> | ||
234 | + </div><!-- /.modal --> | ||
235 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
236 | + <script | ||
237 | + src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | ||
238 | + <script src="../static/js/model.js"></script> | ||
239 | + <script src="../static/js/loading.js"></script> | ||
240 | + <script src="../static/js/remove.js?a=2"></script> | ||
241 | + <script src="../static/js/dailog.js"></script> | ||
242 | + <script type="text/javascript"> | ||
243 | + | ||
244 | + var schoolId = '${SCHOOL_ID}'; | ||
245 | + function subject(school_id){ | ||
246 | + var path = "../subject/listcs.do?school_id=" + school_id ; | ||
247 | + //if($("#mainFrame").attr('src') != (path)){ | ||
248 | + $("#mainFrame").attr('src',path); | ||
249 | + window.top.loading.show(); | ||
250 | + //} | ||
251 | + } | ||
252 | + | ||
253 | + function coursemanager(school_id){ | ||
254 | + var path = "../coursemanagement/listcs.do?school_id=" + school_id ; | ||
255 | + //if($("#mainFrame").attr('src') != (path)){ | ||
256 | + $("#mainFrame").attr('src',path); | ||
257 | + window.top.loading.show(); | ||
258 | + //} | ||
259 | + } | ||
260 | + function teacher(school_id){ | ||
261 | + var path = "../teacher/listcs.do?school_id=" + school_id ; | ||
262 | + if($("#mainFrame").attr('src') != (path)){ | ||
263 | + $("#mainFrame").attr('src',path); | ||
264 | + window.top.loading.show(); | ||
265 | + } | ||
266 | + } | ||
267 | + | ||
268 | + function chooseListClass(school_id,gradle_id){ | ||
269 | + var path = "../sclass/listcs.do?school_id=" + school_id + "&grade_id=" + gradle_id ; | ||
270 | + $("#mainFrame").attr('src',path); | ||
271 | + window.top.loading.show(); | ||
272 | + } | ||
273 | + | ||
274 | + function report(classId){ | ||
275 | + //window.open('<%=basePath%>report/report.do?role=admin&classid=' + classId); | ||
276 | + $("#mainFrame").attr('src','<%=basePath%>report/report.do?role=admin&classid=' + classId); | ||
277 | + window.top.loading.show(); | ||
278 | + } | ||
279 | + function report2(classId){ | ||
280 | + //window.open('<%=basePath%>report/report.do?classid=' + classId); | ||
281 | + //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){ | ||
282 | + // $("#mainFrame").attr('src','<%=basePath%>teacher/test_list.do?classid=' + classId); | ||
283 | + // window.top.loading.show(); | ||
284 | + //} | ||
285 | + } | ||
286 | + | ||
287 | + $("#time_submit").click(function(){ | ||
288 | + var name = $("#enter_title").val(); | ||
289 | + var time = $("#enter_time").val(); | ||
290 | + var grade_id = $("#grade_id").val(); | ||
291 | + var subject_id = $("#subject_id").val(); | ||
292 | + if(name != null&& name != '' && time != null && time != ''){ | ||
293 | + var itime = parseInt(time); | ||
294 | + if(itime > 0 && itime <= 300){ | ||
295 | + self.location.href = "<%=basePath%>" + "paper/npaper.do?paper_type=2&" + "name=" + name + "&grade_id=" + grade_id +"&subject_id=" + subject_id + "&school_id=" + schoolId + "&time=" + time ; | ||
296 | + $(".title_time").modal("hide"); | ||
297 | + }else{ | ||
298 | + alert("请输入正确的时间,时间不能超过300分钟"); | ||
299 | + } | ||
300 | + } | ||
301 | + }); | ||
302 | + | ||
303 | + $("#qingsongkao_paper").click(function (){ | ||
304 | + var path = "../paper/list4.do?school_id=" + schoolId ; | ||
305 | + //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>'); | ||
306 | + $("#mainFrame").attr('src',path); | ||
307 | + window.top.loading.show(); | ||
308 | + }); | ||
309 | + | ||
310 | + $("#new_paper").click(function (){ | ||
311 | + var path = "../paper/list5.do?school_id=" + schoolId ; | ||
312 | + //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>'); | ||
313 | + $("#mainFrame").attr('src',path); | ||
314 | + window.top.loading.show(); | ||
315 | + }); | ||
316 | + | ||
317 | + $("#jishice_paper").click(function (){ | ||
318 | + var path = "../teacher/teach_paper.do?school_id=" + schoolId; | ||
319 | + //if($("#mainFrame").attr('src') != (path)){ | ||
320 | + // $("#mainFrame").attr('src',path); | ||
321 | + // window.top.loading.show(); | ||
322 | + //} | ||
323 | + }); | ||
324 | + | ||
325 | + var defaultUrl = '${pd.DEFAULTURL}' ; | ||
326 | + if(defaultUrl != '' && defaultUrl != ''){ | ||
327 | + $("#mainFrame").attr('src',defaultUrl); | ||
328 | + } | ||
329 | + </script> | ||
330 | +</body> | ||
331 | +</html> | ||
0 | \ No newline at end of file | 332 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/paper/en_paper_list2.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme() + "://" | ||
8 | + + request.getServerName() + ":" + request.getServerPort() + path + "/"; | ||
9 | +%> | ||
10 | +<html lang="zh-CN"> | ||
11 | +<head> | ||
12 | +<meta charset="utf-8"> | ||
13 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
14 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
15 | +<title>SunVote-Education Management System</title> | ||
16 | + | ||
17 | +<!-- Bootstrap --> | ||
18 | +<link | ||
19 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
20 | + rel="stylesheet"> | ||
21 | +<link href="../static/css/teach.css" rel="stylesheet"> | ||
22 | +<link rel="stylesheet" href="../static/ace/css/datepicker.css" /> | ||
23 | +<script src="../static/js/loading.js"></script> | ||
24 | +<script src="../static/js/remove.js?a=1"></script> | ||
25 | +<script src="../static/js/dailog.js"></script> | ||
26 | + | ||
27 | +<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
28 | +<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
29 | +<!--[if lt IE 9]> | ||
30 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
31 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
32 | + <![endif]--> | ||
33 | +</head> | ||
34 | +<body> | ||
35 | + | ||
36 | + <form action="../paper/list2.do" method="post" name="Form" id="Form"> | ||
37 | + <div class="head_box"> | ||
38 | + <div class="box_header"> | ||
39 | + <div class="head_box_l"> | ||
40 | + <p> | ||
41 | + <span class="right_b"></span>Paper Management | ||
42 | + </p> | ||
43 | + </div> | ||
44 | + <div class="head_box_r"> | ||
45 | + <input class="date-picker" type="text" placeholder="Start Date" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTSTART }"/> | ||
46 | + <input type="text" class="date-picker" placeholder="End Date" name="lastEnd" name="lastEnd" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.LASTEND}"/> | ||
47 | + <a href="#" onclick="tosearch();"><img | ||
48 | + src="../static/images/search.png" /></a> | ||
49 | + </div> | ||
50 | + <div class="clear"></div> | ||
51 | + </div> | ||
52 | + <div style="padding:0 5%;background:#fff;"> | ||
53 | + <table class="table table-striped"> | ||
54 | + <col style="width: 10%" /> | ||
55 | + <col style="width: 20%" /> | ||
56 | + <col style="width: 20%" /> | ||
57 | + <col style="width: 20%" /> | ||
58 | + <col style="width: 20%" /> | ||
59 | + <col style="width: 10%" /> | ||
60 | + <thead> | ||
61 | + <tr> | ||
62 | + <th><input type="checkbox" name='ids' id="ids" />Serial No.</th> | ||
63 | + <th>Test Paper Title</th> | ||
64 | + <th>Create Time</th> | ||
65 | + <th>Advice Time</th> | ||
66 | + <th>Total Score</th> | ||
67 | + <th>Operate</th> | ||
68 | + </tr> | ||
69 | + </thead> | ||
70 | + </table> | ||
71 | + </div> | ||
72 | + </div> | ||
73 | + <div class="table_box"> | ||
74 | + <table class="table table-striped"> | ||
75 | + <col style="width: 10%" /> | ||
76 | + <col style="width: 20%" /> | ||
77 | + <col style="width: 20%" /> | ||
78 | + <col style="width: 20%" /> | ||
79 | + <col style="width: 20%" /> | ||
80 | + <col style="width: 10%" /> | ||
81 | + <tbody> | ||
82 | + <c:choose> | ||
83 | + <c:when test="${not empty varList}"> | ||
84 | + <c:forEach items="${varList}" var="var" varStatus="vs"> | ||
85 | + <tr> | ||
86 | + <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td> | ||
87 | + <td ><a target="_blank" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.PAPER_ID}">${var.TITLE}</a></td> | ||
88 | + <td >${var.CREATE_DATE}</td> | ||
89 | + <td >${var.EXAM_TIME}</td> | ||
90 | + <td >${var.SCORE}</td> | ||
91 | + <td> | ||
92 | + <a href="#" onclick="del('${var.PAPER_ID}');"><img src="../static/images/remove.png" /></a> | ||
93 | + </td> | ||
94 | + </tr> | ||
95 | + | ||
96 | + </c:forEach> | ||
97 | + </c:when> | ||
98 | + <c:otherwise> | ||
99 | + <tr class="main_info"> | ||
100 | + <td colspan="100" class="center" >No Data</td> | ||
101 | + </tr> | ||
102 | + </c:otherwise> | ||
103 | + </c:choose> | ||
104 | + </tbody> | ||
105 | + </table> | ||
106 | + <div class="footer" style="margin-top:50px"> | ||
107 | + <div class="creat"> | ||
108 | + <input type="button" onclick="parent.$('.title_time').modal('show');" value="New Paper" /> | ||
109 | + </div> | ||
110 | + <div class="removeAll"> | ||
111 | + <input type="button" onclick="deleteAll()" value="Batch Delete" /> | ||
112 | + </div> | ||
113 | + <div class="page_box"> | ||
114 | + | ||
115 | + <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> | ||
116 | + </div> | ||
117 | + </div> | ||
118 | + </div> | ||
119 | + </form> | ||
120 | +</body> | ||
121 | + | ||
122 | +<%@ include file="../../system/index/foot2.jsp"%> | ||
123 | +<script src="../static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
124 | +<script type="text/javascript"> | ||
125 | + | ||
126 | + $(document).ready(function(){ | ||
127 | + window.top.loading.remove(); | ||
128 | + }); | ||
129 | + | ||
130 | + function tosearch(){ | ||
131 | + window.top.loading.remove(); | ||
132 | + $("#Form").submit(); | ||
133 | + } | ||
134 | + | ||
135 | + | ||
136 | + $('#ids').on('click', function(){ | ||
137 | + var th_checked = $("#ids").prop('checked');//checkbox inside "TH" table header | ||
138 | + | ||
139 | + $(".table_box .table").find('tbody > tr').each(function(){ | ||
140 | + var row = this; | ||
141 | + if(th_checked) $(row).find('input[type=checkbox]').eq(0).prop('checked', true); | ||
142 | + else $(row).find('input[type=checkbox]').eq(0).prop('checked', false); | ||
143 | + }); | ||
144 | + }); | ||
145 | + | ||
146 | + function del(Id){ | ||
147 | + //var remove = new remove(); | ||
148 | + window.top.remove.init({"title":"Delete","func":function(success){ | ||
149 | + if(success){ | ||
150 | + var url = "<%=basePath%>paper/delete.do?PAPER_ID="+Id+"&qingsongkao=true&tm="+new Date().getTime(); | ||
151 | + window.top.loading.show(); | ||
152 | + $.get(url,function(data){ | ||
153 | + tosearch(); | ||
154 | + }); | ||
155 | + } | ||
156 | + else{ | ||
157 | + console.log("false"); | ||
158 | + } | ||
159 | + }}); | ||
160 | + remove.show(); | ||
161 | + } | ||
162 | + | ||
163 | + $(function() { | ||
164 | + | ||
165 | + $.fn.datepicker.dates['en'] = { | ||
166 | + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], | ||
167 | + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
168 | + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], | ||
169 | + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | ||
170 | + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | ||
171 | + today: "Today", | ||
172 | + clear: "Clear", | ||
173 | + format: "mm/dd/yyyy", | ||
174 | + titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */ | ||
175 | + weekStart: 0 | ||
176 | + }; | ||
177 | + //日期框 | ||
178 | + $('.date-picker').datepicker({ | ||
179 | + autoclose: true, | ||
180 | + todayHighlight: true, | ||
181 | + language: 'en' | ||
182 | + }); | ||
183 | + | ||
184 | + }); | ||
185 | + | ||
186 | + function deleteAll(){ | ||
187 | + window.top.remove.init({"title":"Delete","func":function(success){ | ||
188 | + if(success){ | ||
189 | + var str = ''; | ||
190 | + for(var i=0;i < document.getElementsByName('ids').length;i++){ | ||
191 | + if(document.getElementsByName('ids')[i].checked){ | ||
192 | + if(str=='') str += document.getElementsByName('ids')[i].value; | ||
193 | + else str += ',' + document.getElementsByName('ids')[i].value; | ||
194 | + } | ||
195 | + } | ||
196 | + if(str==''){ | ||
197 | + | ||
198 | + }else{ | ||
199 | + $.ajax({ | ||
200 | + type: "POST", | ||
201 | + url: '<%=basePath%>paper/deleteAll.do?tm='+new Date().getTime(), | ||
202 | + data: {DATA_IDS:str}, | ||
203 | + dataType:'json', | ||
204 | + //beforeSend: validateData, | ||
205 | + cache: false, | ||
206 | + success: function(data){ | ||
207 | + $.each(data.list, function(i, list){ | ||
208 | + tosearch(); | ||
209 | + }); | ||
210 | + } | ||
211 | + }); | ||
212 | + } | ||
213 | + } | ||
214 | + else{ | ||
215 | + console.log("false"); | ||
216 | + } | ||
217 | + }}); | ||
218 | + window.top.remove.show(); | ||
219 | + } | ||
220 | + | ||
221 | + | ||
222 | +</script> | ||
223 | +</html> | ||
0 | \ No newline at end of file | 224 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_creat_question.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
4 | +<% | ||
5 | + String path = request.getContextPath(); | ||
6 | + String basePath = request.getScheme() + "://" | ||
7 | + + request.getServerName() + ":" + request.getServerPort() | ||
8 | + + path + "/"; | ||
9 | +%> | ||
10 | + | ||
11 | +<!DOCTYPE html> | ||
12 | + | ||
13 | +<html lang="en"> | ||
14 | +<head> | ||
15 | + <title>Create exam paper</title> | ||
16 | + <!-- 最新版本的 Bootstrap 核心 CSS 文件 --> | ||
17 | + <link rel="stylesheet" href="../static/css/bootstrap.min.css"> | ||
18 | + <link rel="stylesheet" href="../static/css/style.css"/> | ||
19 | + <script type="text/javascript" src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script> | ||
20 | + <!-- 最新的 Bootstrap 核心 JavaScript 文件 --> | ||
21 | + <script src="../static/js/bootstrap.min.js"></script> | ||
22 | +</head> | ||
23 | +<body> | ||
24 | + <div class="page-header"> | ||
25 | + <div class="header_box container"> | ||
26 | + <h1 class="text-center"></h1> | ||
27 | + <div class="btn_group"> | ||
28 | + <div class="time text-center" data-toggle="modal" data-target=".test_time"><h3>Exam time:<span class="bg-primary" id="time">45</span><span class="bg-primary">Min</span></h3></div> | ||
29 | + <div class="pull-left"><h3>Total score:<span id='score_all'>0</span> </h3></div> | ||
30 | + <div class="btn_box pull-right"> | ||
31 | + <input type="button" class="btn btn-success btn-lg" name="save" value="Save" id="save"/> | ||
32 | + <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target=".fast" id="fast">Set single choice question</button> | ||
33 | + <button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target=".addQuestion" id="addQuestion">Set multiple choice question</button> | ||
34 | + <div class="clearfix"></div> | ||
35 | + </div> | ||
36 | + </div> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + | ||
40 | + <div class="content container"> | ||
41 | + | ||
42 | + </div> | ||
43 | + | ||
44 | +<!-- 快速出题 --> | ||
45 | + | ||
46 | +<div class="modal fade fast" tabindex="-1" role="dialog"> | ||
47 | + <div class="modal-dialog" role="document"> | ||
48 | + <div class="modal-content"> | ||
49 | + <div class="modal-header"> | ||
50 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
51 | + <h4 class="modal-title">Set single choice question</h4> | ||
52 | + </div> | ||
53 | + <div class="modal-body"> | ||
54 | + <div class="form-group"> | ||
55 | + <label for="inputEmail3" class="col-sm-5 control-label">Exam anwsers</label> | ||
56 | + <div class="col-sm-7"> | ||
57 | + <input type="text" class="form-control" id="answer" placeholder='Input question number(i.e.: "ABCDA")' maxlength="119"> | ||
58 | + | ||
59 | + <div class="tips" style="color:#f00"></div> | ||
60 | + </div> | ||
61 | + <div class="clearfix"></div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label for="inputEmail3" class="col-sm-5 control-label">Option numbers</label> | ||
65 | + <div class="col-sm-7"> | ||
66 | + <select class="form-control" id="num_ans"> | ||
67 | + <option value="2">2</option> | ||
68 | + <option value="3">3</option> | ||
69 | + <option value="4" selected>4</option> | ||
70 | + <option value="5">5</option> | ||
71 | + <option value="6">6</option> | ||
72 | + <option value="7">7</option> | ||
73 | + <option value="8">8</option> | ||
74 | + <option value="9">9</option> | ||
75 | + <option value="10">10</option> | ||
76 | + </select> | ||
77 | + </div> | ||
78 | + <div class="clearfix"></div> | ||
79 | + </div> | ||
80 | + <div class="form-group"> | ||
81 | + <label for="inputEmail3" class="col-sm-5 control-label">Score of single question</label> | ||
82 | + <div class="col-sm-7"> | ||
83 | + <input type="number" class="form-control" id="fraction" placeholder="" value="1"> | ||
84 | + </div> | ||
85 | + <div class="clearfix"></div> | ||
86 | + </div> | ||
87 | + </div> | ||
88 | + <div class="modal-footer"> | ||
89 | + <button type="button" class="btn btn-default" id="fast_submit">OK</button> | ||
90 | + <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> | ||
91 | + </div> | ||
92 | + </div><!-- /.modal-content --> | ||
93 | + </div><!-- /.modal-dialog --> | ||
94 | +</div><!-- /.modal --> | ||
95 | + | ||
96 | +<!--添加试题--> | ||
97 | +<div class="modal fade addQuestion" tabindex="-1" role="dialog"> | ||
98 | + <div class="modal-dialog" role="document"> | ||
99 | + <div class="modal-content"> | ||
100 | + <div class="modal-header"> | ||
101 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
102 | + <h4 class="modal-title">Add test paper</h4> | ||
103 | + </div> | ||
104 | + <div class="modal-body"> | ||
105 | + <!--<div class="form-group"> | ||
106 | + <label for="type" class="col-sm-2 control-label">题目名称</label> | ||
107 | + <div class="col-sm-10"> | ||
108 | + <select class="form-control" id="type"> | ||
109 | + <option value="1" selected>单选题</option> | ||
110 | + <option value="2">完形填空</option> | ||
111 | + <option value="3">阅读理解</option> | ||
112 | + <option value="4">判断题</option> | ||
113 | + <option value="5">多选题</option> | ||
114 | + </select> | ||
115 | + </div> | ||
116 | + <div class="clearfix"></div> | ||
117 | + </div>--> | ||
118 | + <div class="form-group"> | ||
119 | + <label for="index_s_2" class="col-sm-5 control-label">Number of questions</label> | ||
120 | + <div class="col-sm-7"> | ||
121 | + <input type="number" class="form-control" id="index_s_2" placeholder="Please input number of questions (1-100)" oninput="if(value.length>3) value=value.slice(0,3)"> | ||
122 | + </div> | ||
123 | + <!-- <div class="col-sm-1"><span style="line-height:34px;">——</span></div> | ||
124 | + <div class="col-sm-4"> | ||
125 | + <input type="number" class="form-control" id="index_e_2" placeholder=""> | ||
126 | + </div>--> | ||
127 | + <div class="clearfix"></div> | ||
128 | + </div> | ||
129 | + <div class="form-group"> | ||
130 | + <label for="num_ans_2" class="col-sm-5 control-label">Number of options</label> | ||
131 | + <div class="col-sm-7"> | ||
132 | + <select class="form-control" id="num_ans_2"> | ||
133 | + <option value="2">2</option> | ||
134 | + <option value="3">3</option> | ||
135 | + <option value="4" selected>4</option> | ||
136 | + <option value="5">5</option> | ||
137 | + <option value="6">6</option> | ||
138 | + <option value="7">7</option> | ||
139 | + <option value="8">8</option> | ||
140 | + <option value="9">9</option> | ||
141 | + <option value="10">10</option> | ||
142 | + </select> | ||
143 | + </div> | ||
144 | + <div class="clearfix"></div> | ||
145 | + </div> | ||
146 | + <div class="form-group"> | ||
147 | + <label for="fraction2" class="col-sm-5 control-label">Score of single question</label> | ||
148 | + <div class="col-sm-7"> | ||
149 | + <input type="number" class="form-control" id="fraction2" value="1" placeholder="Please input score of single question"> | ||
150 | + </div> | ||
151 | + <div class="clearfix"></div> | ||
152 | + </div> | ||
153 | + </div> | ||
154 | + <div class="modal-footer"> | ||
155 | + <button type="button" class="btn btn-default" id="addQuestion_submit">Ok</button> | ||
156 | + <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> | ||
157 | + </div> | ||
158 | + </div><!-- /.modal-content --> | ||
159 | + </div><!-- /.modal-dialog --> | ||
160 | +</div><!-- /.modal --> | ||
161 | + | ||
162 | +<!-- 考试时间 --> | ||
163 | + | ||
164 | +<div class="modal fade test_time" tabindex="-1" role="dialog"> | ||
165 | + <div class="modal-dialog" role="document"> | ||
166 | + <div class="modal-content"> | ||
167 | + <div class="modal-header"> | ||
168 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
169 | + <h4 class="modal-title">Exam Time</h4> | ||
170 | + </div> | ||
171 | + <div class="modal-body"> | ||
172 | + <div class="form-group"> | ||
173 | + <label for="enter_time" class="col-sm-4 control-label">Exam Time(Mins)</label> | ||
174 | + <div class="col-sm-6"> | ||
175 | + <input type="number" class="form-control" id="enter_time" placeholder="Please input exam time"> | ||
176 | + </div> | ||
177 | + <div class="clearfix"></div> | ||
178 | + </div> | ||
179 | + | ||
180 | + </div> | ||
181 | + <div class="modal-footer"> | ||
182 | + <button type="button" class="btn btn-default" id="time_submit">Ok</button> | ||
183 | + <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> | ||
184 | + </div> | ||
185 | + </div><!-- /.modal-content --> | ||
186 | + </div><!-- /.modal-dialog --> | ||
187 | +</div><!-- /.modal --> | ||
188 | +<div class="loading" style="background:rgba(0,0,0,0.5);width:100%;height:100%;position:fixed;top:0;display:none;"> | ||
189 | + <img src="../static/images/loading.gif" width="200px" style="position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;"/> | ||
190 | +</div> | ||
191 | +<script> | ||
192 | + var testData = ${pd.JSON}; | ||
193 | + var template = ${TEMPLEATE == null ? "[]" : TEMPLEATE.CONTENT}; | ||
194 | + var URL = "<%=basePath%>api/v1/uploadpaper"; | ||
195 | + var JUMP_URL = "<%=basePath%>/${JUMP_URL}"; | ||
196 | + if(testData.questions.length>0){ | ||
197 | + var title = testData.title; | ||
198 | + if(title == null || title == ''){ | ||
199 | + title = "Browse exam paper"; | ||
200 | + } | ||
201 | + $("title").html(title); | ||
202 | + } | ||
203 | + $(document).ready(function(){ | ||
204 | + var _height = $(".page-header").height(); | ||
205 | + $(".content").css("padding-top",_height); | ||
206 | + | ||
207 | + }); | ||
208 | + | ||
209 | + | ||
210 | + | ||
211 | + //var testData={"title":"TEST1","exam_time":46,"paper_type":"1","subject_id":"1","grade_id":"1","user_id":"1","score":5,"questions":[{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"单选","option_num":"","option_content":"","answer":"","difficulty":"","analysis":"","question_from":"","score":1,"part_score":"","remark":"","rank":"1","no_name":"一、","questions":[{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"A","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.1"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"B","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.2"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"C","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.3"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"D","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.4"},{"chapter_id":"0","problem_type_id":"0","knowledge_id":"0","content":"","option_num":4,"option_content":"","answer":"A","difficulty":"0","analysis":"","question_from":"1","score":1,"part_score":"0","remark":"","rank":"2","no_name":"1.5"}]}]}; | ||
212 | + //var testData={"title":"TEST1","exam_time":46,"paper_type":"1","subject_id":"1","grade_id":"1","user_id":"1","score":5,"questions":[]}; | ||
213 | +</script> | ||
214 | +<script type="text/javascript" src="../static/js/en_control-604.js?"></script> | ||
215 | + | ||
216 | + | ||
217 | +</body> | ||
218 | +</html> | ||
0 | \ No newline at end of file | 219 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
8 | +%> | ||
9 | +<!DOCTYPE html> | ||
10 | +<html lang="zh-CN"> | ||
11 | + <head> | ||
12 | + <meta charset="utf-8"> | ||
13 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
14 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
15 | + <title>SunVote-Education Management System</title> | ||
16 | + | ||
17 | + <!-- Bootstrap --> | ||
18 | + <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
19 | + <link href="../static/css/teach.css" rel="stylesheet"> | ||
20 | + <link href="../static/css/paper_view.css?t=1" rel="stylesheet"> | ||
21 | + | ||
22 | + <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
23 | + <!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
24 | + <!--[if lt IE 9]> | ||
25 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
26 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
27 | + <![endif]--> | ||
28 | + <style> | ||
29 | + .analysis table{display:inline-block;vertical-align:middle;} | ||
30 | + .resolve_box img{vertical-align:top;} | ||
31 | + .up{width:20px;hiehgt:20px;} | ||
32 | + .down{width:20px;height:20px;margin-left:10px;} | ||
33 | + .save_box{width:100%;height:80px;background:#fff;text-align:center;position:fixed;bottom:0;left:0;} | ||
34 | + .container{height:100%;} | ||
35 | + .content_report{padding-bottom:80px;min-height:calc(100% - 126px);} | ||
36 | + </style> | ||
37 | + </head> | ||
38 | + <body> | ||
39 | + <div class="container"> | ||
40 | + <div class="page-header"> | ||
41 | + <h3 class="col-md-6" id="paper_title"></h3> | ||
42 | + <h3 class="col-md-6">Exam Time:<span id="time"></span>Minutes</h3> | ||
43 | + <div class="clearfix"></div> | ||
44 | + </div> | ||
45 | + <div class="content_report"> | ||
46 | + | ||
47 | + <div class="col-md-12 analysis"> | ||
48 | + <ul> | ||
49 | + <!--试题列表--> | ||
50 | + </ul> | ||
51 | + </div> | ||
52 | + <div class="clearfix"></div> | ||
53 | + </div> | ||
54 | + <div class="save_box"> | ||
55 | + <input type="button" value="Save" class="btn btn-primary btn-lg topic save" /> | ||
56 | + </div> | ||
57 | + </div> | ||
58 | + <script> | ||
59 | + var subjectId = '${pd.subject_id}'; | ||
60 | + </script> | ||
61 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
62 | + <script src="../static/js/echars.js"></script> | ||
63 | + <script src="../static/js/en_paper_view.js?a=2"></script> | ||
64 | + | ||
65 | +</html> | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_paper_view2.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
8 | +%> | ||
9 | +<!DOCTYPE html> | ||
10 | +<html lang="zh-CN"> | ||
11 | + <head> | ||
12 | + <meta charset="utf-8"> | ||
13 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
14 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
15 | + <title>SunVote-Education Management System</title> | ||
16 | + | ||
17 | + <!-- Bootstrap --> | ||
18 | + <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
19 | + <link href="../static/css/teach.css" rel="stylesheet"> | ||
20 | + <link href="../static/css/paper_view.css?t=1" rel="stylesheet"> | ||
21 | + | ||
22 | + <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
23 | + <!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
24 | + <!--[if lt IE 9]> | ||
25 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
26 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
27 | + <![endif]--> | ||
28 | + <style> | ||
29 | + .analysis table{display:inline-block;vertical-align:middle;} | ||
30 | + .resolve_box img{vertical-align:top;} | ||
31 | + .up{width:20px;hiehgt:20px;} | ||
32 | + .down{width:20px;height:20px;margin-left:10px;} | ||
33 | + .save_box{width:100%;height:80px;background:#fff;text-align:center;position:fixed;bottom:0;left:0;} | ||
34 | + .container{height:100%;} | ||
35 | + .content_report{padding-bottom:80px;min-height:calc(100% - 126px);} | ||
36 | + .star_box .col-md-6{float:right;} | ||
37 | + </style> | ||
38 | + </head> | ||
39 | + <body> | ||
40 | + <div class="container"> | ||
41 | + <div class="page-header"> | ||
42 | + <h3 class="col-md-6" id="paper_title"></h3> | ||
43 | + <h3 class="col-md-6">Exam Time:<span id="time"></span>Minutes</h3> | ||
44 | + <div class="clearfix"></div> | ||
45 | + </div> | ||
46 | + <div class="content_report"> | ||
47 | + | ||
48 | + <div class="col-md-12 analysis"> | ||
49 | + <ul> | ||
50 | + <!--<li> | ||
51 | + <div class="stem"> | ||
52 | + <p>1.如图,检测4个足球,其中超过标准质量的克数记为正数,不足标准质量的克数记为负数.从轻重的角度看,最接近标准的是( )</p> | ||
53 | + </div> | ||
54 | + <div class="option"> | ||
55 | + <ul> | ||
56 | + <li><span>A.</span><img src="images/option_1.png" /></li> | ||
57 | + <li><span>B.</span><img src="images/option_2.png" /></li> | ||
58 | + <li><span>C.</span><img src="images/option_3.png" /></li> | ||
59 | + <li><span>D.</span><img src="images/option_4.png" /></li> | ||
60 | + </ul> | ||
61 | + <div class="clearfix"></div> | ||
62 | + </div> | ||
63 | + <div class="resolve"> | ||
64 | + <div class="resolve_box"> | ||
65 | + <p>【答案】 A</p> | ||
66 | + <p>【解析】由图数一数,可知总共有7位小同学,其中扎小辫的女孩有2人,男孩有5人。 | ||
67 | + 故选A。</p> | ||
68 | + | ||
69 | + <p>【考点】 10以内数的认识</p> | ||
70 | + </div> | ||
71 | + <div class="clearfix"></div> | ||
72 | + </div> | ||
73 | + | ||
74 | + <div class="star_box"> | ||
75 | + <div class="col-md-6"><img src="../static/images/up_ico.png"/><img src="../static/images/down_ico.png"/></div> | ||
76 | + <div class="col-md-6"> | ||
77 | + <div class="star"> | ||
78 | + <span style="float:left;">难度</span> | ||
79 | + <ul> | ||
80 | + <li class="on"></li> | ||
81 | + <li class="on"></li> | ||
82 | + <li class="off"></li> | ||
83 | + <li class="off"></li> | ||
84 | + <li class="off"></li> | ||
85 | + </ul> | ||
86 | + </div> | ||
87 | + <div class="resolve_click"> | ||
88 | + <a onclick="slide($(this))">查看解析</a> | ||
89 | + </div> | ||
90 | + </div> | ||
91 | + <div class="clearfix"></div> | ||
92 | + </div> | ||
93 | + </li> --> | ||
94 | + </ul> | ||
95 | + </div> | ||
96 | + <div class="clearfix"></div> | ||
97 | + </div> | ||
98 | + | ||
99 | + </div> | ||
100 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
101 | + <script src="../static/js/echars.js"></script> | ||
102 | + <script src="../static/js/loading.js"></script> | ||
103 | + <script src="../static/js/en_paper_view2.js"></script> | ||
104 | + | ||
105 | +</html> | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_set_question.jsp
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="zh-CN"> | ||
3 | + <head> | ||
4 | + <meta charset="utf-8"> | ||
5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
6 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
7 | + <title>SunVote-Education Management System</title> | ||
8 | + | ||
9 | + <!-- Bootstrap --> | ||
10 | + <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
11 | + <link href="../static/css/teach.css" rel="stylesheet"> | ||
12 | + <link href="../static/css/set_quetion.css?t=12" rel="stylesheet"> | ||
13 | + | ||
14 | + <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
15 | + <!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
16 | + <!--[if lt IE 9]> | ||
17 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
18 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
19 | + <![endif]--> | ||
20 | + <style> | ||
21 | + table{display:inline-block;vertical-align: middle;} | ||
22 | + .resolve_box img{vertical-align:top;} | ||
23 | + </style> | ||
24 | + </head> | ||
25 | + <body> | ||
26 | + <div class="col-md-12"> | ||
27 | + <div class="col-md-3 left_menu"> | ||
28 | + <div class="tab"> | ||
29 | + <ul> | ||
30 | + <li data-index=0><p>Sync Textbook</p></li> | ||
31 | + <li class="active" data-index=1><p>Knowledge Point</p></li> | ||
32 | + <div class="clearfix"></div> | ||
33 | + </ul> | ||
34 | + </div> | ||
35 | + <div class="choose_book"> | ||
36 | + <div class="book"><p><span id="book_name">Western Normal University/Grade 1-A</span></p><img src="../static/images/down_arrow.png" /><div class="clearfix"></div></div> | ||
37 | + <div class="book_box"> | ||
38 | + <ul> | ||
39 | + <!--教材版本列表--> | ||
40 | + </ul> | ||
41 | + | ||
42 | + </div> | ||
43 | + </div> | ||
44 | + <div class="section"> | ||
45 | + <ul> | ||
46 | + <!--左侧菜单列表--> | ||
47 | + </ul> | ||
48 | + </div> | ||
49 | + </div> | ||
50 | + <div class="col-md-9 right_content"> | ||
51 | + | ||
52 | + <div class="question_box"> | ||
53 | + <ul> | ||
54 | + <!--题目列表--> | ||
55 | + </ul> | ||
56 | + <div class="view_more"> | ||
57 | + <p>Click to view more<span>︾</span></p> | ||
58 | + </div> | ||
59 | + </div> | ||
60 | + </div> | ||
61 | + </div> | ||
62 | + <div class="basket"> | ||
63 | + <div class="basket_box"> | ||
64 | + <p class="col-md-4">Selected:<span id="all_que_num">0</span></p> | ||
65 | + <p class="col-md-8"><input type="button" value="Clear" class="btn btn-danger clear_que"/><button type="button" class="btn btn-primary btn-lg topic" > | ||
66 | +Complete question selection | ||
67 | +</button></p> | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + <div class="modal fade" id="myModal" tabindex="-1" role="dialog"> | ||
71 | + <div class="modal-dialog" role="document"> | ||
72 | + <div class="modal-content"> | ||
73 | + <div class="modal-header"> | ||
74 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
75 | + <h4 class="modal-title">Complete question selection</h4> | ||
76 | + </div> | ||
77 | + <div class="modal-body"> | ||
78 | + <form class="form-horizontal"> | ||
79 | + <div class="form-group"> | ||
80 | + <label for="inputEmail3" class="col-sm-2 control-label">Exam paper title</label> | ||
81 | + <div class="col-sm-10"> | ||
82 | + <input type="text" class="form-control" id="title" placeholder="i.e.: Maths of grade 8"> | ||
83 | + </div> | ||
84 | + </div> | ||
85 | + <div class="form-group"> | ||
86 | + <label for="inputPassword3" class="col-sm-2 control-label">Exam Time</label> | ||
87 | + <div class="col-sm-10"> | ||
88 | + <input type="text" class="form-control" id="time" placeholder="i.e.: 120 minutes"> | ||
89 | + </div> | ||
90 | + </div> | ||
91 | + </form> | ||
92 | + </div> | ||
93 | + <div class="modal-footer"> | ||
94 | + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | ||
95 | + <button type="button" class="btn btn-primary" id="submit">Ok</button> | ||
96 | + </div> | ||
97 | + </div><!-- /.modal-content --> | ||
98 | + </div><!-- /.modal-dialog --> | ||
99 | + </div><!-- /.modal --> | ||
100 | + <script> | ||
101 | + //var subject_id = '${subject_id}' ; | ||
102 | + </script> | ||
103 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
104 | + <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
105 | + <script src="../static/js/en_set_question.js?a=0"></script> | ||
106 | +</html> | ||
0 | \ No newline at end of file | 107 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_stduent_report.jsp
0 → 100644
1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
2 | +<html xmlns="http://www.w3.org/1999/xhtml"> | ||
3 | +<head> | ||
4 | +<% | ||
5 | + String path = request.getContextPath(); | ||
6 | + String basePath = request.getScheme() + "://" | ||
7 | + + request.getServerName() + ":" + request.getServerPort() | ||
8 | + + path + "/"; | ||
9 | +%> | ||
10 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
11 | +<title>班级-测试名单</title> | ||
12 | +<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script> | ||
13 | +<script | ||
14 | + src="http://cdn.staticfile.org/twitter-bootstrap/4.0.0-alpha.2/js/bootstrap.min.js"></script> | ||
15 | +<link | ||
16 | + href="http://cdn.staticfile.org/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" | ||
17 | + rel="stylesheet" type="text/css" media="all" /> | ||
18 | +<link href="../static/css/jquery.circliful.css" rel="stylesheet" | ||
19 | + type="text/css" /> | ||
20 | +<link href="../static/css/style1.css?t=123" rel="stylesheet" type="text/css" /> | ||
21 | +<!-- 日期框 --> | ||
22 | +<link rel="stylesheet" href="../static/ace/css/datepicker.css" /> | ||
23 | +<script src="../static/laydate/laydate.js"></script> | ||
24 | +<!-- 改成你的路径 --> | ||
25 | +<script src="../static/js/jquery.circliful.min.js"></script> | ||
26 | +<script src="../static/js/echars.js"></script> | ||
27 | +<!-- 日期框 --> | ||
28 | +<script src="../static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
29 | +<!--提示框--> | ||
30 | +<script type="text/javascript" src="../static/js/jquery.tips.js"></script> | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | +<style> | ||
36 | +body { | ||
37 | + padding-top: 50px; | ||
38 | +} | ||
39 | + | ||
40 | +li { | ||
41 | + list-style: none; | ||
42 | +} | ||
43 | +</style> | ||
44 | +</head> | ||
45 | +<body> | ||
46 | + <div class="header"> | ||
47 | + <nav class="navbar navbar-default navbar-fixed-top"> | ||
48 | + <div class="container"> | ||
49 | + <input type="hidden" name="SUBJECT_ID" id="SUBJECT_ID" value="${pd.SUBJECT_ID}"/> | ||
50 | + <input type="text" class="date-picker" placeholder="Start Date" name="starDate" id="starDate" data-date-format="yyyy-mm-dd" readonly="readonly" value="${start_date}"/> | ||
51 | + <input type="text" class="date-picker" placeholder="End Date" name="endDate" id="endDate" data-date-format="yyyy-mm-dd" readonly="readonly" value="${end_date}"/> | ||
52 | + <input type="button" value="Search" id="search" /> | ||
53 | + </div> | ||
54 | + </nav> | ||
55 | + </div> | ||
56 | + <div class="content row"> | ||
57 | + <div class="content_l col-md-2"> | ||
58 | + <ul> | ||
59 | + | ||
60 | + </ul> | ||
61 | + </div> | ||
62 | + <div class="content_r col-md-10"> | ||
63 | + <div class="tabel_t"> | ||
64 | + <div class="name"> | ||
65 | + <h1></h1> | ||
66 | + </div> | ||
67 | + <div class="circle row"> | ||
68 | + <div class="col-md-6"> | ||
69 | + <!-- <div id="myStathalf" data-dimension="350" data-text="9/19" data-info="参与测试" data-width="10" data-fontsize="38" data-percent="35" data-fgcolor="#8ad254" data-bgcolor="#a9f9ff" data-type="half" data-fill="#50b5c9"></div> --> | ||
70 | + | ||
71 | + </div> | ||
72 | + <div class="col-md-6"> | ||
73 | + <!-- <div id="myStathalf1" data-dimension="350" data-text="36%" data-info="个人平均得分率" data-width="10" data-fontsize="38" data-percent="35" data-fgcolor="#8ad254" data-bgcolor="#a9f9ff" data-type="half" data-fill="#50b5c9"></div> --> | ||
74 | + | ||
75 | + </div> | ||
76 | + </div> | ||
77 | + <div class="info row"> | ||
78 | + <div class="col-md-6"> | ||
79 | + <p> | ||
80 | + Average Class Score Rate<span id="class_avg">0.0</span>% | ||
81 | + </p> | ||
82 | + </div> | ||
83 | + <div class="col-md-6"> | ||
84 | + <p> | ||
85 | + The highest scoring rate<span id="class_max">0.0</span>% | ||
86 | + </p> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | + <div class="prev"></div> | ||
90 | + <div class="next"></div> | ||
91 | + </div> | ||
92 | + <div class="tabel_b"> | ||
93 | + <div class="tab_top row"> | ||
94 | + <div class="col-md-3">Correctness Rate Trend Contrast Chart</div> | ||
95 | + <div class="col-md-9"> | ||
96 | + <div class="color"> | ||
97 | + <ul> | ||
98 | + <li><span class="green"></span>Class average</li> | ||
99 | + <li><span class="blue"></span>Student</li> | ||
100 | + <li><span class="yellow"></span>Best</li> | ||
101 | + <div class="clear"></div> | ||
102 | + </ul> | ||
103 | + </div> | ||
104 | + <div class="check_box"> | ||
105 | + <input type="radio" checked value="1" name="check" id="check1" /> | ||
106 | + <label for="check1">Score rate</label> <input type="radio" value="2" | ||
107 | + name="check" id="check2" /> <label for="check2">Score</label> | ||
108 | + </div> | ||
109 | + </div> | ||
110 | + </div> | ||
111 | + <div class="tabel_content"> | ||
112 | + <div id="main" style="width: 100%;height:400px;"></div> | ||
113 | + </div> | ||
114 | + </div> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + <script type=""> | ||
118 | + var URL = '<%=basePath%>${URL}'; | ||
119 | + </script> | ||
120 | + <script src="../static/js/en_control1.js?a=1"></script> | ||
121 | + <!-- 日期框 --> | ||
122 | + <script> | ||
123 | + //lay('#version').html('-v'+ laydate.v); | ||
124 | + //日期范围 | ||
125 | + // laydate.render({ | ||
126 | + // elem: '#test6' | ||
127 | + // ,range: true | ||
128 | + // }); | ||
129 | + $(document).ready(function(){ | ||
130 | + // window.top.loading.remove(); | ||
131 | + }); | ||
132 | + | ||
133 | + $.fn.datepicker.dates['en'] = { | ||
134 | + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], | ||
135 | + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
136 | + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], | ||
137 | + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | ||
138 | + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | ||
139 | + today: "Today", | ||
140 | + clear: "Clear", | ||
141 | + format: "mm/dd/yyyy", | ||
142 | + titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */ | ||
143 | + weekStart: 0 | ||
144 | + }; | ||
145 | + //日期框 | ||
146 | + $('.date-picker').datepicker({ | ||
147 | + autoclose: true, | ||
148 | + todayHighlight: true, | ||
149 | + language: 'en' | ||
150 | + }); | ||
151 | +</script> | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | +</body> | ||
156 | +</html> |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_teach_paper.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
8 | +%> | ||
9 | +<!DOCTYPE html> | ||
10 | +<html lang="zh-CN"> | ||
11 | + <head> | ||
12 | + <meta charset="utf-8"> | ||
13 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
14 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
15 | + <title>SunVote Class Paper Management</title> | ||
16 | + | ||
17 | + <!-- Bootstrap --> | ||
18 | + <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
19 | + | ||
20 | + <link rel="stylesheet" href="../static/ace/css/datepicker.css" /> | ||
21 | + <link href="../static/css/teach.css" rel="stylesheet"> | ||
22 | + <link href="../static/css/paper.css?t=1" rel="stylesheet"> | ||
23 | + </head> | ||
24 | + <body> | ||
25 | + | ||
26 | + <div class="head_box"> | ||
27 | + <div class="box_header"> | ||
28 | + <div class="head_box_l"> | ||
29 | + <p> | ||
30 | + <span class="right_b"></span>SunVote Class Paper Management | ||
31 | + </p> | ||
32 | + </div> | ||
33 | + <div class="head_box_r"> | ||
34 | + <input class="date-picker" type="text" placeholder="Start Date" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
35 | + <input type="text" class="date-picker" placeholder="End Date" name="lastEnd" id="lastEnd" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
36 | + <select name="dealer_id_2" id="dealer_id_2" class="selectpicker show-tick form-control" data-width="98%" data-first-option="false" required data-live-search="true"> | ||
37 | + <!--班级列表--> | ||
38 | + </select> | ||
39 | + <a onclick="tosearch();"><img | ||
40 | + src="../static/images/search.png" /></a> | ||
41 | + </div> | ||
42 | + <div class="clear"></div> | ||
43 | + </div> | ||
44 | + <div style="padding:0 5%;background:#fff;"> | ||
45 | + <table class="table table-striped"> | ||
46 | + <col style="width: 10%" /> | ||
47 | + <col style="width: 20%" /> | ||
48 | + <col style="width: 10%" /> | ||
49 | + <col style="width: 10%" /> | ||
50 | + <col style="width: 10%" /> | ||
51 | + <col style="width: 20%" /> | ||
52 | + <col style="width: 10%" /> | ||
53 | + <col style="width: 10%" /> | ||
54 | + <thead> | ||
55 | + <tr> | ||
56 | + <th><input type="checkbox" name='ids' id="ids" />Serial No.</th> | ||
57 | + <th>Test Paper Title</th> | ||
58 | + <th>Class</th> | ||
59 | + <th>Subject</th> | ||
60 | + <th>Exam Time</th> | ||
61 | + <th>Create Time</th> | ||
62 | + <th>View</th> | ||
63 | + <th>Operate</th> | ||
64 | + </tr> | ||
65 | + </thead> | ||
66 | + </table> | ||
67 | + </div> | ||
68 | + <div class="clearfix"></div> | ||
69 | + </div> | ||
70 | + <div class="table_box" style="margin-top:30px"> | ||
71 | + <table class="table table-striped"> | ||
72 | + <col style="width: 10%" /> | ||
73 | + <col style="width: 20%" /> | ||
74 | + <col style="width: 10%" /> | ||
75 | + <col style="width: 10%" /> | ||
76 | + <col style="width: 10%" /> | ||
77 | + <col style="width: 20%" /> | ||
78 | + <col style="width: 10%" /> | ||
79 | + <tbody id="tab_body"> | ||
80 | + | ||
81 | + </tbody> | ||
82 | + </table> | ||
83 | + | ||
84 | + | ||
85 | + <div class="footer" style="margin-top:50px"> | ||
86 | + <div class="creat"> | ||
87 | + <input type="button" id="creatPaper" value="New Paper " /> | ||
88 | + </div> | ||
89 | + <div class="removeAll"> | ||
90 | + <input type="button" onclick="deleteAll()" value="Batch delete" /> | ||
91 | + </div> | ||
92 | + <div class="page_box"> | ||
93 | + | ||
94 | + <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> | ||
95 | + </div> | ||
96 | + </div> | ||
97 | + </div> | ||
98 | + <div class="modal fade" id="myModal" tabindex="-1" role="dialog"> | ||
99 | + <div class="modal-dialog" role="document"> | ||
100 | + <div class="modal-content"> | ||
101 | + <div class="modal-header"> | ||
102 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
103 | + <h4 class="modal-title">Please select class</h4> | ||
104 | + </div> | ||
105 | + <div class="modal-body"> | ||
106 | + <form class="form-horizontal"> | ||
107 | + <div class="classList"> | ||
108 | + <ul> | ||
109 | + | ||
110 | + </ul> | ||
111 | + </div> | ||
112 | + </form> | ||
113 | + </div> | ||
114 | + <div class="modal-footer"> | ||
115 | + <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> | ||
116 | + <button type="button" class="btn btn-primary" id="submit" onclick="setQUestion()">Ok</button> | ||
117 | + </div> | ||
118 | + </div><!-- /.modal-content --> | ||
119 | + </div><!-- /.modal-dialog --> | ||
120 | + </div><!-- /.modal --> | ||
121 | + | ||
122 | + | ||
123 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
124 | + <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
125 | + <script src="../static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
126 | + <script src="../static/ace/js/bootbox.js"></script> | ||
127 | + <script type="text/javascript"> | ||
128 | + var url = "<%=basePath%>"; | ||
129 | + $.fn.datepicker.dates['en'] = { | ||
130 | + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], | ||
131 | + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
132 | + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], | ||
133 | + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | ||
134 | + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | ||
135 | + today: "Today", | ||
136 | + clear: "Clear", | ||
137 | + format: "mm/dd/yyyy", | ||
138 | + titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */ | ||
139 | + weekStart: 0 | ||
140 | + }; | ||
141 | + //日期框 | ||
142 | + $('.date-picker').datepicker({ | ||
143 | + autoclose: true, | ||
144 | + todayHighlight: true, | ||
145 | + language: 'en' | ||
146 | + }); | ||
147 | + | ||
148 | + var view = "View" ; | ||
149 | + </script> | ||
150 | + <script src="../static/js/teach_paper.js?a=1"></script> | ||
151 | +</html> | ||
0 | \ No newline at end of file | 152 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_teacher_main.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme() + "://" | ||
8 | + + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | +<!DOCTYPE html> | ||
12 | +<html lang="zh-CN"> | ||
13 | +<head> | ||
14 | +<meta charset="utf-8"> | ||
15 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
16 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
17 | +<title>SunVote-Education Management System</title> | ||
18 | + | ||
19 | +<!-- Bootstrap --> | ||
20 | +<link | ||
21 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
22 | + rel="stylesheet"> | ||
23 | +<link href="../static/css/teach.css?a=1" rel="stylesheet"> | ||
24 | +<link href="../static/css/mb_style.css" rel="stylesheet"> | ||
25 | + | ||
26 | +<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
27 | +<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
28 | +<!--[if lt IE 9]> | ||
29 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
30 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
31 | + <![endif]--> | ||
32 | +</head> | ||
33 | +<body> | ||
34 | + <div class="header"> | ||
35 | + <div class="logo"> | ||
36 | + <img src="../static/images/en_logo.png" /> | ||
37 | + </div> | ||
38 | + <div class="out"> | ||
39 | + <a href="../logout"><img src="../static/images/close.png" />Log out</a> | ||
40 | + </div> | ||
41 | + <div class="clear"></div> | ||
42 | + </div> | ||
43 | + <div class="content"> | ||
44 | + <div class="content_l"> | ||
45 | + <div class="info_tab"> | ||
46 | + <div class="head_pic"> | ||
47 | + <img src="../static/images/head_defult.png" /> | ||
48 | + </div> | ||
49 | + <div class="name"> | ||
50 | + <p>Welcome!</p> | ||
51 | + <p id="name">${pd.TEACHER[0].TEACHER_NAME }</p> | ||
52 | + <p id="school">${pd.TEACHER[0].SCHOOL_NAME }</p> | ||
53 | + </div> | ||
54 | + </div> | ||
55 | + <div class="class tab1"> | ||
56 | + <p> | ||
57 | + Class Management<span class="right jiao"></span> | ||
58 | + </p> | ||
59 | + <ul class="menu_1"> | ||
60 | + <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs"> | ||
61 | + <li onclick="event.stopPropagation();chooseClass('${var.CLASS_ID}','${var.TERM_ID}')"><p>${var.GRADE_ENAME} ${var.SUBJECT_ENAME} | ||
62 | + <span>${var.CLASS_NAME}</span></p> | ||
63 | + </li> | ||
64 | + </c:forEach> | ||
65 | + | ||
66 | + </ul> | ||
67 | + </div> | ||
68 | + <div class="testpaper tab1"> | ||
69 | + <p>Paper Management<span class="right jiao"></span></p> | ||
70 | + <ul class="menu_1"> | ||
71 | + <li > | ||
72 | + <p id="qingsongkao_paper">E-exam Paper Management</p> | ||
73 | + <!-- <ul class="menu_2"> | ||
74 | + <li><p>高一数学 202班</p></li> | ||
75 | + <li><p>高一数学 203班</p></li> | ||
76 | + </ul> --> | ||
77 | + </li> | ||
78 | + <li> | ||
79 | + <p id="jishice_paper">SunVote Class Paper Management</p> | ||
80 | + | ||
81 | + <!-- <ul class="menu_2"> | ||
82 | + <li><p>高一数学 202班</p></li> | ||
83 | + <li><p>高一数学 203班</p></li> | ||
84 | + </ul> --> | ||
85 | + </li> | ||
86 | + </ul> | ||
87 | + | ||
88 | + </div> | ||
89 | + <div class="analyse tab1"> | ||
90 | + <p> | ||
91 | + Exam Analysis<span class="right jiao"></span> | ||
92 | + </p> | ||
93 | + | ||
94 | + <ul class="menu_1"> | ||
95 | + <li > | ||
96 | + <p>E-exam Examination Analysis</p> | ||
97 | + <ul class="menu_2"> | ||
98 | + <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs"> | ||
99 | + <li onclick="event.stopPropagation();report('${var.CLASS_ID}')"><p>${var.CLASS_NAME} Score</p></li> | ||
100 | + </c:forEach> | ||
101 | + </ul> | ||
102 | + </li> | ||
103 | + <li> | ||
104 | + <p>SunVote Class Exam Analysis</p> | ||
105 | + <ul class="menu_2"> | ||
106 | + <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs"> | ||
107 | + <li onclick="event.stopPropagation();report2('${var.CLASS_ID}')"><p>${var.CLASS_NAME} Score</p></li> | ||
108 | + </c:forEach> | ||
109 | + </ul> | ||
110 | + </li> | ||
111 | + </ul> | ||
112 | + | ||
113 | + <%-- <ul class="menu_1"> | ||
114 | + <c:forEach items="${pd.TEACHER}" var="var" varStatus="vs"> | ||
115 | + <li onclick="event.stopPropagation();report('${var.CLASS_ID}')"><p>${var.CLASS_NAME} 成绩</p></li> | ||
116 | + </c:forEach> | ||
117 | + </ul> --%> | ||
118 | + </div> | ||
119 | + </div> | ||
120 | + <div class="content_r"> | ||
121 | + <iframe name="mainFrame" id="mainFrame" frameborder="0" width="100%" height="100%"></iframe> | ||
122 | + | ||
123 | + </div> | ||
124 | + | ||
125 | + <div class="modal fade title_time" tabindex="-1" role="dialog"> | ||
126 | + <div class="modal-dialog" role="document" style="z-index:1400"> | ||
127 | + <div class="modal-content"> | ||
128 | + <div class="modal-header"> | ||
129 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
130 | + <h4 class="modal-title">New Exam Paper</h4> | ||
131 | + </div> | ||
132 | + <div class="modal-body"> | ||
133 | + <div class="form-group"> | ||
134 | + <label for="enter_title" class="col-sm-4 control-label">Exam Title</label> | ||
135 | + <div class="col-sm-6"> | ||
136 | + <input type="text" class="form-control" id="enter_title" placeholder="Input test title(not more than 100 characters)" maxlength="100" minlength="1"> | ||
137 | + </div> | ||
138 | + <div class="clearfix"></div> | ||
139 | + </div> | ||
140 | + <div class="form-group"> | ||
141 | + <label for="enter_time" class="col-sm-4 control-label">Exam Time(Min)</label> | ||
142 | + <div class="col-sm-6"> | ||
143 | + <input type="number" class="form-control" id="enter_time" placeholder="Input exam time(Min)" maxlength="3" oninput="if(value.length>3) value=value.slice(0,3)"> | ||
144 | + </div> | ||
145 | + <div class="clearfix"></div> | ||
146 | + </div> | ||
147 | + | ||
148 | + <div class="form-group"> | ||
149 | + <label for="enter_time" class="col-sm-4 control-label">Template</label> | ||
150 | + <div class="col-sm-6"> | ||
151 | + <select class="chosen-select form-control" name="TEMPLATE_ID" id="TEMPLATE_ID" data-placeholder=""> | ||
152 | + <option value="">User define</option> | ||
153 | + <c:forEach items="${templateInfos}" var="var" varStatus="vs"> | ||
154 | + <option value="${var.PAGETEMPLATE_ID}">${var.NAME}</option> | ||
155 | + </c:forEach> | ||
156 | + </select> | ||
157 | + </div> | ||
158 | + <div class="clearfix"></div> | ||
159 | + </div> | ||
160 | + | ||
161 | + </div> | ||
162 | + <div class="modal-footer"> | ||
163 | + <button type="button" class="btn btn-primary" id="time_submit">Ok</button> | ||
164 | + <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> | ||
165 | + </div> | ||
166 | + </div><!-- /.modal-content --> | ||
167 | + </div><!-- /.modal-dialog --> | ||
168 | + </div><!-- /.modal --> | ||
169 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
170 | + <script | ||
171 | + src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | ||
172 | + <script src="../static/js/model.js"></script> | ||
173 | + <script src="../static/js/loading.js"></script> | ||
174 | + <script src="../static/js/remove.js?a=2"></script> | ||
175 | + <script src="../static/js/dailog.js"></script> | ||
176 | + <script type="text/javascript"> | ||
177 | + function chooseClass(classID,termID){ | ||
178 | + var path = "../student/listcs.do?class_id=" + classID + "&term_id=" + termID ; | ||
179 | + //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>'); | ||
180 | + if($("#mainFrame").attr('src') != (path)){ | ||
181 | + $("#mainFrame").attr('src',path); | ||
182 | + window.top.loading.show(); | ||
183 | + } | ||
184 | + } | ||
185 | + | ||
186 | + function report(classId){ | ||
187 | + //window.open('<%=basePath%>report/report.do?classid=' + classId); | ||
188 | + //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){ | ||
189 | + $("#mainFrame").attr('src','<%=basePath%>report/report.do?classid=' + classId); | ||
190 | + window.top.loading.show(); | ||
191 | + //} | ||
192 | + } | ||
193 | + function report2(classId){ | ||
194 | + //window.open('<%=basePath%>report/report.do?classid=' + classId); | ||
195 | + //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){ | ||
196 | + $("#mainFrame").attr('src','<%=basePath%>teacher/test_list.do?classid=' + classId); | ||
197 | + window.top.loading.show(); | ||
198 | + //} | ||
199 | + } | ||
200 | + | ||
201 | + $("#time_submit").click(function(){ | ||
202 | + var name = $("#enter_title").val(); | ||
203 | + var time = $("#enter_time").val(); | ||
204 | + var TEMPLATE_ID = $("#TEMPLATE_ID").val(); | ||
205 | + if(name != null&& name != '' && time != null && time != ''){ | ||
206 | + var itime = parseInt(time); | ||
207 | + if(itime > 0 && itime <= 300){ | ||
208 | + self.location.href = encodeURI("<%=basePath%>" + "paper/npaper.do?" + "name=" + name + "&time=" + time +"&TEMPLATE_ID=" + TEMPLATE_ID); | ||
209 | + $(".title_time").modal("hide"); | ||
210 | + }else{ | ||
211 | + alert("Please input correct time, time cannot exceed 300 minutes"); | ||
212 | + } | ||
213 | + } | ||
214 | + }); | ||
215 | + | ||
216 | + $("#qingsongkao_paper").click(function (){ | ||
217 | + var path = "../paper/list2.do?" ; | ||
218 | + //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>'); | ||
219 | + if($("#mainFrame").attr('src') != (path)){ | ||
220 | + $("#mainFrame").attr('src',path); | ||
221 | + window.top.loading.show(); | ||
222 | + } | ||
223 | + }); | ||
224 | + | ||
225 | + $("#jishice_paper").click(function (){ | ||
226 | + var path = "../teacher/teach_paper.do?" ; | ||
227 | + //if($("#mainFrame").attr('src') != (path)){ | ||
228 | + $("#mainFrame").attr('src',path); | ||
229 | + window.top.loading.show(); | ||
230 | + //} | ||
231 | + }); | ||
232 | + | ||
233 | + var defaultUrl = '${pd.DEFAULTURL}' ; | ||
234 | + if(defaultUrl != '' && defaultUrl != ''){ | ||
235 | + $("#mainFrame").attr('src',defaultUrl); | ||
236 | + } | ||
237 | + </script> | ||
238 | +</body> | ||
239 | +</html> | ||
0 | \ No newline at end of file | 240 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_teacher_report_1.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme() + "://" | ||
8 | + + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | + | ||
12 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
13 | +<html> | ||
14 | +<head> | ||
15 | +<base href="<%=basePath%>"> | ||
16 | + | ||
17 | +<title>${info.CLASS_NAME} Test Paper Score Report</title> | ||
18 | +<base href="<%=basePath%>"> | ||
19 | +<!-- 下拉框 --> | ||
20 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | ||
21 | + <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" /> | ||
22 | +<!-- jsp文件头和头部 --> | ||
23 | +<%@ include file="../../system/index/top.jsp"%> | ||
24 | +<!-- 日期框 --> | ||
25 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | ||
26 | +<style> | ||
27 | + .font span{ font-size: 12px; | ||
28 | + font-weight: initial;color:#000;} | ||
29 | + </style> | ||
30 | +</head> | ||
31 | + | ||
32 | +<body style="background:#fff;"> | ||
33 | + <div style="padding:20px 20px;"> | ||
34 | + <form action="report/report.do" method="post" name="Form" id="Form" style="margin-bottom:0;"> | ||
35 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | ||
36 | + <input type="hidden" name="ROLE" id="ROLE" value="${pd.ROLE}" /> | ||
37 | + <table style="margin-top:5px;margin-bottom:20px;"> | ||
38 | + <tr> | ||
39 | + <td><div style="width:150px;text-align:center;">Tests: ${info.testsize}</div></td> | ||
40 | + <td><div style="width:150px;text-align:center;">Class list: ${info.CLASS_NAME}</div></td> | ||
41 | + | ||
42 | + <td><div style="width:150px;text-align:center;"><span>Student number: ${info.STUDENT_NUM}</span></div></td> | ||
43 | + <td></td> | ||
44 | + <c:if test="${not empty subjectInfos}"> | ||
45 | + <td> | ||
46 | + <select class="chosen-select form-control" name="SUBJECT_ID" id="SUBJECT_ID" data-placeholder="这里输入所属学校"> | ||
47 | + <option value="">All</option> | ||
48 | + <c:forEach var="item" items="${subjectInfos}"> | ||
49 | + <option value="${item.SUBJECT_ID}" <c:if test="${pd.SUBJECT_ID == item.SUBJECT_ID }">selected = ture</c:if>>${item.SCNAME}</option> | ||
50 | + </c:forEach> | ||
51 | + </select> | ||
52 | + </td> | ||
53 | + </c:if> | ||
54 | + <td style="padding-left:2px;"> | ||
55 | + <input | ||
56 | + class="span10 date-picker" name="lastStart" id="lastStart" | ||
57 | + value="${start_date}" type="text" data-date-format="yyyy-mm-dd" | ||
58 | + readonly="readonly" style="width:88px;" placeholder="Start Date" | ||
59 | + title="Start Date" /> | ||
60 | + </td> | ||
61 | + <td style="padding-left:2px;"><input | ||
62 | + class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}" | ||
63 | + type="text" data-date-format="yyyy-mm-dd" readonly="readonly" | ||
64 | + style="width:88px;" placeholder="End Date" title="End Date" /></td> | ||
65 | + <td style="vertical-align:top;padding-left:2px"><a | ||
66 | + class="btn btn-light btn-xs" onclick="tosearch();" title="Search"><i | ||
67 | + id="nav-search-icon" | ||
68 | + class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td> | ||
69 | + </tr> | ||
70 | + </table> | ||
71 | + <table id="simple-table" | ||
72 | + class="table table-striped table-bordered table-hover" | ||
73 | + style="margin-top:0px;margin-bottom:0px;"> | ||
74 | + <thead> | ||
75 | + <tr> | ||
76 | + <th class="center th_name"><div style="width:150px;">Name</div></th> | ||
77 | + <th class="center "><div style="width:150px;">Average Score Rate</div></th> | ||
78 | + <th class="center"><div style="width:80px;">Total</div></th> | ||
79 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
80 | + <th class="center kc"><a | ||
81 | + onclick="paper('${info.CLASS_ID}','${var.TESTPAPER_ID}');"><div style="width:180px; margin: 0 auto;cursor:hand" class="font">${var.NAME}</br><span>${var.CREATE_DATE}</span></div></a></th> | ||
82 | + </c:forEach> | ||
83 | + </tr> | ||
84 | + </thead> | ||
85 | + <tbody> | ||
86 | + <tr> | ||
87 | + <td class="center"><div style="width:150px;">Total score</div></td> | ||
88 | + <td class="center"><div style="width:150px;"></div></td> | ||
89 | + <td class="center"><div style="width:80px;"></div></td> | ||
90 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
91 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.TOTAL_SCORE}</div></td> | ||
92 | + </c:forEach> | ||
93 | + </tr> | ||
94 | + <tr> | ||
95 | + <td class="center"><div style="width:150px;">Average Score</div></td> | ||
96 | + <td class="center"><div style="width:150px;"></div></td> | ||
97 | + <td class="center"><div style="width:80px;"></div></td> | ||
98 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
99 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.AVG_SCORE}</div></td> | ||
100 | + </c:forEach> | ||
101 | + </tr> | ||
102 | + <tr> | ||
103 | + <td class="center"><div style="width:150px;">Average Score Rate</div></td> | ||
104 | + <td class="center"><div style="width:150px;"></div></td> | ||
105 | + <td class="center"><div style="width:80px;"></div></td> | ||
106 | + <c:forEach items="${testpaperList}" var="var" varStatus="vs"> | ||
107 | + <td class="center"><div style="width:80px;margin:0 auto;"><fmt:formatNumber type="number" | ||
108 | + value="${var.TOTAL_SCORE == 0 ? 0: (var.AVG_SCORE / var.TOTAL_SCORE * 100)}" | ||
109 | + maxFractionDigits="2" />%</div></td> | ||
110 | + </c:forEach> | ||
111 | + </tr> | ||
112 | + | ||
113 | + <c:choose> | ||
114 | + <c:when test="${not empty studentList}"> | ||
115 | + <c:forEach items="${studentList}" var="var" varStatus="vs"> | ||
116 | + <tr> | ||
117 | + <%-- <td class="center"><a | ||
118 | + href="report/student_report?studentid=${var.ID}&class_id=${info.CLASS_ID}">${var.NAME}</a> | ||
119 | + </td> --%> | ||
120 | + <td class="center"><div style="width:150px;cursor:hand"><a | ||
121 | + onclick="student('${info.CLASS_ID}','${var.STUDENT_ID}')">${var.NAME}</a></div> | ||
122 | + </td> | ||
123 | + <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" | ||
124 | + value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | ||
125 | + maxFractionDigits="2" />%</div></td> | ||
126 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.GETSCORE }</div></td> | ||
127 | + <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> | ||
128 | + <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" | ||
129 | + value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</div></td> | ||
130 | + </c:forEach> | ||
131 | + </tr> | ||
132 | + </c:forEach> | ||
133 | + </c:when> | ||
134 | + </c:choose> | ||
135 | + </tbody> | ||
136 | + </table> | ||
137 | + <div id="scrollableTable"></div> | ||
138 | + </form> | ||
139 | + </div> | ||
140 | + | ||
141 | + <%@ include file="../../system/index/foot.jsp"%> | ||
142 | + <script src="static/ace/js/bootbox.js"></script> | ||
143 | + <!-- ace scripts --> | ||
144 | + <script src="static/ace/js/ace/ace.js"></script> | ||
145 | + <!-- 下拉框 --> | ||
146 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
147 | + <!-- 日期框 --> | ||
148 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
149 | + <!--提示框--> | ||
150 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
151 | + | ||
152 | + <script language="javascript" src="static/js/tablescroller.js"></script> | ||
153 | + <script language="javascript" src="static/js/tablescroller.jquery.js"></script> | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | + <script type="text/javascript"> | ||
158 | + $(function() { | ||
159 | + | ||
160 | + $.fn.datepicker.dates['en'] = { | ||
161 | + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], | ||
162 | + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
163 | + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], | ||
164 | + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | ||
165 | + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], | ||
166 | + today: "Today", | ||
167 | + clear: "Clear", | ||
168 | + format: "mm/dd/yyyy", | ||
169 | + titleFormat: "MM yyyy", /* Leverages same syntax as 'format' */ | ||
170 | + weekStart: 0 | ||
171 | + }; | ||
172 | + //日期框 | ||
173 | + $('.date-picker').datepicker({ | ||
174 | + autoclose: true, | ||
175 | + todayHighlight: true, | ||
176 | + language: 'en' | ||
177 | + }); | ||
178 | + | ||
179 | + //下拉框 | ||
180 | + if (!ace.vars['touch']) { | ||
181 | + $('.chosen-select').chosen({ | ||
182 | + allow_single_deselect : true | ||
183 | + }); | ||
184 | + $(window).off('resize.chosen').on('resize.chosen', function() { | ||
185 | + $('.chosen-select').each(function() { | ||
186 | + var $this = $(this); | ||
187 | + $this.next().css({ | ||
188 | + 'width' : $this.parent().width() | ||
189 | + }); | ||
190 | + }); | ||
191 | + }).trigger('resize.chosen'); | ||
192 | + $(document).on('settings.ace.chosen', | ||
193 | + function(e, event_name, event_val) { | ||
194 | + if (event_name != 'sidebar_collapsed') | ||
195 | + return; | ||
196 | + $('.chosen-select').each(function() { | ||
197 | + var $this = $(this); | ||
198 | + $this.next().css({ | ||
199 | + 'width' : $this.parent().width() | ||
200 | + }); | ||
201 | + }); | ||
202 | + }); | ||
203 | + $('#chosen-multiple-style .btn').on( | ||
204 | + 'click', | ||
205 | + function(e) { | ||
206 | + var target = $(this).find('input[type=radio]'); | ||
207 | + var which = parseInt(target.val()); | ||
208 | + if (which == 2) | ||
209 | + $('#form-field-select-4').addClass( | ||
210 | + 'tag-input-style'); | ||
211 | + else | ||
212 | + $('#form-field-select-4').removeClass( | ||
213 | + 'tag-input-style'); | ||
214 | + }); | ||
215 | + } | ||
216 | + | ||
217 | + //复选框全选控制 | ||
218 | + var active_class = 'active'; | ||
219 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | ||
220 | + 'click', | ||
221 | + function() { | ||
222 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
223 | + $(this).closest('table').find('tbody > tr').each( | ||
224 | + function() { | ||
225 | + var row = this; | ||
226 | + if (th_checked) | ||
227 | + $(row).addClass(active_class).find( | ||
228 | + 'input[type=checkbox]').eq(0) | ||
229 | + .prop('checked', true); | ||
230 | + else | ||
231 | + $(row).removeClass(active_class).find( | ||
232 | + 'input[type=checkbox]').eq(0) | ||
233 | + .prop('checked', false); | ||
234 | + }); | ||
235 | + }); | ||
236 | + }); | ||
237 | + | ||
238 | + var role = '${pd.ROLE}'; | ||
239 | + | ||
240 | + function precent(avg,total){ | ||
241 | + if(total == 0){ | ||
242 | + return "0%" | ||
243 | + } | ||
244 | + return Math.round(avg / total * 100)/100 + '%' ; | ||
245 | + } | ||
246 | + | ||
247 | + function tosearch(){ | ||
248 | + var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ; | ||
249 | + var startDate = $("#lastStart").val(); | ||
250 | + var endDate = $("#lastEnd").val(); | ||
251 | + var subject_id = $("#SUBJECT_ID").val(); | ||
252 | + url = url + "&start_date=" + startDate ; | ||
253 | + if(endDate != null){ | ||
254 | + url = url + "&end_date=" + endDate; | ||
255 | + } | ||
256 | + if(subject_id != null){ | ||
257 | + url = url + "&SUBJECT_ID=" + subject_id; | ||
258 | + } | ||
259 | + if(role == "admin"){ | ||
260 | + url = url + "&ROLE=admin" ; | ||
261 | + } | ||
262 | + window.location.href = url; | ||
263 | + window.top.loading.show(); | ||
264 | + /* $("#Form").sumbit(); */ | ||
265 | + } | ||
266 | + | ||
267 | + function student(classid,studentid){ | ||
268 | + | ||
269 | + var url = "<%=basePath%>report/student_report?studentid=" + studentid + "&class_id=" + classid ; | ||
270 | + var startDate = $("#lastStart").val(); | ||
271 | + var endDate = $("#lastEnd").val(); | ||
272 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
273 | + var SUBJECT_ID = $("#SUBJECT_ID").val(); | ||
274 | + if(SUBJECT_ID != null && SUBJECT_ID != ''){ | ||
275 | + url = url + "&SUBJECT_ID="+ SUBJECT_ID ; | ||
276 | + } | ||
277 | + window.self.location.href = url; | ||
278 | + window.top.loading.show(); | ||
279 | + } | ||
280 | + | ||
281 | + function paper(class_id,testpaper_id){ | ||
282 | + var url = "<%=basePath%>report/test_report?TestID=" + testpaper_id + "&class_id=" + class_id; | ||
283 | + var startDate = $("#lastStart").val(); | ||
284 | + var endDate = $("#lastEnd").val(); | ||
285 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
286 | + window.self.location.href = url; | ||
287 | + window.top.loading.show(); | ||
288 | + } | ||
289 | + | ||
290 | + $(document).ready(function(){ | ||
291 | + window.top.loading.remove(); | ||
292 | + | ||
293 | + var sour = "${testpaperList}"; | ||
294 | + | ||
295 | + if(sour != null && sour.length > 3){ | ||
296 | + var _width = $('#mainFrame', parent.document).width()-40; | ||
297 | + var _heigh = $('#mainFrame', parent.document).height()-100; | ||
298 | + var options = { | ||
299 | + width: _width, | ||
300 | + height: _heigh, | ||
301 | + pinnedRows: 4, | ||
302 | + pinnedCols: 3, | ||
303 | + container: "#scrollableTable", | ||
304 | + removeOriginal: true | ||
305 | + }; | ||
306 | + $("#simple-table").tablescroller(options); | ||
307 | + var name_height = $(".kc").last().parent().height()-18.5; | ||
308 | + console.log(name_height); | ||
309 | + $(".th_name").height(name_height); | ||
310 | + } | ||
311 | + | ||
312 | + }); | ||
313 | + | ||
314 | + </script> | ||
315 | + | ||
316 | +</body> | ||
317 | +</html> |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_teacher_report_test.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme() + "://" | ||
8 | + + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | + | ||
12 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
13 | +<html> | ||
14 | +<head> | ||
15 | +<base href="<%=basePath%>"> | ||
16 | + | ||
17 | +<title>Test Paper Score Report</title> | ||
18 | +<base href="<%=basePath%>"> | ||
19 | +<!-- 下拉框 --> | ||
20 | +<link rel="stylesheet" href="static/ace/css/chosen.css" /> | ||
21 | + <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" /> | ||
22 | +<!-- jsp文件头和头部 --> | ||
23 | +<%@ include file="../../system/index/top.jsp"%> | ||
24 | +<!-- 日期框 --> | ||
25 | +<link rel="stylesheet" href="static/ace/css/datepicker.css" /> | ||
26 | +<style> | ||
27 | +.table{padding-bottom:0 !important;} | ||
28 | +</style> | ||
29 | +</head> | ||
30 | + | ||
31 | +<body style="background:#fff;/* overflow-y:hidden; */"> | ||
32 | + <div style="padding:20px 20px;"> | ||
33 | + | ||
34 | + <form action="report/report_test.do" method="post" name="Form" id="Form"> | ||
35 | + <input type="hidden" name="CLASSID" id="CLASSID" value="${info.CLASS_ID}" /> | ||
36 | + <table style="margin-top:5px;"> | ||
37 | + <tr style="height: 30px"> | ||
38 | + <td>Exam Title: ${testpaperInfo.NAME}</td> | ||
39 | + <c:if test="${display}"> | ||
40 | + <td> </td> | ||
41 | + <td>Teacher: ${teacherPd.NAME}</td> | ||
42 | + <td> </td> | ||
43 | + <td>Subject: ${subjectPd.CNAME}</td> | ||
44 | + </c:if> | ||
45 | + </tr> | ||
46 | + <tr style="height: 30px"> | ||
47 | + <td>Paper collecting time: ${testpaperInfo.END_DATE}</td> | ||
48 | + </tr> | ||
49 | + <tr style="height: 30px"> | ||
50 | + <td>Class list:${classInfo.CLASS_NAME}</td> | ||
51 | + <td> </td> | ||
52 | + <td><span>Student number: ${classInfo.studentNum}</span></td> | ||
53 | + | ||
54 | + </tr> | ||
55 | + </table> | ||
56 | + <table id="simple-table" | ||
57 | + class="table table-striped table-bordered table-hover" | ||
58 | + style="margin-top:0px;margin-bottom:0;"> | ||
59 | + <thead> | ||
60 | + <tr> | ||
61 | + <th class="center"><div style="width:80px;">Name</div></th> | ||
62 | + <th class="center"><div style="width:80px;">Ranking</div></th> | ||
63 | + <th class="center"><div style="width:80px;">Score</div></th> | ||
64 | + <th class="center"><div style="width:80px;">Student ID</div></th> | ||
65 | + <th class="center"><div style="width:109px;">Keypad</div></th> | ||
66 | + <!-- <th class="center"><div style="width:80px;">正确率</div></th> --> | ||
67 | + <c:forEach items="${questionInfo}" var="var" varStatus="vs"> | ||
68 | + <th class="center"><div style="width:80px;margin:0 auto;">Question ${vs.index+1}</div></th> | ||
69 | + </c:forEach> | ||
70 | + <!-- <th class="center"><div style="width:150px;">非选择题得分</div></th> --> | ||
71 | + <th class="center"><div style="width:80px;margin:0 auto;">总分</div></th> | ||
72 | + </tr> | ||
73 | + </thead> | ||
74 | + <tbody> | ||
75 | + <tr> | ||
76 | + <td class="center"><div style="width:109px;">--</div></td> | ||
77 | + <td class="center"><div style="width:80px;">--</div></td> | ||
78 | + <td class="center"><div style="width:80px;">--</div></td> | ||
79 | + <td class="center"><div style="width:80px;">--</div></td> | ||
80 | + <!-- <td class="center"></td> --> | ||
81 | + <td class="center"><div style="width:80px;">--</div></td> | ||
82 | + <c:forEach items="${questionInfo}" var="var" varStatus="vs"> | ||
83 | + <td class="center"><div style="width:80px;margin:0 auto;"><c:set var="key"><c:out value="${vs.index+1}" /></c:set><fmt:formatNumber type="number" | ||
84 | + value="${(questionInfo[key] / classInfo.studentNum * 100)}" | ||
85 | + maxFractionDigits="1" />%</div></td> | ||
86 | + </c:forEach> | ||
87 | + <!-- <td class="center"></td> --> | ||
88 | + <td class="center"><div style="width:80px;margin:0 auto;"></div></td> | ||
89 | + </tr> | ||
90 | + | ||
91 | + <c:choose> | ||
92 | + <c:when test="${not empty studentInfo}"> | ||
93 | + <c:forEach items="${studentInfo}" var="var" varStatus="vs"> | ||
94 | + <tr> | ||
95 | + <td class="center"><div style="width:80px;">${var.NAME}</div></td> | ||
96 | + <td class="center"><div style="width:80px;">${var.RANK_NUM}</div></td> | ||
97 | + <td class="center"><div style="width:80px;">${var.GETSCORE}</div></td> | ||
98 | + <td class="center"><div style="width:80px;">${var.NUMBER}</div></td> | ||
99 | + <td class="center"><div style="width:109px;">${var.KEYPAD_ID}</div></td> | ||
100 | + <%-- <td class="center">${var.RIGHT}</td> --%> | ||
101 | + <c:forEach items="${questionInfo}" var="var1" varStatus="vs1"> | ||
102 | + <td class="center" <c:if test="${var.detail[vs1.index].RIGHT== '1'}">style="background:#0bb8b9"</c:if>div style="width:80px;margin:0 auto;">${var.detail[vs1.index].ANSWER}</div></td> | ||
103 | + </c:forEach> | ||
104 | + <%-- <td class="center">${var.OTHER_SCORE}</td> --%> | ||
105 | + <td class="center"><div style="width:80px;margin:0 auto;">${var.GETSCORE}</div></td> | ||
106 | + </tr> | ||
107 | + </c:forEach> | ||
108 | + </c:when> | ||
109 | + </c:choose> | ||
110 | + </tbody> | ||
111 | + </table> | ||
112 | + <div id="scrollableTable"></div> | ||
113 | + </form> | ||
114 | + </div> | ||
115 | + | ||
116 | + <%@ include file="../../system/index/foot.jsp"%> | ||
117 | + <script src="static/ace/js/bootbox.js"></script> | ||
118 | + <!-- ace scripts --> | ||
119 | + <script src="static/ace/js/ace/ace.js"></script> | ||
120 | + <!-- 下拉框 --> | ||
121 | + <script src="static/ace/js/chosen.jquery.js"></script> | ||
122 | + <!-- 日期框 --> | ||
123 | + <script src="static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
124 | + <!--提示框--> | ||
125 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
126 | + | ||
127 | + <script language="javascript" src="static/js/tablescroller.js"></script> | ||
128 | + <script language="javascript" src="static/js/tablescroller.jquery.js"></script> | ||
129 | + | ||
130 | + | ||
131 | + <script type="text/javascript"> | ||
132 | + $(document).ready(function(){ | ||
133 | + window.top.loading.remove(); | ||
134 | + | ||
135 | + var _heigh = $('#mainFrame', parent.document).height()-120; | ||
136 | + //console.log(_heigh); | ||
137 | + | ||
138 | + var options = { | ||
139 | + width: '100%', | ||
140 | + height: _heigh, | ||
141 | + pinnedRows: 2, | ||
142 | + pinnedCols: 5, | ||
143 | + container: "#scrollableTable", | ||
144 | + removeOriginal: true | ||
145 | + }; | ||
146 | + | ||
147 | +// $("#simple-table").tablescroller(options); | ||
148 | + }); | ||
149 | + $(function() { | ||
150 | + | ||
151 | + //日期框 | ||
152 | + $('.date-picker').datepicker({ | ||
153 | + autoclose : true, | ||
154 | + todayHighlight : true | ||
155 | + }); | ||
156 | + | ||
157 | + //下拉框 | ||
158 | + if (!ace.vars['touch']) { | ||
159 | + $('.chosen-select').chosen({ | ||
160 | + allow_single_deselect : true | ||
161 | + }); | ||
162 | + $(window).off('resize.chosen').on('resize.chosen', function() { | ||
163 | + $('.chosen-select').each(function() { | ||
164 | + var $this = $(this); | ||
165 | + $this.next().css({ | ||
166 | + 'width' : $this.parent().width() | ||
167 | + }); | ||
168 | + }); | ||
169 | + }).trigger('resize.chosen'); | ||
170 | + $(document).on('settings.ace.chosen', | ||
171 | + function(e, event_name, event_val) { | ||
172 | + if (event_name != 'sidebar_collapsed') | ||
173 | + return; | ||
174 | + $('.chosen-select').each(function() { | ||
175 | + var $this = $(this); | ||
176 | + $this.next().css({ | ||
177 | + 'width' : $this.parent().width() | ||
178 | + }); | ||
179 | + }); | ||
180 | + }); | ||
181 | + $('#chosen-multiple-style .btn').on( | ||
182 | + 'click', | ||
183 | + function(e) { | ||
184 | + var target = $(this).find('input[type=radio]'); | ||
185 | + var which = parseInt(target.val()); | ||
186 | + if (which == 2) | ||
187 | + $('#form-field-select-4').addClass( | ||
188 | + 'tag-input-style'); | ||
189 | + else | ||
190 | + $('#form-field-select-4').removeClass( | ||
191 | + 'tag-input-style'); | ||
192 | + }); | ||
193 | + } | ||
194 | + | ||
195 | + //复选框全选控制 | ||
196 | + var active_class = 'active'; | ||
197 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | ||
198 | + 'click', | ||
199 | + function() { | ||
200 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
201 | + $(this).closest('table').find('tbody > tr').each( | ||
202 | + function() { | ||
203 | + var row = this; | ||
204 | + if (th_checked) | ||
205 | + $(row).addClass(active_class).find( | ||
206 | + 'input[type=checkbox]').eq(0) | ||
207 | + .prop('checked', true); | ||
208 | + else | ||
209 | + $(row).removeClass(active_class).find( | ||
210 | + 'input[type=checkbox]').eq(0) | ||
211 | + .prop('checked', false); | ||
212 | + }); | ||
213 | + }); | ||
214 | + }); | ||
215 | + | ||
216 | + | ||
217 | + function precent(avg,total){ | ||
218 | + if(total == 0){ | ||
219 | + return "0%" | ||
220 | + } | ||
221 | + return Math.round(avg / total * 100)/100 + '%' ; | ||
222 | + } | ||
223 | + </script> | ||
224 | + | ||
225 | +</body> | ||
226 | +</html> |
WebRoot/WEB-INF/jsp/sunvote/teacher/en_test_list.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | ||
2 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
3 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
4 | +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; | ||
8 | +%> | ||
9 | +<!DOCTYPE html> | ||
10 | +<html lang="zh-CN"> | ||
11 | + <head> | ||
12 | + <meta charset="utf-8"> | ||
13 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
14 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
15 | + <title>SunVote Class</title> | ||
16 | + | ||
17 | + <!-- Bootstrap --> | ||
18 | + <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
19 | + <link rel="stylesheet" href="../static/ace/css/datepicker.css" /> | ||
20 | + <link href="../static/css/teach.css" rel="stylesheet"> | ||
21 | + <link href="../static/css/paper.css?t=1" rel="stylesheet"> | ||
22 | + </head> | ||
23 | + <body> | ||
24 | + <div class="head_box"> | ||
25 | + <div class="box_header"> | ||
26 | + <div class="head_box_l"> | ||
27 | + <p> | ||
28 | + <span class="right_b"></span>SunVote Class Test Paper Management | ||
29 | + </p> | ||
30 | + </div> | ||
31 | + <div class="head_box_r"> | ||
32 | + <input class="date-picker" type="text" placeholder="Start Date" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
33 | + <input type="text" class="date-picker" placeholder="End Date" name="lastEnd" id="lastEnd" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
34 | + <a onclick="tosearch();"><img | ||
35 | + src="../static/images/search.png" /></a> | ||
36 | + </div> | ||
37 | + <div class="clear"></div> | ||
38 | + </div> | ||
39 | + <div style="padding:0 5%;background:#fff;"> | ||
40 | + <table class="table table-striped"> | ||
41 | + <col style="width: 10%" /> | ||
42 | + <col style="width: 20%" /> | ||
43 | + <col style="width: 10%" /> | ||
44 | + <col style="width: 20%" /> | ||
45 | + <col style="width: 10%" /> | ||
46 | + <thead> | ||
47 | + <tr> | ||
48 | + <th>Serial No.</th> | ||
49 | + <th>Test Paper Title</th> | ||
50 | + <th>Class</th> | ||
51 | + <th>Create Time</th> | ||
52 | + <th>Operate</th> | ||
53 | + </tr> | ||
54 | + </thead> | ||
55 | + </table> | ||
56 | + </div> | ||
57 | + <div class="clearfix"></div> | ||
58 | + </div> | ||
59 | + <div class="table_box"> | ||
60 | + <table class="table table-striped"> | ||
61 | + <col style="width: 10%" /> | ||
62 | + <col style="width: 20%" /> | ||
63 | + <col style="width: 10%" /> | ||
64 | + <col style="width: 20%" /> | ||
65 | + <col style="width: 10%" /> | ||
66 | + <tbody id="tab_body"> | ||
67 | + <!--测验列表--> | ||
68 | + </tbody> | ||
69 | + </table> | ||
70 | + | ||
71 | + | ||
72 | + <div class="footer"> | ||
73 | + <div class="page_box"> | ||
74 | + <div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div> | ||
75 | + </div> | ||
76 | + </div> | ||
77 | + </div> | ||
78 | + | ||
79 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
80 | + <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | ||
81 | + <script src="../static/ace/js/date-time/bootstrap-datepicker.js"></script> | ||
82 | + <script type="text/javascript"> | ||
83 | + var user_id= "${pd.userId}"; | ||
84 | + var url = "<%=basePath%>"; | ||
85 | + </script> | ||
86 | + <script src="../static/js/en_test_list.js?a=1"></script> | ||
87 | +</html> | ||
0 | \ No newline at end of file | 88 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/system/index/en_login.jsp
0 → 100644
1 | +<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
2 | + pageEncoding="UTF-8"%> | ||
3 | +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> | ||
4 | +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | ||
5 | +<% | ||
6 | + String path = request.getContextPath(); | ||
7 | + String basePath = request.getScheme() + "://" | ||
8 | + + request.getServerName() + ":" + request.getServerPort() | ||
9 | + + path + "/"; | ||
10 | +%> | ||
11 | +<!DOCTYPE html> | ||
12 | +<html lang="zh-CN"> | ||
13 | +<head> | ||
14 | +<meta charset="utf-8"> | ||
15 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
16 | +<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
17 | +<title>SunVote-Education Management System</title> | ||
18 | + | ||
19 | +<!-- Bootstrap --> | ||
20 | +<link | ||
21 | + href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" | ||
22 | + rel="stylesheet"> | ||
23 | +<link href="static/login/style_login.css" rel="stylesheet"> | ||
24 | + | ||
25 | +<script src="static/js/jquery-1.7.2.js"></script> | ||
26 | +<script src="static/login/js/jquery.easing.1.3.js"></script> | ||
27 | +<script type="text/javascript" src="static/js/jQuery.md5.js"></script> | ||
28 | +<script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
29 | +<script type="text/javascript" src="static/js/jquery.cookie.js"></script> | ||
30 | +<script type="text/javascript" src="static/js/lang.js"></script> | ||
31 | +<script type="text/javascript" > | ||
32 | + if(lang() != 'en'){ | ||
33 | + | ||
34 | + } | ||
35 | +</script> | ||
36 | +<style type="text/css"> | ||
37 | +.div_foot { | ||
38 | + height: 30px; | ||
39 | + line-height: 35px; | ||
40 | + position: fixed; | ||
41 | + bottom: 0; | ||
42 | + width: 100%; | ||
43 | + text-align: center; | ||
44 | + font-family: Arial; | ||
45 | + font-size: 14px; | ||
46 | + letter-spacing: 1px; | ||
47 | +} | ||
48 | +</style> | ||
49 | + | ||
50 | +<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 --> | ||
51 | +<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 --> | ||
52 | +<!--[if lt IE 9]> | ||
53 | + <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> | ||
54 | + <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> | ||
55 | + <![endif]--> | ||
56 | +</head> | ||
57 | +<body> | ||
58 | + <div class="content"> | ||
59 | + <div class="content_t"> | ||
60 | + <img src="static/login/en_title.png" alt="SunVote" /> | ||
61 | + </div> | ||
62 | + <div class="content_b"> | ||
63 | + <div class="form_box"> | ||
64 | + <form action="" method="post" name="loginbox" id="loginbox"> | ||
65 | + <input type="text" name="loginname" id="loginname" value="" | ||
66 | + placeholder="Username" /> <input type="password" name="password" | ||
67 | + id="password" placeholder="Password" value="" /> <a href="#" | ||
68 | + onclick="severCheck();" class="login_btn">Login</a> | ||
69 | + </form> | ||
70 | + | ||
71 | + </div> | ||
72 | + </div> | ||
73 | + <div class="div_foot"> | ||
74 | + ©Changsha SunVote Limited. All rights reserved. Record License No. <a target= "_blank" href="http://www.miitbeian.gov.cn/">湘ICP备09025927号-10</a> | ||
75 | + </div> | ||
76 | + <script type="text/javascript"> | ||
77 | + | ||
78 | + if(window.top != window.self){ | ||
79 | + window.top.location.href = "<%=basePath%>"; | ||
80 | + } | ||
81 | + //客户端校验 | ||
82 | + function check() { | ||
83 | + | ||
84 | + if ($("#loginname").val() == "") { | ||
85 | + $("#loginname").tips({ | ||
86 | + side : 2, | ||
87 | + msg : 'User name cannot be empty', | ||
88 | + bg : '#AE81FF', | ||
89 | + time : 3 | ||
90 | + }); | ||
91 | + showfh(); | ||
92 | + $("#loginname").focus(); | ||
93 | + return false; | ||
94 | + } else { | ||
95 | + $("#loginname").val(jQuery.trim($('#loginname').val())); | ||
96 | + } | ||
97 | + if ($("#password").val() == "") { | ||
98 | + $("#password").tips({ | ||
99 | + side : 2, | ||
100 | + msg : 'Password cannot be empty', | ||
101 | + bg : '#AE81FF', | ||
102 | + time : 3 | ||
103 | + }); | ||
104 | + showfh(); | ||
105 | + $("#password").focus(); | ||
106 | + return false; | ||
107 | + } | ||
108 | + | ||
109 | + $("#loginbox").tips({ | ||
110 | + side : 1, | ||
111 | + msg : 'Logining, please wait...', | ||
112 | + bg : '#68B500', | ||
113 | + time : 10 | ||
114 | + }); | ||
115 | + | ||
116 | + return true; | ||
117 | + } | ||
118 | + | ||
119 | + //服务器校验 | ||
120 | + function severCheck(){ | ||
121 | + if(check()){ | ||
122 | + var loginname = $("#loginname").val(); | ||
123 | + var password = $("#password").val(); | ||
124 | + var code = loginname+";;;"+password+";;;" + $("#code").val(); | ||
125 | + $.ajax({ | ||
126 | + type: "POST", | ||
127 | + url: 'login_login', | ||
128 | + data: {KEYDATA:code,tm:new Date().getTime()}, | ||
129 | + dataType:'json', | ||
130 | + cache: false, | ||
131 | + success: function(data){ | ||
132 | + if("success" == data.result){ | ||
133 | + saveCookie(); | ||
134 | + if(data.teacher != null){ | ||
135 | + window.location.href="main/teacher"; | ||
136 | + }else if(data.admin != null){ | ||
137 | + window.location.href="main/admin"; | ||
138 | + }else{ | ||
139 | + window.location.href="main/index"; | ||
140 | + } | ||
141 | + }else if("usererror" == data.result){ | ||
142 | + $("#loginname").tips({ | ||
143 | + side : 1, | ||
144 | + msg : "Incorrect user name or password", | ||
145 | + bg : '#FF5080', | ||
146 | + time : 15 | ||
147 | + }); | ||
148 | + showfh(); | ||
149 | + $("#loginname").focus(); | ||
150 | + }else if("codeerror" == data.result){ | ||
151 | + $("#code").tips({ | ||
152 | + side : 1, | ||
153 | + msg : "Incorrect captcha input", | ||
154 | + bg : '#FF5080', | ||
155 | + time : 15 | ||
156 | + }); | ||
157 | + showfh(); | ||
158 | + $("#code").focus(); | ||
159 | + }else{ | ||
160 | + $("#loginname").tips({ | ||
161 | + side : 1, | ||
162 | + msg : "Missing parameters", | ||
163 | + bg : '#FF5080', | ||
164 | + time : 15 | ||
165 | + }); | ||
166 | + showfh(); | ||
167 | + $("#loginname").focus(); | ||
168 | + } | ||
169 | + } | ||
170 | + }); | ||
171 | + } | ||
172 | + } | ||
173 | + | ||
174 | + function saveCookie() { | ||
175 | + if ($("#saveid").attr("checked")) { | ||
176 | + $.cookie('loginname', $("#loginname").val(), { | ||
177 | + expires : 7 | ||
178 | + }); | ||
179 | + $.cookie('password', $("#password").val(), { | ||
180 | + expires : 7 | ||
181 | + }); | ||
182 | + } | ||
183 | + } | ||
184 | + </script> | ||
185 | + <script type="text/javascript" | ||
186 | + src="static/login/js/jquery-1.5.1.min.js"></script> | ||
187 | + <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | ||
188 | + <script | ||
189 | + src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | ||
190 | + <script src="static/login/js/bootstrap.min.js"></script> | ||
191 | + <script src="static/js/jquery-1.7.2.js"></script> | ||
192 | + <script src="static/login/js/jquery.easing.1.3.js"></script> | ||
193 | + <script src="static/login/js/jquery.mobile.customized.min.js"></script> | ||
194 | + <script src="static/login/js/camera.min.js"></script> | ||
195 | + <script src="static/login/js/templatemo_script.js"></script> | ||
196 | + <script type="text/javascript" src="static/js/jQuery.md5.js"></script> | ||
197 | + <script type="text/javascript" src="static/js/jquery.tips.js"></script> | ||
198 | + <script type="text/javascript" src="static/js/jquery.cookie.js"></script> | ||
199 | + | ||
200 | + <!-- 软键盘控件start --> | ||
201 | + <script type="text/javascript" | ||
202 | + src="static/login/keypad/js/form/keypad.js"></script> | ||
203 | + <script type="text/javascript" | ||
204 | + src="static/login/keypad/js/framework.js"></script> | ||
205 | +</body> | ||
206 | +</html> | ||
0 | \ No newline at end of file | 207 | \ No newline at end of file |
WebRoot/static/images/en_logo.png
0 → 100644
4.49 KB
WebRoot/static/images/en_title.png
0 → 100644
12.7 KB
WebRoot/static/js/en_control-604.js
0 → 100644
1 | +var questionNUm = 0; | ||
2 | +/*数字转汉字数字*/ | ||
3 | +var chnNumChar = [ "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" ]; | ||
4 | +var chnUnitSection = [ "", "万", "亿", "万亿", "亿亿" ]; | ||
5 | +var chnUnitChar = [ "", "十", "百", "千" ]; | ||
6 | +/* 快速创建答案列表 */ | ||
7 | +var score = 0; | ||
8 | +var total_score = 0; | ||
9 | +var answerLen = 0; | ||
10 | + | ||
11 | + | ||
12 | +$(function() { | ||
13 | + | ||
14 | + | ||
15 | + function creat(str_ans, a_num, fraction) { | ||
16 | + // $(".section").remove(); | ||
17 | + answer_index_b = $(".section").length + 1; | ||
18 | + /* | ||
19 | + * $(".content").append('<div class="section section-1 single" | ||
20 | + * data-fraction="'+fraction+'" data-score=""> <div class="title"> <h3><span | ||
21 | + * class="que_num">一、</span><span class="que_name">单选</span></h3> | ||
22 | + * <input type="button" class="btn btn-danger pull-right remove" | ||
23 | + * name="remove" value="删除" /> </div> <div class="question_list"></div></div>') | ||
24 | + */ | ||
25 | + var str = str_ans.split(''); | ||
26 | + console.log(str); | ||
27 | + for (i = 0; i < str.length; i++) { | ||
28 | + if (str[i] == " ") { | ||
29 | + str.splice(i, 1); | ||
30 | + i = i - 1; | ||
31 | + } | ||
32 | + } | ||
33 | + q_num = str.length; | ||
34 | + $(".content").append('<div class="section section-' + answer_index_b+ ' single" data-fraction="'+ fraction+ '" data-score="' | ||
35 | + + (q_num * fraction) + '" style="margin-top:80px;"><div class="title"><h3>Total score of question number ' + answer_index_b+ '(single choice) :' | ||
36 | + + q_num + ' X ' + fraction + ' = ' + (q_num * fraction) | ||
37 | + + ' 分<!--<span>请在试题选项上点击,亮色为该试题的正确答案 </span> --></h3> </div><div class="question_list"></div></div>'); | ||
38 | + for (var i = 0; i < q_num; i++) { | ||
39 | + str_temp = str[i]; | ||
40 | + str_temp = str_temp.toUpperCase() | ||
41 | + code = str_temp.charCodeAt(); | ||
42 | + on_index = code - 65; | ||
43 | + questionNUm++; | ||
44 | + if (code < (65 + a_num)) { | ||
45 | + console.log(str_temp); | ||
46 | + $(".section-" + answer_index_b + " .question_list").append( | ||
47 | + '<div class="question question' + (questionNUm) | ||
48 | + + '"><span>' + (questionNUm) | ||
49 | + + '、</span><ul></ul></div>'); | ||
50 | + for (var j = 0; j < a_num; j++) { | ||
51 | + option = String.fromCharCode(0x41 + j); | ||
52 | + if (on_index == j) { | ||
53 | + console.log(on_index + "---" + j); | ||
54 | + $(".question" + (questionNUm) + ' ul').append( | ||
55 | + '<li class="btn btn-default on">' + option | ||
56 | + + '</li>'); | ||
57 | + } else | ||
58 | + $(".question" + (questionNUm) + ' ul').append( | ||
59 | + '<li class="btn btn-default">' + option | ||
60 | + + '</li>'); | ||
61 | + } | ||
62 | + } else { | ||
63 | + alert("Wrong answer of Question " + (i + 1) + ":" + String.fromCharCode(code) | ||
64 | + + ", exceed option number"); | ||
65 | + // return; | ||
66 | + } | ||
67 | + } | ||
68 | + $(".section-" + answer_index_b).attr("data-score", | ||
69 | + q_num * fraction); | ||
70 | + total_score += q_num * fraction; | ||
71 | + $("#score_all").text(total_score); | ||
72 | + } | ||
73 | + | ||
74 | + /*************************************************************************** | ||
75 | + * 1、单选题 2、完形填空 3、阅读理解 4、判断题 5、多选题 | ||
76 | + **************************************************************************/ | ||
77 | + | ||
78 | + function addQuestion(type, a_num, index_s_2, index_e_2, fraction2) { | ||
79 | + console.log(type); | ||
80 | + answer_index_b = $(".section").length + 1; | ||
81 | + var question_num = SectionToChinese($(".section").length + 1); | ||
82 | + switch (type) { | ||
83 | + case 1: // 单选题 | ||
84 | + // alert(typeof(index_s_2)); | ||
85 | + $(".content") | ||
86 | + .append( | ||
87 | + '<div class="section section-' | ||
88 | + + answer_index_b | ||
89 | + + ' single" data-fraction="' | ||
90 | + + fraction2 | ||
91 | + + '" data-score=""> <div class="title"> <h3><span class="que_num">' | ||
92 | + + question_num | ||
93 | + + '、</span>' | ||
94 | + + '<span class="que_name">单选</span></h3> <input type="button" class="btn btn-danger pull-right remove" name="remove" value="删除" /> </div> <div class="question_list"></div></div>'); | ||
95 | + for (i = index_s_2; i <= index_e_2; i++) { | ||
96 | + $(".section-" + answer_index_b + " .question_list").append( | ||
97 | + '<div class="question question' + i + '"><span>' + i | ||
98 | + + '、</span><ul></ul></div>'); | ||
99 | + for (var j = 0; j < a_num; j++) { | ||
100 | + option = String.fromCharCode(0x41 + j); | ||
101 | + $(".section-" + answer_index_b + " .question" + i + ' ul') | ||
102 | + .append( | ||
103 | + '<li class="btn btn-default">' + option | ||
104 | + + '</li>'); | ||
105 | + } | ||
106 | + } | ||
107 | + break; | ||
108 | + case 2: // 完形填空 | ||
109 | + $(".content") | ||
110 | + .append( | ||
111 | + '<div class="section section-' | ||
112 | + + answer_index_b | ||
113 | + + ' single" data-fraction="' | ||
114 | + + fraction2 | ||
115 | + + '" data-score=""> <div class="title"> <h3><span class="que_num">' | ||
116 | + + question_num | ||
117 | + + '、</span><span class="que_name">完形填空</span></h3> <input type="button" class="btn btn-danger pull-right remove" name="remove" value="删除" /> </div> <div class="question_list"></div></div>'); | ||
118 | + for (var i = index_s_2; i <= index_e_2; i++) { | ||
119 | + $(".section-" + answer_index_b + " .question_list").append( | ||
120 | + '<div class="question question' + i + '"><span>' + i | ||
121 | + + '、</span><ul></ul></div>'); | ||
122 | + for (var j = 0; j < a_num; j++) { | ||
123 | + option = String.fromCharCode(0x41 + j); | ||
124 | + $(".section-" + answer_index_b + " .question" + i + ' ul') | ||
125 | + .append( | ||
126 | + '<li class="btn btn-default">' + option | ||
127 | + + '</li>'); | ||
128 | + } | ||
129 | + } | ||
130 | + break; | ||
131 | + case 3: // 阅读理解 | ||
132 | + $(".content") | ||
133 | + .append( | ||
134 | + '<div class="section section-' | ||
135 | + + answer_index_b | ||
136 | + + ' single" data-fraction="' | ||
137 | + + fraction2 | ||
138 | + + '" data-score=""> <div class="title"> <h3><span class="que_num">' | ||
139 | + + question_num | ||
140 | + + '、</span><span class="que_name">阅读理解</span></h3> <input type="button" class="btn btn-danger pull-right remove" name="remove" value="删除" /> </div> <div class="question_list"></div></div>'); | ||
141 | + for (var i = index_s_2; i <= index_e_2; i++) { | ||
142 | + $(".section-" + answer_index_b + " .question_list").append( | ||
143 | + '<div class="question question' + i + '"><span>' + i | ||
144 | + + '、</span><ul></ul></div>'); | ||
145 | + for (var j = 0; j < a_num; j++) { | ||
146 | + option = String.fromCharCode(0x41 + j); | ||
147 | + $(".section-" + answer_index_b + " .question" + i + ' ul') | ||
148 | + .append( | ||
149 | + '<li class="btn btn-default">' + option | ||
150 | + + '</li>'); | ||
151 | + } | ||
152 | + } | ||
153 | + break; | ||
154 | + case 4: // 判断题 | ||
155 | + $(".content") | ||
156 | + .append( | ||
157 | + '<div class="section section-' | ||
158 | + + answer_index_b | ||
159 | + + ' single" data-fraction="' | ||
160 | + + fraction2 | ||
161 | + + '" data-score=""> <div class="title"> <h3><span class="que_num">' | ||
162 | + + question_num | ||
163 | + + '、</span><span class="que_name">判断题</span></h3> <input type="button" class="btn btn-danger pull-right remove" name="remove" value="删除" /> </div> <div class="question_list"></div></div>'); | ||
164 | + for (var i = index_s_2; i <= index_e_2; i++) { | ||
165 | + $(".section-" + answer_index_b + " .question_list").append( | ||
166 | + '<div class="question question' + i + '"><span>' + i | ||
167 | + + '、</span><ul></ul></div>'); | ||
168 | + for (var j = 0; j < a_num; j++) { | ||
169 | + if (j % 2 == 0) | ||
170 | + option = "√"; | ||
171 | + else | ||
172 | + option = "×"; | ||
173 | + $(".section-" + answer_index_b + " .question" + i + ' ul') | ||
174 | + .append( | ||
175 | + '<li class="btn btn-default">' + option | ||
176 | + + '</li>'); | ||
177 | + } | ||
178 | + } | ||
179 | + break; | ||
180 | + /* | ||
181 | + * case 5: //多选题 $(".content").append('<div class="section | ||
182 | + * section-'+answer_index_b+' check" data-fraction="'+fraction2+'" | ||
183 | + * data-score=""> <div class="title"> <h3><span | ||
184 | + * class="que_num">'+question_num+'、</span><span class="que_name">多选题</span></h3> | ||
185 | + * <input type="button" class="btn btn-danger pull-right remove" | ||
186 | + * name="remove" value="删除" /> </div> <div class="question_list"></div></div>'); | ||
187 | + * for(var i=index_s_2;i<=index_e_2;i++){ | ||
188 | + * $(".section-"+answer_index_b+" .question_list").append('<div | ||
189 | + * class="question question'+i+'"><span>'+i+'、</span><ul></ul></div>'); | ||
190 | + * for(var j=0;j<a_num;j++){ option=String.fromCharCode(0x41+j); | ||
191 | + * $(".section-"+answer_index_b+" .question"+i+' ul').append('<li class="btn btn-default">'+option+'</li>'); } } | ||
192 | + */ | ||
193 | + case 5: // 多选题 | ||
194 | + // $(".content").html(""); | ||
195 | + $(".content") | ||
196 | + .append( | ||
197 | + '<div class="section section-' | ||
198 | + + answer_index_b | ||
199 | + + ' check" data-fraction="' | ||
200 | + + fraction2 | ||
201 | + + '" data-score="' | ||
202 | + + ((index_e_2 - index_s_2 + 1) * fraction2) | ||
203 | + + '"> <div class="title"><h3>Total score of question number ' | ||
204 | + + answer_index_b | ||
205 | + + '(multiple choice): ' | ||
206 | + + (index_e_2 - index_s_2 + 1) | ||
207 | + + ' X ' | ||
208 | + + fraction2 | ||
209 | + + ' = ' | ||
210 | + + ((index_e_2 - index_s_2 + 1) * fraction2) | ||
211 | + + ' 分<!--<span>请在试题选项上点击,亮色为该试题的正确答案 </span>--></h3> </div> <div class="question_list"></div></div>'); | ||
212 | + for (var i = index_s_2; i <= index_e_2; i++) { | ||
213 | + questionNUm++; | ||
214 | + $(".section-" + answer_index_b + " .question_list").append( | ||
215 | + '<div class="question question' + questionNUm | ||
216 | + + '"><span>' + questionNUm | ||
217 | + + '、</span><ul></ul></div>'); | ||
218 | + for (var j = 0; j < a_num; j++) { | ||
219 | + option = String.fromCharCode(0x41 + j); | ||
220 | + $( | ||
221 | + ".section-" + answer_index_b + " .question" | ||
222 | + + questionNUm + ' ul').append( | ||
223 | + '<li class="btn btn-default">' + option + '</li>'); | ||
224 | + } | ||
225 | + } | ||
226 | + total_score += ((index_e_2 - index_s_2 + 1) * fraction2); | ||
227 | + $("#score_all").text(total_score); | ||
228 | + break; | ||
229 | + } | ||
230 | + // $(".section-"+answer_index_b).attr("data-score",$(".section-"+answer_index_b).find(".question").length*fraction2); | ||
231 | + $(".section0").attr("data-score", | ||
232 | + $(".section0").find(".question").length * fraction2); | ||
233 | + } | ||
234 | + | ||
235 | + $(document).on('click', '.remove', function() { // 删除按钮 | ||
236 | + $(this).parent().parent(".section").remove(); | ||
237 | + }) | ||
238 | + | ||
239 | + $("#fast_submit").click(function() { // 点击确定,创建答案列表 | ||
240 | + // $("#addQuestion").attr("disabled","disabled"); | ||
241 | + var answer = $("#answer").val(); | ||
242 | + var num_ans = $("#num_ans").val(); | ||
243 | + var fraction = $("#fraction").val(); | ||
244 | + if (answer == '') { | ||
245 | + alert("Please input answer of question"); | ||
246 | + return; | ||
247 | + } else if (fraction == '') { | ||
248 | + alert("Pleae input score of question"); | ||
249 | + return; | ||
250 | + } | ||
251 | + var frac = parseFloat(fraction); | ||
252 | + if (frac > 0) { | ||
253 | + // score += parseInt(fraction)*answer.split(",").length; | ||
254 | + creat(answer, num_ans, fraction); | ||
255 | + $('.fast').modal('hide'); | ||
256 | + } else { | ||
257 | + alert("Please input correct score"); | ||
258 | + return; | ||
259 | + } | ||
260 | + }) | ||
261 | + | ||
262 | + /* 添加试题的确定按钮 */ | ||
263 | + $("#addQuestion_submit").click(function() { | ||
264 | + // $("#fast").attr("disabled","disabled"); | ||
265 | + var type_2 = 5;// parseInt($("#type").val()) | ||
266 | + var index_s_2 = 1;// parseInt($("#index_s_2").val()) | ||
267 | + var index_e_2 = parseInt($("#index_s_2").val()); | ||
268 | + // var answer_2=$("#answer_2").val(); | ||
269 | + var num_ans_2 = $("#num_ans_2").val(); | ||
270 | + var fraction2 = parseFloat($("#fraction2").val()); | ||
271 | + if (isNaN(index_s_2)) { | ||
272 | + alert("Please input question start number"); | ||
273 | + return; | ||
274 | + } else if (isNaN(index_e_2)) { | ||
275 | + alert("Please input number of questions");// alert("请输入题目结束序号"); | ||
276 | + return; | ||
277 | + } else if (isNaN(fraction2)) { | ||
278 | + alert("Please input score of question"); | ||
279 | + return; | ||
280 | + } | ||
281 | + var iindex_e_2 = parseInt(index_e_2); | ||
282 | + if (iindex_e_2 < 1 || iindex_e_2 > 100) { | ||
283 | + alert("Illigal number of question"); | ||
284 | + return; | ||
285 | + } | ||
286 | + // console.log(typeof(type_2)); | ||
287 | + addQuestion(type_2, num_ans_2, index_s_2, index_e_2, fraction2); | ||
288 | + $('.addQuestion').modal('hide'); | ||
289 | + }) | ||
290 | + $("#type").change(function() { | ||
291 | + if ($("#type").val() == 4) { | ||
292 | + $("#num_ans_2").val(2); | ||
293 | + $("#num_ans_2").attr("disabled", "disabled"); | ||
294 | + } else { | ||
295 | + $("#num_ans_2").removeAttr("disabled"); | ||
296 | + $("#num_ans_2").val(4); | ||
297 | + | ||
298 | + } | ||
299 | + }) | ||
300 | + /* 更改考试时长 */ | ||
301 | + $("#time_submit").click(function() { | ||
302 | + var test_time = $("#enter_time").val(); | ||
303 | + if (test_time == '') { | ||
304 | + alert("Please input exam time"); | ||
305 | + return; | ||
306 | + } | ||
307 | + $("#time").html(test_time); | ||
308 | + $('.test_time').modal('hide'); | ||
309 | + }) | ||
310 | + /* 更改单选答案 */ | ||
311 | + $(document).on('click', '.single li', function() { | ||
312 | + $(this).siblings().removeClass("on"); | ||
313 | + $(this).addClass("on"); | ||
314 | + }) | ||
315 | + /* 更改多选答案 */ | ||
316 | + $(document).on('click', '.check li', function() { | ||
317 | + // $(this).siblings().removeClass("on"); | ||
318 | + if ($(this).hasClass('on')) { | ||
319 | + $(this).removeClass("on"); | ||
320 | + } else { | ||
321 | + $(this).addClass("on"); | ||
322 | + } | ||
323 | + }) | ||
324 | + /* 提交保存数据 */ | ||
325 | + $("#save").click(function() { | ||
326 | + var url = URL; | ||
327 | + | ||
328 | + var data = { | ||
329 | + title : $(".header_box h1").text(), | ||
330 | + exam_time : parseInt($("#time").text()), | ||
331 | + paper_type : testData.paper_type, | ||
332 | + subject_id : testData.subject_id, | ||
333 | + grade_id : testData.grade_id, | ||
334 | + user_id : testData.user_id, | ||
335 | + school_id : testData.school_id, | ||
336 | + score : total_score, | ||
337 | + questions : [] | ||
338 | + } | ||
339 | + | ||
340 | + if ($(".section").length > 0) { | ||
341 | + var rank = 0 | ||
342 | + for (i = 0; i < $(".section").length; i++) { | ||
343 | + // rank++; | ||
344 | + data.questions[i] = { | ||
345 | + chapter_id : "0", | ||
346 | + problem_type_id : "0", | ||
347 | + knowledge_id : "0", | ||
348 | + // content: | ||
349 | + // $(".section").eq(i).find(".que_name").text(), | ||
350 | + option_num : "", | ||
351 | + option_content : "", | ||
352 | + answer : "", | ||
353 | + difficulty : "", | ||
354 | + analysis : "", | ||
355 | + question_from : "", | ||
356 | + score : parseFloat($(".section").eq(i) | ||
357 | + .attr("data-score")), | ||
358 | + part_score : "", | ||
359 | + remark : "", | ||
360 | + rank : rank, | ||
361 | + no_name : $(".section").eq(i).find( | ||
362 | + ".que_num").text(), | ||
363 | + questions : [] | ||
364 | + } | ||
365 | + for (j = 0; j < $(".section").eq(i).find( | ||
366 | + ".question_list").children(".question").length; j++) { | ||
367 | + rank++; | ||
368 | + var on_num = $(".section").eq(i).find( | ||
369 | + ".question").eq(j).find(".on").length; | ||
370 | + var answer = ""; | ||
371 | + for (k = 0; k < on_num; k++) { | ||
372 | + answer += $(".section").eq(i).find( | ||
373 | + ".question").eq(j).find(".on") | ||
374 | + .eq(k).text(); | ||
375 | + // console.log(answer); | ||
376 | + } | ||
377 | + if (answer == '') { | ||
378 | + alert("Some question answers not edited yet。"); | ||
379 | + return; | ||
380 | + } | ||
381 | + data.questions[i].questions[j] = { | ||
382 | + chapter_id : "0", | ||
383 | + problem_type_id : "0", | ||
384 | + knowledge_id : "0", | ||
385 | + content : "", | ||
386 | + option_num : $(".section").eq(i).find( | ||
387 | + ".question").eq(j).find("li").length, | ||
388 | + option_content : "", | ||
389 | + answer : answer, | ||
390 | + difficulty : "0", | ||
391 | + analysis : "", | ||
392 | + question_from : "1", | ||
393 | + score : parseFloat($(".section").eq(i) | ||
394 | + .attr("data-fraction")), | ||
395 | + part_score : "0", | ||
396 | + remark : "", | ||
397 | + rank : rank, | ||
398 | + no_name : rank, | ||
399 | + } | ||
400 | + } | ||
401 | + } | ||
402 | + } | ||
403 | + | ||
404 | + if (data.questions.length > 0) { | ||
405 | + data = JSON.stringify(data); | ||
406 | + dataJson = { | ||
407 | + "json" : data | ||
408 | + }; | ||
409 | + console.log(data); | ||
410 | + ajax_submit(url, dataJson); | ||
411 | + } else | ||
412 | + alert("Please add questions"); | ||
413 | + }); | ||
414 | + | ||
415 | + /* ajax封装函数 */ | ||
416 | + function ajax_submit(url, data) { | ||
417 | + $(".loading").css("display", "block"); | ||
418 | + console.log(data); | ||
419 | + $.ajax({ | ||
420 | + url : url, | ||
421 | + type : "POST", | ||
422 | + data : data, | ||
423 | + dataType : "json", | ||
424 | + contentType : "application/x-www-form-urlencoded; charset=utf-8", | ||
425 | + success : function(data) { | ||
426 | + $(".loading").css("display", "none"); | ||
427 | + if(testData.paper_type == '1'){ | ||
428 | + window.location.href = JUMP_URL + "?a=1&defaulturl=../paper/list2.do"; | ||
429 | + }else{ | ||
430 | + window.location.href = JUMP_URL + "?a=1&defaulturl=../paper/list4.do?school_id=" + testData.school_id ; | ||
431 | + } | ||
432 | + } | ||
433 | + }) | ||
434 | + } | ||
435 | + function fastSort(array, head, tail) { | ||
436 | + // 考虑到给每个分区操作的时候都是在原有的数组中进行操作的,所以这里head,tail来确定分片的位置 | ||
437 | + /* 生成随机项 */ | ||
438 | + var randomnum = parseInt((head + tail) / 2); | ||
439 | + var random = array[randomnum]; | ||
440 | + /* 将小于random的项放置在其左边 策略就是通过一个临时的数组来储存分好区的结果,再到原数组中替换 */ | ||
441 | + var arrayTemp = []; | ||
442 | + var unshiftHead = 0; | ||
443 | + for (var i = head; i <= tail; i++) { | ||
444 | + if (parseInt(array[i].rank) < parseInt(random.rank)) { | ||
445 | + arrayTemp.unshift(array[i]); | ||
446 | + unshiftHead++; | ||
447 | + } else if (parseInt(array[i].rank) > parseInt(random.rank)) { | ||
448 | + arrayTemp.push(array[i]); | ||
449 | + } | ||
450 | + /* 当它等于的时候放哪,这里我想选择放到队列的前面,也就是从unshift后的第一个位置放置 */ | ||
451 | + if (parseInt(array[i].rank) === parseInt(random.rank)) { | ||
452 | + arrayTemp.splice(unshiftHead, 0, array[i]); | ||
453 | + } | ||
454 | + } | ||
455 | + /* 将对应项覆盖原来的记录 */ | ||
456 | + for (var j = head, u = 0; j <= tail; j++, u++) { | ||
457 | + array.splice(j, 1, arrayTemp[u]); | ||
458 | + } | ||
459 | + /* 寻找中间项所在的index */ | ||
460 | + var nowIndex = array.indexOf(random); | ||
461 | + | ||
462 | + /* 设置出口,当要放进去的片段只有2项的时候就可以收工了 */ | ||
463 | + if (arrayTemp.length <= 2) { | ||
464 | + return; | ||
465 | + } | ||
466 | + /* 递归,同时应用其左右两个区域 */ | ||
467 | + fastSort(array, head, nowIndex); | ||
468 | + fastSort(array, nowIndex + 1, tail); | ||
469 | + } | ||
470 | + function creatHtml(data) { | ||
471 | + console.log(data); | ||
472 | + $(".header_box h1").html(data.title); | ||
473 | + $("#time").html(data.exam_time); | ||
474 | + if(data.score != null && data.score > 0 && data.score != ''){ | ||
475 | + $("#score_all").html(data.score); | ||
476 | + } | ||
477 | + | ||
478 | + if (data.questions.length > 0) { | ||
479 | + $(".time").removeAttr("data-target"); | ||
480 | + $(".remove").remove(); | ||
481 | + $(".btn_box").remove(); | ||
482 | + } | ||
483 | + | ||
484 | + for (var i = 0; i < data.questions.length; i++) { | ||
485 | + if (data.questions[i].questions) { | ||
486 | + $(".content") | ||
487 | + .append( | ||
488 | + '<div class="section section-' | ||
489 | + + i | ||
490 | + + '" data-fraction="' | ||
491 | + + data.questions[i].score | ||
492 | + + '" style="margin-top:80px;"> <h3><span class="que_num">' | ||
493 | + + 'Total score of question number ' | ||
494 | + + (i + 1) | ||
495 | + + ':' | ||
496 | + + data.questions[i].questions.length | ||
497 | + + " X " | ||
498 | + + (parseFloat(data.questions[i].sug_score) / data.questions[i].questions.length) | ||
499 | + + " = " | ||
500 | + + data.questions[i].sug_score | ||
501 | + + '</span>' | ||
502 | + + '<span class="que_name">' | ||
503 | + + data.questions[i].content | ||
504 | + + '</span></h3><!-- <input type="button" class="btn btn-danger pull-right remove" name="remove" value="删除" /> --> <div class="question_list"></div></div>'); | ||
505 | + } else { | ||
506 | + if (i == 0) { | ||
507 | + $(".content") | ||
508 | + .append( | ||
509 | + '<div class="section section0"> <div class="question_list" style="margin-top:80px"></div></div>'); | ||
510 | + } | ||
511 | + $(".section0").find(".question_list").append( | ||
512 | + '<div class="question question' + (i + 1) + '"><span>' | ||
513 | + + (++questionNUm) + '、</span><ul></ul></div>'); | ||
514 | + for (var k = 0; k < parseInt(data.questions[i].option_num); k++) { | ||
515 | + str_temp = data.questions[i].answer; | ||
516 | + $(".section0").find(".question" + (i + 1) + ' ul').append( | ||
517 | + '<li class="btn btn-default">' | ||
518 | + + String.fromCharCode(0x41 + k) + '</li>'); | ||
519 | + for (var l = 0; l < str_temp.length; l++) { | ||
520 | + str_temp_arry = str_temp.split(''); | ||
521 | + code = str_temp_arry[l].charCodeAt(); | ||
522 | + on_index = code - 65; | ||
523 | + if (on_index == k) { | ||
524 | + $(".section0").find( | ||
525 | + ".question" + (i + 1) + ' ul li').eq( | ||
526 | + on_index).attr("class", | ||
527 | + "btn btn-default on"); | ||
528 | + } | ||
529 | + } | ||
530 | + } | ||
531 | + } | ||
532 | + | ||
533 | + if (data.questions[i].questions) { | ||
534 | + for (var j = 0; j < data.questions[i].questions.length; j++) { | ||
535 | + $(".section-" + i).find(".question_list").append( | ||
536 | + '<div class="question question' + (j + 1) | ||
537 | + + '"><span>' + (++questionNUm) | ||
538 | + + '、</span><ul></ul></div>'); | ||
539 | + if ($(".section-" + i).find(".que_name").text() == "判断题") { | ||
540 | + for (var k = 0; k < parseInt(data.questions[i].questions[j].option_num); k++) { | ||
541 | + str_temp = data.questions[i].questions[j].answer; | ||
542 | + if (k % 2 == 0) { | ||
543 | + $(".section-" + i).find( | ||
544 | + ".question" + (j + 1) + ' ul').append( | ||
545 | + '<li class="btn btn-default">√</li>'); | ||
546 | + } else if (k % 2 == 1) { | ||
547 | + $(".section-" + i).find( | ||
548 | + ".question" + (j + 1) + ' ul').append( | ||
549 | + '<li class="btn btn-default">×</li>'); | ||
550 | + } | ||
551 | + | ||
552 | + if (str_temp == "√") | ||
553 | + $(".section-" + i).find( | ||
554 | + ".question" + (j + 1) + ' ul li').eq(0) | ||
555 | + .attr("class", "btn btn-default on"); | ||
556 | + else | ||
557 | + $(".section-" + i).find( | ||
558 | + ".question" + (j + 1) + ' ul li').eq(1) | ||
559 | + .attr("class", "btn btn-default on"); | ||
560 | + } | ||
561 | + } else { | ||
562 | + for (var k = 0; k < parseInt(data.questions[i].questions[j].option_num); k++) { | ||
563 | + str_temp = data.questions[i].questions[j].answer; | ||
564 | + $(".section-" + i).find( | ||
565 | + ".question" + (j + 1) + ' ul').append( | ||
566 | + '<li class="btn btn-default">' | ||
567 | + + String.fromCharCode(0x41 + k) | ||
568 | + + '</li>'); | ||
569 | + for (var l = 0; l < str_temp.length; l++) { | ||
570 | + str_temp_arry = str_temp.split(''); | ||
571 | + code = str_temp_arry[l].charCodeAt(); | ||
572 | + on_index = code - 65; | ||
573 | + if (on_index == k) { | ||
574 | + $(".section-" + i).find( | ||
575 | + ".question" + (j + 1) + ' ul li') | ||
576 | + .eq(on_index).attr("class", | ||
577 | + "btn btn-default on"); | ||
578 | + } | ||
579 | + } | ||
580 | + } | ||
581 | + } | ||
582 | + } | ||
583 | + } | ||
584 | + } | ||
585 | + } | ||
586 | + | ||
587 | + | ||
588 | + /*快速建题中,每输入五个答案就加一个空格*/ | ||
589 | + $("#answer").on("input propertychange", function(event) { | ||
590 | + var answerStr = ""; | ||
591 | + answerStr = $("#answer").val(); | ||
592 | + var result = ""; | ||
593 | + if (answerStr.length > 5) { | ||
594 | + answerStr = answerStr.replace(new RegExp(" ", "gm"), ""); | ||
595 | + for (var i = 0; i < answerStr.length; i++) { | ||
596 | + result += answerStr[i]; | ||
597 | + if (i % 5 == 4 && i != answerStr.length - 1) { | ||
598 | + result += " "; | ||
599 | + } | ||
600 | + } | ||
601 | + } else { | ||
602 | + result = answerStr; | ||
603 | + } | ||
604 | + $("#answer").val(result); | ||
605 | + if (answerStr.length > 0) { | ||
606 | + $(".tips").text("Total number of questions" + answerStr.length + " "); | ||
607 | + } else { | ||
608 | + $(".tips").text(""); | ||
609 | + } | ||
610 | + }) | ||
611 | + | ||
612 | + | ||
613 | + | ||
614 | + function SectionToChinese(section) { | ||
615 | + var strIns = '', chnStr = ''; | ||
616 | + var unitPos = 0; | ||
617 | + var zero = true; | ||
618 | + while (section > 0) { | ||
619 | + var v = section % 10; | ||
620 | + if (v === 0) { | ||
621 | + if (!zero) { | ||
622 | + zero = true; | ||
623 | + chnStr = chnNumChar[v] + chnStr; | ||
624 | + } | ||
625 | + } else { | ||
626 | + zero = false; | ||
627 | + strIns = chnNumChar[v]; | ||
628 | + strIns += chnUnitChar[unitPos]; | ||
629 | + chnStr = strIns + chnStr; | ||
630 | + } | ||
631 | + unitPos++; | ||
632 | + section = Math.floor(section / 10); | ||
633 | + } | ||
634 | + return chnStr; | ||
635 | + } | ||
636 | + | ||
637 | + | ||
638 | + if (template != null && template.length > 0) { | ||
639 | + | ||
640 | + $("#addQuestion").attr("disabled", "disabled"); | ||
641 | + $("#fast").attr("disabled", "disabled"); | ||
642 | + for (var i = 0; i < template.length; i++) { | ||
643 | + if (template[i].type == 1) { | ||
644 | + var answer = ""; | ||
645 | + for (var j = 0; j < template[i].questionNum; j++) { | ||
646 | + answer += "1"; | ||
647 | + } | ||
648 | + creat(answer, template[i].optionNum, template[i].score); | ||
649 | + } | ||
650 | + if (template[i].type == 2) { | ||
651 | + addQuestion(5, template[i].optionNum, 1, | ||
652 | + template[i].questionNum, template[i].score); | ||
653 | + } | ||
654 | + } | ||
655 | + if(testData != null){ | ||
656 | + $(".header_box h1").html(testData.title); | ||
657 | + $("#time").html(testData.exam_time); | ||
658 | + if(testData.score != null && testData.score > 0 && testData.score != ''){ | ||
659 | + $("#score_all").html(testData.score); | ||
660 | + } | ||
661 | + } | ||
662 | + | ||
663 | + }else if (testData != null && testData.questions != null | ||
664 | + && testData.questions.length > 0) { | ||
665 | + fastSort(testData.questions, 0, testData.questions.length - 1); | ||
666 | + for (var i = 0; i < testData.questions.length; i++) { | ||
667 | + | ||
668 | + if (testData.questions[0].questions | ||
669 | + && testData.questions[0].questions.length > 1) { | ||
670 | + fastSort(testData.questions[i].questions, 0, | ||
671 | + testData.questions[i].questions.length - 1); | ||
672 | + } | ||
673 | + } | ||
674 | + creatHtml(testData); | ||
675 | + }else{ | ||
676 | + if(testData != null){ | ||
677 | + $(".header_box h1").html(testData.title); | ||
678 | + $("#time").html(testData.exam_time); | ||
679 | + if(testData.score != null && testData.score > 0 && testData.score != ''){ | ||
680 | + $("#score_all").html(testData.score); | ||
681 | + } | ||
682 | + } | ||
683 | + } | ||
684 | +}) |
WebRoot/static/js/en_control1.js
0 → 100644
1 | + | ||
2 | + var data0=[],data1=[],data2=[],data3=[]; | ||
3 | + var startDate,endDate; | ||
4 | + var studentid; | ||
5 | + var data_temp,_index=0; | ||
6 | + function getQueryString(name) { | ||
7 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); | ||
8 | + var r = window.location.search.substr(1).match(reg); | ||
9 | + if (r != null) return unescape(r[2]); return null; | ||
10 | + } | ||
11 | + function getData(startDate,endDate){ | ||
12 | + var attend = "" ; | ||
13 | + if(startDate != null && endDate != null){ | ||
14 | + attend = "&start_Date="+startDate+"&end_Date="+endDate; | ||
15 | + } | ||
16 | + $.ajax({ | ||
17 | + url:URL+ attend, | ||
18 | + type:"get", | ||
19 | + dataType:"json", | ||
20 | + success:function(data){ | ||
21 | + data_temp=data; | ||
22 | + console.log(data); | ||
23 | + var _html=''; | ||
24 | + for(var i=0;i<data.data.studentList.length;i++){ | ||
25 | + _html+='<li style="cursor:pointer"><p>'+data.data.studentList[i].NAME+'</p></li>'; | ||
26 | + if(studentid==data.data.studentList[i].ID) | ||
27 | + _index=i; | ||
28 | + } | ||
29 | + $(".content_l ul").html(_html); | ||
30 | + console.log(_index); | ||
31 | + dataMethod(_index,data_temp); | ||
32 | + $(".content_l li").eq(_index).siblings().removeClass("on"); | ||
33 | + $(".content_l li").eq(_index).addClass("on"); | ||
34 | + window.top.loading.remove(); | ||
35 | + } | ||
36 | + | ||
37 | + }); | ||
38 | + | ||
39 | + } | ||
40 | + $( document ).ready(function() { | ||
41 | + //alert($("input[type=radio][checked]").val()); | ||
42 | + | ||
43 | + studentid=getQueryString("studentid"); | ||
44 | + | ||
45 | + startDate = $("#starDate").val(); | ||
46 | + endDate = $("#endDate").val(); | ||
47 | + getData(startDate,endDate); | ||
48 | + | ||
49 | + //$('#myStathalf').circliful(); | ||
50 | + //$('#myStathalf1').circliful(); | ||
51 | + $(document).on("click",".content_l li",function(){ | ||
52 | + $(this).siblings().removeClass("on"); | ||
53 | + $(this).addClass("on"); | ||
54 | + _index=$(this).index(); | ||
55 | + dataMethod(_index,data_temp); | ||
56 | + studentid = 0; | ||
57 | + }) | ||
58 | + $("input[type=radio]").change(function(){ | ||
59 | + //alert($("input[type='radio']:checked").val()); | ||
60 | + dataMethod(_index,data_temp); | ||
61 | + }) | ||
62 | + | ||
63 | + $("#search").click(function(){ | ||
64 | +// var date_string=$("#test6").val(); | ||
65 | +// var date_arry=date_string.split(' - '); | ||
66 | +// startDate=date_arry[0]; | ||
67 | +// endDate=date_arry[1]; | ||
68 | + window.top.loading.show(); | ||
69 | + startDate = $("#starDate").val(); | ||
70 | + endDate = $("#endDate").val(); | ||
71 | + getData(startDate,endDate); | ||
72 | + | ||
73 | + }) | ||
74 | + | ||
75 | + $(".prev").click(function(){ | ||
76 | + _index-=1; | ||
77 | + if(_index<0){ | ||
78 | + _index=data_temp.data.studentList.length-1; | ||
79 | + } | ||
80 | + $(".content_l li").eq(_index).siblings().removeClass("on"); | ||
81 | + $(".content_l li").eq(_index).addClass("on"); | ||
82 | + dataMethod(_index,data_temp); | ||
83 | + }) | ||
84 | + $(".next").click(function(){ | ||
85 | + _index+=1; | ||
86 | + if(_index>(data_temp.data.studentList.length-1)){ | ||
87 | + _index=0; | ||
88 | + } | ||
89 | + $(".content_l li").eq(_index).siblings().removeClass("on"); | ||
90 | + $(".content_l li").eq(_index).addClass("on"); | ||
91 | + dataMethod(_index,data_temp); | ||
92 | + }) | ||
93 | + }); | ||
94 | + | ||
95 | + | ||
96 | + function dataMethod(index,data){ | ||
97 | + console.log(data); | ||
98 | + //data0=[];data1=[];data2=[];data3=[]; | ||
99 | + var GETSCORE = parseFloat(data.data.studentList[index].GETSCORE); | ||
100 | + var TOTALSCORE = parseFloat(data.data.TOTAL_SCORE); | ||
101 | + var ratio=(GETSCORE/TOTALSCORE*100).toFixed(2); | ||
102 | + var class_avg= (parseFloat(data.data.AVG_SCORE)/ parseFloat(data.data.TOTAL_SCORE)*100).toFixed(2); | ||
103 | + var class_max=(parseFloat(data.data.MAX_SCORE)/ parseFloat(data.data.TOTAL_SCORE)*100).toFixed(2); | ||
104 | + | ||
105 | + var test_num=data.data.studentList[index].testList.length; | ||
106 | + var part_num=test_num; | ||
107 | + | ||
108 | + data0=[]; | ||
109 | + data1=[]; | ||
110 | + data2=[]; | ||
111 | + data3=[]; | ||
112 | + | ||
113 | + //console.log(data.data.studentList[index].testList[2].SCORE); | ||
114 | + if($("input[type='radio']:checked").val()==1){ | ||
115 | + for(var i=0;i<test_num;i++){ | ||
116 | + if(data.data.studentList[index].testList[i].TOTAL_SCORE>0){ | ||
117 | + data0[i]=data.data.studentList[index].testList[i].NAME + "\n" + data.data.studentList[index].testList[i].CREATE_DATE; | ||
118 | + data1[i]=(data.data.studentList[index].testList[i].AVG_SCORE/data.data.studentList[index].testList[i].TOTAL_SCORE*100).toFixed(2); | ||
119 | + data2[i]=(data.data.studentList[index].testList[i].SCORE/data.data.studentList[index].testList[i].TOTAL_SCORE*100).toFixed(2); | ||
120 | + data3[i]=(data.data.studentList[index].testList[i].MAX_SCORE/data.data.studentList[index].testList[i].TOTAL_SCORE*100).toFixed(2); | ||
121 | + }else{ | ||
122 | + data1[i]=0; | ||
123 | + data2[i]=0; | ||
124 | + data3[i]=0; | ||
125 | + } | ||
126 | + | ||
127 | + if(data.data.studentList[index].testList[i].SCORE=="0") | ||
128 | + part_num--; | ||
129 | + } | ||
130 | + }else if($("input[type='radio']:checked").val()==2){ | ||
131 | + for(var i=0;i<test_num;i++){ | ||
132 | + data0[i]=data.data.studentList[index].testList[i].NAME; | ||
133 | + data1[i]=data.data.studentList[index].testList[i].AVG_SCORE; | ||
134 | + data2[i]=data.data.studentList[index].testList[i].SCORE; | ||
135 | + data3[i]=data.data.studentList[index].testList[i].MAX_SCORE; | ||
136 | + if(data.data.studentList[index].testList[i].SCORE=="0") | ||
137 | + part_num--; | ||
138 | + } | ||
139 | + } | ||
140 | + | ||
141 | + console.log(data0); | ||
142 | + console.log(data1); | ||
143 | + console.log(data2); | ||
144 | + console.log(data2); | ||
145 | + var partake=(part_num/test_num*100).toFixed(2); | ||
146 | + | ||
147 | + | ||
148 | + $("#class_avg").html(class_avg); | ||
149 | + $("#class_max").html(class_max); | ||
150 | + $(".name h1").html(data.data.studentList[index].NAME); | ||
151 | + $(".circle .col-md-6").eq(1).html('<div id="myStathalf1" data-dimension="350" data-text="'+ratio+"%"+'" data-info="Student" data-width="10" data-fontsize="38" data-percent="'+ratio+'" data-fgcolor="#8ad254" data-bgcolor="#a9f9ff" data-type="half" data-fill="#50b5c9"></div>'); | ||
152 | + $(".circle .col-md-6").eq(0).html('<div id="myStathalf" data-dimension="350" data-text="'+part_num+'/'+test_num+'" data-info="Participation testing" data-width="10" data-fontsize="38" data-percent="'+partake+'" data-fgcolor="#8ad254" data-bgcolor="#a9f9ff" data-type="half" data-fill="#50b5c9"></div>'); | ||
153 | + $('#myStathalf1').circliful(); | ||
154 | + $('#myStathalf').circliful(); | ||
155 | + myChart.setOption({ | ||
156 | + tooltip:{ | ||
157 | + trigger: 'axis' | ||
158 | + }, | ||
159 | + xAxis: { | ||
160 | + type: 'category', | ||
161 | + data: data0 | ||
162 | + /*, | ||
163 | + axisLabel:{interval: 0}*/ | ||
164 | + }, | ||
165 | + yAxis: { | ||
166 | + type: 'value', | ||
167 | + splitArea: {show: true} | ||
168 | + }, | ||
169 | + series: [{ | ||
170 | + name:"Avg Score", | ||
171 | + data: data1, | ||
172 | + type: 'line', | ||
173 | + symbol: 'circle', | ||
174 | + symbolSize: 5, | ||
175 | + lineStyle: { | ||
176 | + normal: { | ||
177 | + color: '#93D150', | ||
178 | + width: 2, | ||
179 | + type: 'dashed' | ||
180 | + } | ||
181 | + }, | ||
182 | + itemStyle: { | ||
183 | + normal: { | ||
184 | + borderWidth: 2, | ||
185 | + borderColor: '#93D150', | ||
186 | + color: '#93D150' | ||
187 | + } | ||
188 | + } | ||
189 | + },{ | ||
190 | + name:"Highest", | ||
191 | + data: data3, | ||
192 | + type: 'line', | ||
193 | + symbol: 'circle', | ||
194 | + symbolSize: 5, | ||
195 | + lineStyle: { | ||
196 | + normal: { | ||
197 | + color: '#FFC004', | ||
198 | + width: 2, | ||
199 | + type: 'dashed', | ||
200 | + } | ||
201 | + }, | ||
202 | + itemStyle: { | ||
203 | + normal: { | ||
204 | + borderWidth: 2, | ||
205 | + borderColor: '#FFC004', | ||
206 | + color: '#FFC004' | ||
207 | + } | ||
208 | + } | ||
209 | + },{ | ||
210 | + name:"Personal", | ||
211 | + data: data2, | ||
212 | + type: 'line', | ||
213 | + symbol: 'circle', | ||
214 | + symbolSize: 10, | ||
215 | + lineStyle: { | ||
216 | + normal: { | ||
217 | + color: '#45a6f3', | ||
218 | + width: 4, | ||
219 | + type: 'solid' | ||
220 | + } | ||
221 | + }, | ||
222 | + itemStyle: { | ||
223 | + normal: { | ||
224 | + borderWidth: 3, | ||
225 | + borderColor: '#45a6f3', | ||
226 | + color: '#45a6f3', | ||
227 | + label : {show: true,color:'#000'} | ||
228 | + } | ||
229 | + } | ||
230 | + }] | ||
231 | + }); | ||
232 | + } | ||
233 | + | ||
234 | + | ||
235 | + var myChart = echarts.init(document.getElementById('main')); |
WebRoot/static/js/en_paper_view.js
0 → 100644
1 | +var url=""; | ||
2 | + var question_box=[]; | ||
3 | + function slide(obj){ //查看解析 | ||
4 | + obj.closest(".star_box").siblings(".resolve").slideToggle(function(){ | ||
5 | + if($(".resolve").css("display") == "none") | ||
6 | + obj.text("View Analysis"); | ||
7 | + else | ||
8 | + obj.text("Fold analysis"); | ||
9 | + }); | ||
10 | + } | ||
11 | + | ||
12 | +function getQueryString(name) { | ||
13 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); | ||
14 | + var r = window.location.search.substr(1).match(reg); | ||
15 | + if (r != null) return unescape(r[2]); return null; | ||
16 | + } | ||
17 | + var PAPER_ID=getQueryString("PAPER_ID"); | ||
18 | + var classId=getQueryString("classId"); | ||
19 | + var userid=getQueryString("userid"); | ||
20 | + | ||
21 | + var gradleId = getQueryString("gradleid"); | ||
22 | + | ||
23 | + var _html=""; | ||
24 | + var question_id_arry=""; | ||
25 | + $(document).ready(function(){ | ||
26 | + window.top.loading.remove(); | ||
27 | + var data=JSON.parse(sessionStorage.getItem("data")); | ||
28 | + console.log(data); | ||
29 | + $("#paper_title").html(data.title); | ||
30 | + $("#time").html(data.exam_time); | ||
31 | + if(data.questions.length>0){ | ||
32 | + for(var i=0;i<data.questions.length;i++){ | ||
33 | + question_id_arry+=data.questions[i].question_id+','; | ||
34 | + } | ||
35 | + getQuestionInfo(question_id_arry,data.questions); | ||
36 | + } | ||
37 | + | ||
38 | + }) | ||
39 | + function getQuestionInfo(id,knowledge_ids){ //获取试题详情 | ||
40 | + $.ajax({ | ||
41 | + url:url+"/SunvoteEducation/api/v1/question", | ||
42 | + async:true, | ||
43 | + type:"post", | ||
44 | + data:{ID:id}, | ||
45 | + success:function(data){ | ||
46 | + console.log(data); | ||
47 | + if(data.data.length>0){ | ||
48 | + for(var i=0;i<data.data.length;i++){ | ||
49 | + _html += '<li class="question_li" data-id="'+data.data[i].QUESTION_ID+'" data-knowledge="' +getknowledgeid(data.data[i].QUESTION_ID,knowledge_ids) + '"><div class="stem"></div><div class="option"><ul></ul><div class="clearfix"></div></div><div class="resolve"><div class="resolve_box"><p>【Answer】 '+data.data[i].ANSWER+'</p><p><span>【Analysis】</span>'+data.data[i].ANALYSIS+'</p></div><div class="clearfix"></div></div><div class="star_box"><div class="col-md-6 move"><img src="../static/images/up_ico.png" class="up"/><img src="../static/images/down_ico.png" class="down"/></div><div class="col-md-6"><div class="star"><span style="float:left;">Diffcult</span></div><div class="resolve_click"><a onclick="slide($(this))">View Analysis</a></div></div><div class="clearfix"></div></div></li>'; | ||
50 | + } | ||
51 | + console.log(_html); | ||
52 | + $(".analysis ul").html(_html); | ||
53 | + for(var j=0;j<data.data.length;j++){ | ||
54 | + var option_html=""; | ||
55 | + var sum=0; | ||
56 | + var right_num=0; | ||
57 | + var data1=[]; | ||
58 | + var data2=[]; | ||
59 | + var answer=""; | ||
60 | + var color=[]; | ||
61 | + $(".analysis li .stem").eq(j).append('<span class="li_index">'+(j+1)+'</span>、'+data.data[j].CONTENT); | ||
62 | + var arry_option=data.data[j].OPTION_CONTENT; | ||
63 | + | ||
64 | + for(var x=0;x<arry_option.length;x++){ | ||
65 | + option_html += '<li><span>'+String.fromCharCode(64 + parseInt(x+1))+'.</span>'+arry_option[x]+'</li>'; | ||
66 | + } | ||
67 | + $(".option").eq(j).html(option_html); | ||
68 | + star(j,parseInt(data.data[j].DIFFICULTY)); | ||
69 | + } | ||
70 | + } | ||
71 | + }, | ||
72 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
73 | + // 错误信息 | ||
74 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"Wrong massage:"+textStatus+""); | ||
75 | + window.top.loading.remove(); | ||
76 | + } | ||
77 | + }) | ||
78 | + | ||
79 | + } | ||
80 | + | ||
81 | + function getknowledgeid(question_id,knowledge_ids){ | ||
82 | + for(var i = 0 ; i < knowledge_ids.length; i++){ | ||
83 | + if(knowledge_ids[i].question_id == question_id){ | ||
84 | + return knowledge_ids[i].knowledge_id; | ||
85 | + } | ||
86 | + } | ||
87 | + return ''; | ||
88 | + | ||
89 | + } | ||
90 | + function star(index,num){ //难度星级 | ||
91 | + $(".star").eq(index).append('<ul></ul>'); | ||
92 | + var li_html=""; | ||
93 | + for(var i=1;i<=num;i++){ | ||
94 | + li_html +='<li class="on"></li>'; | ||
95 | + } | ||
96 | + for(var j=num;j<5;j++){ | ||
97 | + li_html += '<li class="off"></li>'; | ||
98 | + } | ||
99 | + | ||
100 | + $(".star").eq(index).find("ul").html(li_html); | ||
101 | + } | ||
102 | + $(document).on('click', '.move img', function(event) { //上移、下移 | ||
103 | + event.preventDefault(); | ||
104 | + var parent=$(this).closest("li"); | ||
105 | + var this_index=parent.children(".stem").find(".li_index").html(); | ||
106 | + var up_index=parent.prev().children(".stem").find(".li_index").html() | ||
107 | + console.log(this_index); | ||
108 | + console.log(up_index); | ||
109 | + var parents=$(this).closest(".analysis").children("ul"); | ||
110 | + var len=parents.children().length; | ||
111 | + if(($(this).is(".up") || $(this).is(".top")) && parent.index()==0){ | ||
112 | + alert("Stikied!!"); | ||
113 | + return false; | ||
114 | + }else if(($(this).is(".down") || $(this).is(".bottom")) && parent.index()==len-1){ | ||
115 | + alert("Bottomed!"); | ||
116 | + return false; | ||
117 | + } | ||
118 | + switch (true) { | ||
119 | + case $(this).is(".up"): | ||
120 | + var prev = parent.prev(); | ||
121 | + var this_index=parent.children(".stem").find(".li_index").html(); | ||
122 | + var up_index=prev.children(".stem").find(".li_index").html(); | ||
123 | + prev.children(".stem").find(".li_index").html(this_index); | ||
124 | + parent.children(".stem").find(".li_index").html(up_index); | ||
125 | + parent.insertBefore(prev); | ||
126 | + break; | ||
127 | + case $(this).is(".down"): | ||
128 | + var next = parent.next(); | ||
129 | + var this_index=parent.children(".stem").find(".li_index").html(); | ||
130 | + var up_index=next.children(".stem").find(".li_index").html(); | ||
131 | + next.children(".stem").find(".li_index").html(this_index); | ||
132 | + parent.children(".stem").find(".li_index").html(up_index); | ||
133 | + parent.insertAfter(next); | ||
134 | + break; | ||
135 | + case $(this).is(".top"): | ||
136 | + parents.prepend(parent); | ||
137 | + break; | ||
138 | + case $(this).is(".bottom"): | ||
139 | + parents.append(parent); | ||
140 | + break; | ||
141 | + } | ||
142 | + }); | ||
143 | + $(".save").click(function(){ //保存,提交试卷 | ||
144 | + var question_arry=[]; | ||
145 | + for(var i=0;i<$(".question_li").length;i++){ | ||
146 | + question_arry[i]={ | ||
147 | + score: "0", | ||
148 | + part_score: "0", | ||
149 | + question_id: $(".question_li").eq(i).attr("data-id"), | ||
150 | + knowledge_id: $(".question_li").eq(i).attr("data-knowledge"), | ||
151 | + rank: i.toString(), | ||
152 | + no_name: i.toString() | ||
153 | + }; | ||
154 | + | ||
155 | + } | ||
156 | + var data={ | ||
157 | + title: $("#paper_title").html(), | ||
158 | + exam_time: $("#time").html(), | ||
159 | + paper_type: "101", | ||
160 | + subject_id: subjectId, | ||
161 | + grade_id: gradleId, | ||
162 | + class_id: classId, | ||
163 | + user_id: userid, | ||
164 | + score: "100", | ||
165 | + questions: question_arry | ||
166 | + }; | ||
167 | + | ||
168 | + $.ajax({ | ||
169 | + url:url+"/SunvoteEducation/api/v1/publishpaper", | ||
170 | + async:false, | ||
171 | + type:"post", | ||
172 | + dataType: "json", | ||
173 | + headers: {'Content-Type': 'application/json'}, | ||
174 | + data:JSON.stringify(data), | ||
175 | + success:function(data){ | ||
176 | + alert("Success"); | ||
177 | + window.history.go(-2); | ||
178 | + }, | ||
179 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
180 | + // 错误信息 | ||
181 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"Wrong massage:"+textStatus+""); | ||
182 | + window.top.loading.remove(); | ||
183 | + } | ||
184 | + }) | ||
185 | + }) | ||
0 | \ No newline at end of file | 186 | \ No newline at end of file |
WebRoot/static/js/en_paper_view2.js
0 → 100644
1 | +var url=""; | ||
2 | + var question_box=[]; | ||
3 | + function slide(obj){ //查看解析 | ||
4 | + obj.closest(".star_box").siblings(".resolve").slideToggle(function(){ | ||
5 | + if($(".resolve").css("display") == "none") | ||
6 | + obj.text("View Analysis "); | ||
7 | + else | ||
8 | + obj.text("Fold analysis"); | ||
9 | + }); | ||
10 | + } | ||
11 | + | ||
12 | +function getQueryString(name) { | ||
13 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); | ||
14 | + var r = window.location.search.substr(1).match(reg); | ||
15 | + if (r != null) return unescape(r[2]); return null; | ||
16 | + } | ||
17 | + var PAPER_ID=getQueryString("PAPER_ID"); | ||
18 | + var classId=getQueryString("classId"); | ||
19 | + var userid=getQueryString("userid"); | ||
20 | + | ||
21 | + var _html=""; | ||
22 | + $(document).ready(function(){ | ||
23 | + window.top.loading.remove(); | ||
24 | + $.ajax({ | ||
25 | + url:url+"/SunvoteEducation/api/v1/paperinfo", | ||
26 | + async:false, | ||
27 | + type:"post", | ||
28 | + data:{PAPER_ID:PAPER_ID}, | ||
29 | + success:function(data){ | ||
30 | + console.log(data); | ||
31 | + $("#paper_title").html(data.data.title); | ||
32 | + $("#time").html(data.data.exam_time); | ||
33 | + if(data.data.questions.length>0){ | ||
34 | + for(var i=0;i<data.data.questions.length;i++){ | ||
35 | + _html += '<li class="question_li" data-id="'+data.data.questions[i].question_id+'"><div class="stem"></div><div class="option"><ul></ul><div class="clearfix"></div></div><div class="resolve"><div class="resolve_box"><p>【Answer】 '+data.data.questions[i].answer+'</p><p><span>【Analysis】</span>'+data.data.questions[i].analysis+'</p></div><div class="clearfix"></div></div><div class="star_box"><div class="col-md-6"><div class="star"><span style="float:left;">Diffcult </span></div><div class="resolve_click"><a onclick="slide($(this))">View Analysis</a></div></div><div class="clearfix"></div></div></li>'; | ||
36 | + } | ||
37 | + console.log(_html); | ||
38 | + $(".analysis ul").html(_html); | ||
39 | + for(var j=0;j<data.data.questions.length;j++){ | ||
40 | + var option_html=""; | ||
41 | + var sum=0; | ||
42 | + var right_num=0; | ||
43 | + var answer=""; | ||
44 | + $(".analysis li .stem").eq(j).append('<span class="li_index">'+(j+1)+'</span>、'+data.data.questions[j].content); | ||
45 | + var arry_option=data.data.questions[j].option_content; | ||
46 | + arry_option=arry_option.replace("[",""); | ||
47 | + arry_option=arry_option.replace("]",""); | ||
48 | + arry_option=arry_option.split(","); | ||
49 | + | ||
50 | + for(var x=0;x<arry_option.length;x++){ | ||
51 | + option_html += '<li><span>'+String.fromCharCode(64 + parseInt(x+1))+'.</span>'+arry_option[x]+'</li>'; | ||
52 | + } | ||
53 | + $(".option").eq(j).html(option_html); | ||
54 | + star(j,parseInt(data.data.questions[j].difficulty)); | ||
55 | + } | ||
56 | + } | ||
57 | + window.top.loading.remove(); | ||
58 | + }, | ||
59 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
60 | + // 错误信息 | ||
61 | + alert("Code State:"+XMLHttpRequest.status+"State:"+XMLHttpRequest.readyState+"wrong message:"+textStatus+""); | ||
62 | + window.top.loading.remove(); | ||
63 | + } | ||
64 | + }) | ||
65 | + }) | ||
66 | + function star(index,num){ //难度星级 | ||
67 | + $(".star").eq(index).append('<ul></ul>'); | ||
68 | + var li_html=""; | ||
69 | + for(var i=1;i<=num;i++){ | ||
70 | + li_html +='<li class="on"></li>'; | ||
71 | + } | ||
72 | + for(var j=num;j<5;j++){ | ||
73 | + li_html += '<li class="off"></li>'; | ||
74 | + } | ||
75 | + | ||
76 | + $(".star").eq(index).find("ul").html(li_html); | ||
77 | + } | ||
78 | + | ||
0 | \ No newline at end of file | 79 | \ No newline at end of file |
WebRoot/static/js/en_set_question.js
0 → 100644
1 | +var url=""; | ||
2 | + var temp_tag; | ||
3 | + var temp_data; | ||
4 | + var TEXTBOOK_ID=""; | ||
5 | + var question_box=[]; | ||
6 | + var question_num=0; | ||
7 | + var pageNum=1; | ||
8 | + var end=0; | ||
9 | + var flag=0; | ||
10 | + var paper_title = "" ; | ||
11 | + var paper_time = "0" ; | ||
12 | + | ||
13 | + | ||
14 | + $(document).ready(function(){ | ||
15 | + getPoint(); | ||
16 | + }); | ||
17 | + | ||
18 | + function getQueryString(name) { | ||
19 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); | ||
20 | + var r = window.location.search.substr(1).match(reg); | ||
21 | + if (r != null) return unescape(r[2]); return null; | ||
22 | + } | ||
23 | + | ||
24 | + var subject_id=getQueryString("subject_id"); | ||
25 | + var class_id=getQueryString("class_id"); | ||
26 | + var user_id=getQueryString("user_id"); | ||
27 | + | ||
28 | + | ||
29 | + function getPoint(){ //获取知识点 | ||
30 | + $.ajax({ | ||
31 | + url:url+"/SunvoteEducation/api/v1/point", | ||
32 | + async:false, | ||
33 | + type:"post", | ||
34 | + data:{depth:"",subject_id:subject_id,p_id:"",knowledge_from:101}, | ||
35 | + success:function(data){ | ||
36 | + var point_html=""; | ||
37 | + for(var i=0;i<data.data.length;i++){ | ||
38 | + point_html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-img-click=0 data-span-click=0><img src="../static/images/add.png" class="add" /><span>'+(i+1)+data.data[i].NAME+'</span></li>'; | ||
39 | + } | ||
40 | + if(data.data.length > 0){ | ||
41 | + paper_title = data.data[0].NAME; | ||
42 | + } | ||
43 | + $(".section").children("ul").html(point_html); | ||
44 | + getQuestion($(".section li").eq(0)); | ||
45 | + }, | ||
46 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
47 | + // 错误信息 | ||
48 | + alert("Code State:"+XMLHttpRequest.status+"State:"+XMLHttpRequest.readyState+"Wrong message:"+textStatus+""); | ||
49 | + window.top.loading.remove(); | ||
50 | + } | ||
51 | + }) | ||
52 | + } | ||
53 | + function getChapter(TEXTBOOK_ID){ //获取章节 | ||
54 | + $(".section").children("ul").html(""); | ||
55 | + $.ajax({ | ||
56 | + url:url+"/SunvoteEducation/api/v1/chapter", | ||
57 | + async:false, | ||
58 | + type:"post", | ||
59 | + data:{TEXTBOOK_ID:TEXTBOOK_ID}, | ||
60 | + success:function(data){ | ||
61 | + for(var i=0;i<data.data.length;i++){ | ||
62 | + $(".section").children("ul").append('<li data-id="'+data.data[i].ID+'" data-img-click=0 data-span-click=0><img src="../static/images/add.png" class="add"/><span>'+data.data[i].NAME+'</span></li>'); | ||
63 | + if(data.data[i].CHILDREN.length>0){ | ||
64 | + $(".section").children("ul").children("li").eq(i).append("<ul></ul>"); | ||
65 | + for(var j=0;j<data.data[i].CHILDREN.length;j++){ | ||
66 | + $(".section").children("ul").children("li").eq(i).children("ul").append('<li data-id="'+data.data[i].CHILDREN[j].ID+'" onclick="getQuestion($(this))"><span>●</span><span>'+data.data[i].CHILDREN[j].NAME+'</span></li>'); | ||
67 | + } | ||
68 | + } | ||
69 | + } | ||
70 | + getQuestion($(".section li").eq(0)); | ||
71 | + }, | ||
72 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
73 | + // 错误信息 | ||
74 | + alert("Code State"+XMLHttpRequest.status+"State"+XMLHttpRequest.readyState+"Wrong message:"+textStatus+""); | ||
75 | + window.top.loading.remove(); | ||
76 | + } | ||
77 | + }) | ||
78 | + } | ||
79 | + function getMenu(id,obj){ //获取知识点下级内容 | ||
80 | + var _html=""; | ||
81 | + $.ajax({ | ||
82 | + url:url+"/SunvoteEducation/api/v1/point", | ||
83 | + async:false, | ||
84 | + type:"post", | ||
85 | + data:{depth:"",subject_id:subject_id,p_id:id,knowledge_from:101}, | ||
86 | + success:function(data){ | ||
87 | + obj.append('<ul></ul>'); | ||
88 | + for(var i=0;i<data.data.length;i++){ | ||
89 | + console.log(typeof(data.data[i].CHILDREN)); | ||
90 | + if(data.data[i].CHILDREN===undefined) | ||
91 | + _html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-span-click=0 "><span>●</span><span>'+(i+1)+data.data[i].NAME+'</span></li>'; | ||
92 | + else | ||
93 | + _html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-img-click=0 data-span-click=0 ><img src="../static/images/add.png" class="add"/><span>'+(i+1)+data.data[i].NAME+'</span></li>'; | ||
94 | + } | ||
95 | + obj.children('ul').html(_html); | ||
96 | + }, | ||
97 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
98 | + // 错误信息 | ||
99 | + alert("Code State"+XMLHttpRequest.status+"State"+XMLHttpRequest.readyState+"Wrong message:"+textStatus+""); | ||
100 | + window.top.loading.remove(); | ||
101 | + } | ||
102 | + }) | ||
103 | + } | ||
104 | + function slide(obj){ //查看解析 | ||
105 | + obj.closest(".star_box").siblings(".resolve").slideToggle(function(){ | ||
106 | + if($(".resolve").css("display") == "none") | ||
107 | + obj.text("View Analysis"); | ||
108 | + else | ||
109 | + obj.text("Fold analysis"); | ||
110 | + }); | ||
111 | + | ||
112 | + } | ||
113 | + function getQuestion(obj){ //获取题目 | ||
114 | + | ||
115 | + var knowledge_id="",chapter_id=""; | ||
116 | + if($(".tab .active").attr("data-index")==1){ | ||
117 | + knowledge_id=obj.attr("data-id"); | ||
118 | + }else{ | ||
119 | + chapter_id=obj.attr("data-id"); | ||
120 | + } | ||
121 | + | ||
122 | + var _html=""; | ||
123 | + | ||
124 | + $.ajax({ | ||
125 | + url:url+"/SunvoteEducation/api/v1/questions", | ||
126 | + async:true, | ||
127 | + type:"post", | ||
128 | + data:{chapter_id:chapter_id,teachingmaterial_id:"",knowledge_id:knowledge_id,question_from:101,user_id:"",problem_type:"",subject_id:subject_id,count:"5",pageNum:pageNum}, | ||
129 | + success:function(data){ | ||
130 | + window.top.loading.remove(); | ||
131 | + console.log(data); | ||
132 | + if(data.data.length>0){ | ||
133 | + for(var i=0;i<data.data.length;i++){ | ||
134 | + | ||
135 | + _html += '<li data-id="'+data.data[i].QUESTION_ID+'" data-knowledge="' + knowledge_id + '"><div class="content"></div><div class="option"><ul></ul></div><div class="resolve"><div class="resolve_box"><p><span>【Answer】</span> '+data.data[i].ANSWER+'</p><p><span>【Analysis】</span>'+data.data[i].ANALYSIS+'</p></div></div><div class="star_box"><div class="col-md-6"><div class="star"><span style="float:left;">Diffcult </span></div><div class="resolve_click"><a onclick="slide($(this))">View Analysis</a><div class="check_box"></div></div></div><div class="clearfix"></div></div></li>'; | ||
136 | + } | ||
137 | + $(".question_box").children("ul").append(_html); | ||
138 | + console.log(5*(pageNum-1)); | ||
139 | + for(var j=5*(pageNum-1);j<(data.data.length+5*(pageNum-1));j++){ | ||
140 | + var option_html=""; | ||
141 | + data.data[j-5*(pageNum-1)].CONTENT = data.data[j-5*(pageNum-1)].CONTENT.replace('<fill></fill>','______'); | ||
142 | + $(".question_box li .content").eq(j).append('<span>'+(j+1)+'、</span>'+data.data[j-5*(pageNum-1)].CONTENT); | ||
143 | + var arry_option=data.data[j-5*(pageNum-1)].OPTION_CONTENT; | ||
144 | + if(question_box.indexOf(data.data[j-5*(pageNum-1)].QUESTION_ID)>=0){ | ||
145 | + $(".check_box").eq(j).addClass("checked"); | ||
146 | + } | ||
147 | + for(var x=0;x<arry_option.length;x++){ | ||
148 | + option_html += '<li><span>'+String.fromCharCode(64 + parseInt(x+1))+'.</span>'+arry_option[x]+'</li>'; | ||
149 | + } | ||
150 | + $(".option").eq(j).find("ul").html(option_html); | ||
151 | + | ||
152 | + star(j,parseInt(data.data[j-5*(pageNum-1)].DIFFICULTY)); | ||
153 | + | ||
154 | + } | ||
155 | + $(".view_more").css("display","block"); | ||
156 | + end=0; | ||
157 | + }else{ | ||
158 | + $(".view_more").css("display","none"); | ||
159 | + // $(".question_box").children("ul").html(""); | ||
160 | + pageNum-=1; | ||
161 | + if(pageNum<1) | ||
162 | + pageNum=1; | ||
163 | + end=1; | ||
164 | + } | ||
165 | + flag=0; | ||
166 | + }, | ||
167 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
168 | + // 状态码 | ||
169 | + console.log(XMLHttpRequest.status); | ||
170 | + // 状态 | ||
171 | + console.log(XMLHttpRequest.readyState); | ||
172 | + // 错误信息 | ||
173 | + alert(textStatus); | ||
174 | + flag=0; | ||
175 | + pageNum-=1; | ||
176 | + if(pageNum<1) | ||
177 | + pageNum=1; | ||
178 | + window.top.loading.remove(); | ||
179 | + } | ||
180 | + }) | ||
181 | + } | ||
182 | + function getTeachingMaterial(){ //获取教材版本 | ||
183 | + | ||
184 | + $.ajax({ | ||
185 | + url:url+"/SunvoteEducation/api/v1/teachingmaterial", | ||
186 | + async:true, | ||
187 | + type:"post", | ||
188 | + data:{subject_id:subject_id}, | ||
189 | + success:function(data){ | ||
190 | + console.log(data); | ||
191 | + if (data.data.length > 0) { | ||
192 | + var teach_html = ""; | ||
193 | + for (var i = 0; i < data.data.length; i++) { | ||
194 | + teach_html += '<li data-id="' | ||
195 | + + data.data[i].ID | ||
196 | + + '" class="li_name"><p class="name">' | ||
197 | + + data.data[i].NAME | ||
198 | + + '</p><img src="../static/images/arrow_right.png" /><div class="clearfix"></div></li>'; | ||
199 | + } | ||
200 | + $(".book_box ul").html(teach_html); | ||
201 | + var li_length = $(".book_box ul li").length; | ||
202 | + for (var k = 0; k < li_length; k++) { | ||
203 | + var books = []; | ||
204 | + var book_html = ""; | ||
205 | + var book_id = $(".book_box ul").children("li") | ||
206 | + .eq(k).attr("data-id"); | ||
207 | + | ||
208 | + if (textBook(book_id).length > 0) { | ||
209 | + | ||
210 | + books = textBook($(".book_box ul li").eq(k) | ||
211 | + .attr("data-id")); | ||
212 | + $(".book_box ul li").eq(k).append('<div class="float_box"><ul><div class="clearfix"></div></ul></div>'); | ||
213 | + | ||
214 | + for (var j = 0; j < books.length; j++) { | ||
215 | + console.log("j:" + j); | ||
216 | + book_html += '<li data-id=' + books[j].id | ||
217 | + + '>' + books[j].name + '</li>'; | ||
218 | + } | ||
219 | + $(".float_box").eq(k).children("ul").find( | ||
220 | + ".clearfix").before(book_html); | ||
221 | + TEXTBOOK_ID = books[0].id; | ||
222 | + } | ||
223 | + | ||
224 | + } | ||
225 | + getChapter(TEXTBOOK_ID); | ||
226 | + $("#book_name").text( | ||
227 | + $(".name").eq(0).text() | ||
228 | + + "/" | ||
229 | + + $(".float_box").eq(0).find('li') | ||
230 | + .eq(0).text()); | ||
231 | + }else{ | ||
232 | + window.top.loading.remove(); | ||
233 | + } | ||
234 | + | ||
235 | + }, | ||
236 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
237 | + // 错误信息 | ||
238 | + alert("Code State"+XMLHttpRequest.status+"State"+XMLHttpRequest.readyState+"Wrong message:"+textStatus+""); | ||
239 | + window.top.loading.remove(); | ||
240 | + } | ||
241 | + }) | ||
242 | + | ||
243 | + } | ||
244 | + function textBook(id){ //获取教材 | ||
245 | + var textBookName=[]; | ||
246 | + $.ajax({ | ||
247 | + url:url+"/SunvoteEducation/api/v1/textbook", | ||
248 | + async:false, | ||
249 | + type:"post", | ||
250 | + data:{teaching_material_id:id,subject_id:subject_id,grade_id:""}, | ||
251 | + success:function(data){ | ||
252 | + if(data.data.length>0){ | ||
253 | + for(var i=0;i<data.data.length;i++){ | ||
254 | + textBookName[i]={"name":data.data[i].NAME,"id":data.data[i].ID}; | ||
255 | + } | ||
256 | + } | ||
257 | + }, | ||
258 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
259 | + // 错误信息 | ||
260 | + alert("Code State"+XMLHttpRequest.status+"State"+XMLHttpRequest.readyState+"Wrong message:"+textStatus+""); | ||
261 | + window.top.loading.remove(); | ||
262 | + } | ||
263 | + }) | ||
264 | + return textBookName; | ||
265 | + } | ||
266 | + function getClassName(){ //获取中文班级名 | ||
267 | + $.ajax({ | ||
268 | + url:url+"/SunvoteEducation/api/v1/classname", | ||
269 | + async:false, | ||
270 | + type:"post", | ||
271 | + data:{id:class_id}, | ||
272 | + success:function(data){ | ||
273 | + $(".classList li").html(data.data); | ||
274 | + }, | ||
275 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
276 | + // 错误信息 | ||
277 | + alert("Code State"+XMLHttpRequest.status+"State"+XMLHttpRequest.readyState+"Wrong message:"+textStatus+""); | ||
278 | + window.top.loading.remove(); | ||
279 | + } | ||
280 | + }) | ||
281 | + } | ||
282 | + function star(index,num){ //难度星级 | ||
283 | + $(".star").eq(index).append('<ul></ul>'); | ||
284 | + var li_html=""; | ||
285 | + for(var i=1;i<=num;i++){ | ||
286 | + li_html +='<li class="on"></li>'; | ||
287 | + } | ||
288 | + for(var j=num;j<5;j++){ | ||
289 | + li_html += '<li class="off"></li>'; | ||
290 | + } | ||
291 | + | ||
292 | + $(".star").eq(index).find("ul").html(li_html); | ||
293 | + } | ||
294 | + | ||
295 | + $(".section").on("click",".add",function(event){ //展开菜单 | ||
296 | + event.stopPropagation(); | ||
297 | + var that=$(this).closest("li"); | ||
298 | + if($(".tab .active").attr("data-index")==1){ | ||
299 | + if(that.attr("data-img-click")==0){ | ||
300 | + getMenu(that.attr("data-id"),that); | ||
301 | + } | ||
302 | + that.attr("data-img-click",1); | ||
303 | + }else{ | ||
304 | + that.attr("data-img-click",1); | ||
305 | + } | ||
306 | + | ||
307 | + if(that.children('ul').length>0) | ||
308 | + that.children('ul').slideToggle(function(){ | ||
309 | + if(that.children('ul').css("display")=="block") | ||
310 | + that.children('img').attr("src","../static/images/reduce.png"); | ||
311 | + else | ||
312 | + that.children('img').attr("src","../static/images/add.png"); | ||
313 | + }); | ||
314 | + }); | ||
315 | + $(".section").on("click","span",function(event){ //点击菜单获取题目 | ||
316 | + window.top.loading.show(); | ||
317 | + event.stopPropagation(); | ||
318 | + pageNum=1; | ||
319 | + $(".question_box ul").html(""); | ||
320 | + var that=$(this).closest("li"); | ||
321 | + if($(".tab .active").attr("data-index")==1){ | ||
322 | + paper_title = this.textContent; | ||
323 | + getQuestion(that); | ||
324 | + $(".menu_active").removeClass(); | ||
325 | + that.addClass("menu_active"); | ||
326 | + }else{ | ||
327 | + paper_title = this.textContent; | ||
328 | + getQuestion(that); | ||
329 | + $(".menu_active").removeClass(); | ||
330 | + that.addClass("menu_active"); | ||
331 | + } | ||
332 | + | ||
333 | + }); | ||
334 | + $(".book_box").children("ul").on("mouseover","li",function(event){ //教材版本交互 | ||
335 | + event.stopPropagation(); | ||
336 | + $(this).children(".float_box").css("display","block"); | ||
337 | + }); | ||
338 | + $(".book_box").children("ul").on("mouseleave","li",function(event){ //教材版本交互 | ||
339 | + event.stopPropagation(); | ||
340 | + $(this).children(".float_box").css("display","none"); | ||
341 | + }); | ||
342 | + $(".float_box").on("mouseleave",function(event){ //教材版本交互 | ||
343 | + event.stopPropagation(); | ||
344 | + $(this).css("display","none"); | ||
345 | + }); | ||
346 | + $(document).on("click",".float_box li",function(event){ //教材版本交互 | ||
347 | + event.stopPropagation(); | ||
348 | + var id=$(this).attr("data-id"); | ||
349 | + $("#book_name").text($(this).closest(".li_name").children(".name").text()+"/"+$(this).text()); | ||
350 | + $(".float_box").css("display","none"); | ||
351 | + $(".book_box").slideToggle(); | ||
352 | + getChapter(id); | ||
353 | + }); | ||
354 | + $(".book").click(function(){ //教材版本下拉框交互 | ||
355 | + $(".book_box").slideToggle(); | ||
356 | + }) | ||
357 | + $(document).on("click",".check_box",function(){ //选中题目 | ||
358 | + | ||
359 | + if($(this).hasClass("checked")){ | ||
360 | + var id=$(this).closest("li").attr("data-id"); | ||
361 | + var que_index= -1 ; | ||
362 | + for(var tp = 0 ; tp < question_box.length; tp++){ | ||
363 | + if(question_box[tp].id == id){ | ||
364 | + que_index = tp; | ||
365 | + } | ||
366 | + } | ||
367 | + $(this).removeClass("checked"); | ||
368 | + question_box.splice(que_index,1); | ||
369 | + question_num--; | ||
370 | + }else{ | ||
371 | + //question_box[question_num].id =$(this).closest("li").attr("data-id"); | ||
372 | + //question_box[question_num].knowledge_id =$(this).closest("li").attr("data-knowledge"); | ||
373 | + question_box[question_num] = {id:$(this).closest("li").attr("data-id"),knowledge_id:$(this).closest("li").attr("data-knowledge")}; | ||
374 | + question_num++; | ||
375 | + $(this).addClass("checked"); | ||
376 | + } | ||
377 | + $("#all_que_num").html(question_num); | ||
378 | + }); | ||
379 | + $(".clear_que").click(function(){ //清空 | ||
380 | + question_num=0; | ||
381 | + question_box=[]; | ||
382 | + $(".checked").removeClass("checked"); | ||
383 | + $("#all_que_num").html(question_num); | ||
384 | + }); | ||
385 | + $(".tab li").click(function(){ //教材与知识点选择 | ||
386 | + window.top.loading.show(); | ||
387 | + pageNum=1; | ||
388 | + $(this).siblings().removeClass("active"); | ||
389 | + $(this).addClass("active"); | ||
390 | + if($(this).index()==0){ | ||
391 | + getTeachingMaterial(); | ||
392 | + $(".choose_book").css("display","block"); | ||
393 | + //getChapter(TEXTBOOK_ID); | ||
394 | + }else{ | ||
395 | + $(".choose_book").css("display","none"); | ||
396 | + getPoint(); | ||
397 | + } | ||
398 | + }); | ||
399 | + $(".topic").click(function(){ | ||
400 | + if(parseInt($("#all_que_num").text())>0){ | ||
401 | + paper_time = parseInt($("#all_que_num").text()) > 75 ? "150" : (parseInt($("#all_que_num").text()) * 2); | ||
402 | + $("#title").val(paper_title); | ||
403 | + $("#time").val(paper_time); | ||
404 | + $('#myModal').modal('show'); | ||
405 | + }else{ | ||
406 | + alert("Please select question first") | ||
407 | + } | ||
408 | + }); | ||
409 | + $(".view_more").click(function(){ //加载更多 | ||
410 | + flag++; | ||
411 | + if(end>0){ | ||
412 | + $(".view_more p").html("No more"); | ||
413 | + return; | ||
414 | + } | ||
415 | + if(flag==1){ | ||
416 | + window.top.loading.show(); | ||
417 | + pageNum++; | ||
418 | + getQuestion($(".menu_active")); | ||
419 | + } | ||
420 | + }) | ||
421 | + $("#submit").click(function(){ | ||
422 | + var question_arry=[]; | ||
423 | + for(var i=0;i<question_num;i++){ | ||
424 | + question_arry[i]={ | ||
425 | + score: "0", | ||
426 | + part_score: "0", | ||
427 | + question_id: question_box[i].id, | ||
428 | + knowledge_id:question_box[i].knowledge_id, | ||
429 | + rank: i.toString(), | ||
430 | + no_name: i.toString() | ||
431 | + }; | ||
432 | + | ||
433 | + } | ||
434 | + var data={ | ||
435 | + title: $("#title").val(), | ||
436 | + exam_time: $("#time").val(), | ||
437 | + paper_type: "101", | ||
438 | + subject_id: subject_id, | ||
439 | + grade_id: "", | ||
440 | + class_id: class_id, | ||
441 | + user_id: user_id, | ||
442 | + score: "", | ||
443 | + questions: question_arry | ||
444 | + }; | ||
445 | + sessionStorage.setItem("data",JSON.stringify(data)); | ||
446 | + location.href="paper_view.do?classID="+class_id+"&userid="+user_id; | ||
447 | + | ||
448 | + }) | ||
0 | \ No newline at end of file | 449 | \ No newline at end of file |
WebRoot/static/js/en_test_list.js
0 → 100644
1 | +var option_html = ""; | ||
2 | +var subject_id = ""; | ||
3 | + | ||
4 | +function getQueryString(name) { | ||
5 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); | ||
6 | + var r = window.location.search.substr(1).match(reg); | ||
7 | + if (r != null) | ||
8 | + return unescape(r[2]); | ||
9 | + return null; | ||
10 | +} | ||
11 | +var class_id = getQueryString("classid"); | ||
12 | +$(document).ready( | ||
13 | + function() { | ||
14 | + | ||
15 | + $.ajax({ | ||
16 | + url : url + "/teacher/info", | ||
17 | + async : false, | ||
18 | + type : "post", | ||
19 | + success : function(data) { | ||
20 | + subject_id = data.data.subjectList[0].SUBJECT_ID; | ||
21 | + user_id = data.data.ID; | ||
22 | + if (data.data.classInfoList.length > 0) { | ||
23 | + for (var i = 0; i < data.data.classInfoList.length; i++) { | ||
24 | + option_html += '<option value="' | ||
25 | + + data.data.classInfoList[i].CLASS_ID | ||
26 | + + '">' | ||
27 | + + data.data.classInfoList[i].CLASS_NAME | ||
28 | + + '</option>' | ||
29 | + } | ||
30 | + $("#dealer_id_2").html(option_html); | ||
31 | + } | ||
32 | + getList(); | ||
33 | + }, | ||
34 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
35 | + // 错误信息 | ||
36 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | ||
37 | + window.top.loading.remove(); | ||
38 | + } | ||
39 | + }) | ||
40 | + // 日期框 | ||
41 | + $('.date-picker').datepicker({ | ||
42 | + autoclose : true, | ||
43 | + todayHighlight : true | ||
44 | + }); | ||
45 | + window.top.loading.remove(); | ||
46 | + }) | ||
47 | +function getList(start_date, end_date, class_id) { // 获取测验列表 | ||
48 | + var tab_html = ""; | ||
49 | + if(class_id == null){ | ||
50 | + class_id = getQueryString("classid"); | ||
51 | + } | ||
52 | + $.ajax({ | ||
53 | + url : url + "/api/v1/testpaper", | ||
54 | + async : false, | ||
55 | + type : "post", | ||
56 | + data : { | ||
57 | + test_type : "101", | ||
58 | + user_id : user_id, | ||
59 | + subject_id : subject_id, | ||
60 | + class_id : class_id, | ||
61 | + currentpage : "1", | ||
62 | + showcount : "", | ||
63 | + start_date : start_date, | ||
64 | + end_date : end_date | ||
65 | + }, | ||
66 | + success : function(data) { | ||
67 | + console.log(data); | ||
68 | + for (var i = 0; i < data.data.length; i++) { | ||
69 | + tab_html += '<tr><td>' | ||
70 | + + (i + 1) | ||
71 | + + '</td><td>' | ||
72 | + + data.data[i].name | ||
73 | + + '</td><td>' | ||
74 | + + getClassName(data.data[i].classId) | ||
75 | + + '</td><td>' | ||
76 | + + data.data[i].createDate | ||
77 | + + '</td><td><a onclick="window.top.loading.show();jump($(this));" data-id="' | ||
78 | + + data.data[i].testpaperId | ||
79 | + + '" >View</a> <!-- <a onclick="window.top.loading.show();ansync($(this)); " data-id="' | ||
80 | + + data.data[i].testpaperId + '" >班级分析</a> --></td></tr>' | ||
81 | + } | ||
82 | + $("#tab_body").html(tab_html); | ||
83 | + }, | ||
84 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
85 | + // 错误信息 | ||
86 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | ||
87 | + window.top.loading.remove(); | ||
88 | + } | ||
89 | + }); | ||
90 | +} | ||
91 | +function jump(obj) { // 预览测验详情 | ||
92 | + var id = obj.attr("data-id"); | ||
93 | + location.href = "paper_view1.do?testpaperId=" + id; | ||
94 | +} | ||
95 | + | ||
96 | +function ansync(obj){ | ||
97 | + // 班级分析 | ||
98 | + var id = obj.attr("data-id"); | ||
99 | + location.href = "classansync.do?testpaperId=" + id; | ||
100 | +} | ||
101 | + | ||
102 | +function getSubjectName(id) { // 获取科目中文名 | ||
103 | + var subjectName = ""; | ||
104 | + $.ajax({ | ||
105 | + url : url + " /api/v1/subjectcname", | ||
106 | + async : false, | ||
107 | + type : "post", | ||
108 | + data : { | ||
109 | + id : id | ||
110 | + }, | ||
111 | + success : function(data) { | ||
112 | + subjectName = data.data; | ||
113 | + } | ||
114 | + }) | ||
115 | + return subjectName; | ||
116 | +} | ||
117 | +function getClassName(id) { // 获取班级中文名 | ||
118 | + var className = ""; | ||
119 | + $.ajax({ | ||
120 | + url : url + "/api/v1/classname", | ||
121 | + async : false, | ||
122 | + type : "post", | ||
123 | + data : { | ||
124 | + id : id | ||
125 | + }, | ||
126 | + success : function(data) { | ||
127 | + className = data.data; | ||
128 | + }, | ||
129 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
130 | + // 错误信息 | ||
131 | + alert("Status code:"+XMLHttpRequest.status+"Status:"+XMLHttpRequest.readyState+"wrong massage:"+textStatus+""); | ||
132 | + window.top.loading.remove(); | ||
133 | + } | ||
134 | + }) | ||
135 | + return className; | ||
136 | +} | ||
137 | +function tosearch() { //搜索 | ||
138 | + var start_date = $("#lastStart").val(); | ||
139 | + var end_date = $("#lastEnd").val(); | ||
140 | + var class_id = $("#dealer_id_2").val(); | ||
141 | + getList(start_date, end_date, class_id); | ||
142 | +} | ||
0 | \ No newline at end of file | 143 | \ No newline at end of file |
WebRoot/static/js/lang.js
0 → 100644
1 | +function SetCookie(name, value) { | ||
2 | + var key = ''; | ||
3 | + var Days = 2; | ||
4 | + var exp = new Date(); | ||
5 | + var domain = ""; | ||
6 | + exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000); | ||
7 | + if (key == null || key == "") { | ||
8 | + document.cookie = name + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/;domain=" + domain + ";"; | ||
9 | + } | ||
10 | + else { | ||
11 | + var nameValue = GetCookie(name); | ||
12 | + if (nameValue == "") { | ||
13 | + document.cookie = name + "=" + key + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/;domain=" + domain + ";"; | ||
14 | + } | ||
15 | + else { | ||
16 | + var keyValue = getCookie(name, key); | ||
17 | + if (keyValue != "") { | ||
18 | + nameValue = nameValue.replace(key + "=" + keyValue, key + "=" + encodeURI(value)); | ||
19 | + document.cookie = name + "=" + nameValue + ";expires=" + exp.toGMTString() + ";path=/;domain=" + domain + ";"; | ||
20 | + } | ||
21 | + else { | ||
22 | + document.cookie = name + "=" + nameValue + "&" + key + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/;" + domain + ";"; | ||
23 | + } | ||
24 | + } | ||
25 | + } | ||
26 | + } | ||
27 | + function GetCookie(name) { | ||
28 | + var nameValue = ""; | ||
29 | + var key = ""; | ||
30 | + var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); | ||
31 | + if (arr = document.cookie.match(reg)) { | ||
32 | + nameValue = decodeURI(arr[2]); | ||
33 | + } | ||
34 | + if (key != null && key != "") { | ||
35 | + reg = new RegExp("(^| |&)" + key + "=([^(;|&|=)]*)(&|$)"); | ||
36 | + if (arr = nameValue.match(reg)) { | ||
37 | + return decodeURI(arr[2]); | ||
38 | + } | ||
39 | + else return null; | ||
40 | + } | ||
41 | + else { | ||
42 | + return nameValue; | ||
43 | + } | ||
44 | + } | ||
45 | + | ||
46 | + function lang(){ | ||
47 | + var language = (GetCookie("lang") || navigator.browserLanguage || navigator.language).toLowerCase(); | ||
48 | + return language.substring(0,2) ; | ||
49 | + } |
WebRoot/static/login/en_logo.png
0 → 100644
4.49 KB
WebRoot/static/login/en_title.png
0 → 100644
12.7 KB