Commit d16b4f14fd126f96a67d3b4a54963afda53c9d57
Merge branch 'develop' of http://120.78.57.84/Elvis/SunvoteEducation into develop
Showing
6 changed files
with
372 additions
and
128 deletions
WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit2.jsp
@@ -172,7 +172,7 @@ | @@ -172,7 +172,7 @@ | ||
172 | <div style="text-align: center;" colspan="10"> | 172 | <div style="text-align: center;" colspan="10"> |
173 | 173 | ||
174 | <a class="btn btn-mini btn-primary" onclick="save();">确定布置</a> | 174 | <a class="btn btn-mini btn-primary" onclick="save();">确定布置</a> |
175 | - <a class="btn btn-mini btn-danger" onclick="window.top.modal.remove();">取消</a> | 175 | + <a class="btn btn-mini btn-danger" onclick="back()">取消</a> |
176 | </div> | 176 | </div> |
177 | </div> | 177 | </div> |
178 | <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | 178 | <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> |
@@ -237,7 +237,11 @@ | @@ -237,7 +237,11 @@ | ||
237 | 237 | ||
238 | 238 | ||
239 | }); | 239 | }); |
240 | - | 240 | + function back(){ |
241 | + var path = '<%=basePath%>homework/list.do?teacher_id=${pd.TEACHER_ID}'; | ||
242 | + parent.$("#mainFrame").attr('src',path); | ||
243 | + window.top.loading.show(); | ||
244 | + } | ||
241 | function save_data(data){ | 245 | function save_data(data){ |
242 | $.ajax({ //获取该名教师下的班级信息 | 246 | $.ajax({ //获取该名教师下的班级信息 |
243 | url:'<%=basePath%>homework/uploadHomework', | 247 | url:'<%=basePath%>homework/uploadHomework', |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | 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"%> | 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> |
3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> | 3 | <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> |
4 | +<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%> | ||
4 | <% | 5 | <% |
5 | String path = request.getContextPath(); | 6 | String path = request.getContextPath(); |
6 | String basePath = request.getScheme() + "://" | 7 | String basePath = request.getScheme() + "://" |
@@ -47,13 +48,14 @@ | @@ -47,13 +48,14 @@ | ||
47 | </div> | 48 | </div> |
48 | <div style="padding:0 5%;background:#fff;"> | 49 | <div style="padding:0 5%;background:#fff;"> |
49 | <table class="table table-striped"> | 50 | <table class="table table-striped"> |
50 | - <col style="width: 10%" /> | 51 | + <col style="width: 8%" /> |
51 | <col style="width: 20%" /> | 52 | <col style="width: 20%" /> |
52 | <col style="width: 15%" /> | 53 | <col style="width: 15%" /> |
53 | <col style="width: 15%" /> | 54 | <col style="width: 15%" /> |
54 | <col style="width: 10%" /> | 55 | <col style="width: 10%" /> |
56 | + <col style="width: 7%" /> | ||
55 | <col style="width: 10%" /> | 57 | <col style="width: 10%" /> |
56 | - <col style="width: 10%" /> | 58 | + <col style="width: 5%" /> |
57 | <col style="width: 10%" /> | 59 | <col style="width: 10%" /> |
58 | <thead> | 60 | <thead> |
59 | <tr> | 61 | <tr> |
@@ -61,6 +63,7 @@ | @@ -61,6 +63,7 @@ | ||
61 | <th>练习标题</th> | 63 | <th>练习标题</th> |
62 | <th>布置时间</th> | 64 | <th>布置时间</th> |
63 | <th>完成时间</th> | 65 | <th>完成时间</th> |
66 | + <th>班级</th> | ||
64 | <th>题目数</th> | 67 | <th>题目数</th> |
65 | <th>完成情况</th> | 68 | <th>完成情况</th> |
66 | <th>总分</th> | 69 | <th>总分</th> |
@@ -72,13 +75,14 @@ | @@ -72,13 +75,14 @@ | ||
72 | </div> | 75 | </div> |
73 | <div class="table_box"> | 76 | <div class="table_box"> |
74 | <table class="table table-striped"> | 77 | <table class="table table-striped"> |
75 | - <col style="width: 10%" /> | 78 | + <col style="width: 8%" /> |
76 | <col style="width: 20%" /> | 79 | <col style="width: 20%" /> |
77 | <col style="width: 15%" /> | 80 | <col style="width: 15%" /> |
78 | <col style="width: 15%" /> | 81 | <col style="width: 15%" /> |
79 | <col style="width: 10%" /> | 82 | <col style="width: 10%" /> |
83 | + <col style="width: 7%" /> | ||
80 | <col style="width: 10%" /> | 84 | <col style="width: 10%" /> |
81 | - <col style="width: 10%" /> | 85 | + <col style="width: 5%" /> |
82 | <col style="width: 10%" /> | 86 | <col style="width: 10%" /> |
83 | <tbody> | 87 | <tbody> |
84 | <c:choose> | 88 | <c:choose> |
@@ -86,9 +90,10 @@ | @@ -86,9 +90,10 @@ | ||
86 | <c:forEach items="${varList}" var="var" varStatus="vs"> | 90 | <c:forEach items="${varList}" var="var" varStatus="vs"> |
87 | <tr> | 91 | <tr> |
88 | <td><input type="checkbox" name='ids' id="ids" value="${var.HOMEWORK_ID}"/>${vs.index+1}</td> | 92 | <td><input type="checkbox" name='ids' id="ids" value="${var.HOMEWORK_ID}"/>${vs.index+1}</td> |
89 | - <td ><a target="_blank" href="<%=basePath%>homework/goView.do?homework_id=${var.HOMEWORK_ID}">${var.NAME}</a></td> | 93 | + <td ><a onclick="view('<%=basePath%>homework/goView.do?homework_id=${var.HOMEWORK_ID}')">${var.NAME}</a></td> |
90 | <td >${var.CREATE_DATE}</td> | 94 | <td >${var.CREATE_DATE}</td> |
91 | <td >${var.COMPLETE_DATE}</td> | 95 | <td >${var.COMPLETE_DATE}</td> |
96 | + <td >${myelfun:findClassName(var.CLASS_ID)}</td> | ||
92 | <td >${var.QUESTION_COUNT}</td> | 97 | <td >${var.QUESTION_COUNT}</td> |
93 | <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td> | 98 | <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td> |
94 | <td >${var.ALL_SCORE}</td> | 99 | <td >${var.ALL_SCORE}</td> |
@@ -167,6 +172,11 @@ | @@ -167,6 +172,11 @@ | ||
167 | parent.$("#mainFrame").attr('src',path); | 172 | parent.$("#mainFrame").attr('src',path); |
168 | window.top.loading.show(); | 173 | window.top.loading.show(); |
169 | } | 174 | } |
175 | + function view(url){ | ||
176 | + var path = url | ||
177 | + parent.$("#mainFrame").attr('src',path); | ||
178 | + window.top.loading.show(); | ||
179 | + } | ||
170 | function edit(Id){ | 180 | function edit(Id){ |
171 | var path = '<%=basePath%>homework/goEdit2.do?school_id=${pd.SCHOOL_ID}&HOMEWORK_ID='+Id; | 181 | var path = '<%=basePath%>homework/goEdit2.do?school_id=${pd.SCHOOL_ID}&HOMEWORK_ID='+Id; |
172 | parent.$("#mainFrame").attr('src',path); | 182 | parent.$("#mainFrame").attr('src',path); |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_report.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}成绩报表</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;">课程统计: ${info.testsize}</div></td> | ||
40 | + <td><div style="width:150px;text-align:center;">班级名册: ${info.CLASS_NAME}</div></td> | ||
41 | + | ||
42 | + <td><div style="width:150px;text-align:center;"><span>学生人数: ${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="">全部</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="开始日期" | ||
59 | + title="开始日期" /> | ||
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="结束日期" title="结束日期" /></td> | ||
65 | + <td style="vertical-align:top;padding-left:2px"><a | ||
66 | + class="btn btn-light btn-xs" onclick="tosearch();" title="检索"><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;">姓名</div></th> | ||
77 | + <th class="center "><div style="width:150px;">课程平均得分率</div></th> | ||
78 | + <th class="center"><div style="width:80px;">课程总分</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;">班级课程总分</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;">班级课程平均分</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;">班级课程平均得分率</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 | + //日期框 | ||
161 | + $('.date-picker').datepicker({ | ||
162 | + autoclose : true, | ||
163 | + todayHighlight : true | ||
164 | + }); | ||
165 | + | ||
166 | + //下拉框 | ||
167 | + if (!ace.vars['touch']) { | ||
168 | + $('.chosen-select').chosen({ | ||
169 | + allow_single_deselect : true | ||
170 | + }); | ||
171 | + $(window).off('resize.chosen').on('resize.chosen', function() { | ||
172 | + $('.chosen-select').each(function() { | ||
173 | + var $this = $(this); | ||
174 | + $this.next().css({ | ||
175 | + 'width' : $this.parent().width() | ||
176 | + }); | ||
177 | + }); | ||
178 | + }).trigger('resize.chosen'); | ||
179 | + $(document).on('settings.ace.chosen', | ||
180 | + function(e, event_name, event_val) { | ||
181 | + if (event_name != 'sidebar_collapsed') | ||
182 | + return; | ||
183 | + $('.chosen-select').each(function() { | ||
184 | + var $this = $(this); | ||
185 | + $this.next().css({ | ||
186 | + 'width' : $this.parent().width() | ||
187 | + }); | ||
188 | + }); | ||
189 | + }); | ||
190 | + $('#chosen-multiple-style .btn').on( | ||
191 | + 'click', | ||
192 | + function(e) { | ||
193 | + var target = $(this).find('input[type=radio]'); | ||
194 | + var which = parseInt(target.val()); | ||
195 | + if (which == 2) | ||
196 | + $('#form-field-select-4').addClass( | ||
197 | + 'tag-input-style'); | ||
198 | + else | ||
199 | + $('#form-field-select-4').removeClass( | ||
200 | + 'tag-input-style'); | ||
201 | + }); | ||
202 | + } | ||
203 | + | ||
204 | + //复选框全选控制 | ||
205 | + var active_class = 'active'; | ||
206 | + $('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on( | ||
207 | + 'click', | ||
208 | + function() { | ||
209 | + var th_checked = this.checked;//checkbox inside "TH" table header | ||
210 | + $(this).closest('table').find('tbody > tr').each( | ||
211 | + function() { | ||
212 | + var row = this; | ||
213 | + if (th_checked) | ||
214 | + $(row).addClass(active_class).find( | ||
215 | + 'input[type=checkbox]').eq(0) | ||
216 | + .prop('checked', true); | ||
217 | + else | ||
218 | + $(row).removeClass(active_class).find( | ||
219 | + 'input[type=checkbox]').eq(0) | ||
220 | + .prop('checked', false); | ||
221 | + }); | ||
222 | + }); | ||
223 | + }); | ||
224 | + | ||
225 | + var role = '${pd.ROLE}'; | ||
226 | + | ||
227 | + function precent(avg,total){ | ||
228 | + if(total == 0){ | ||
229 | + return "0%" | ||
230 | + } | ||
231 | + return Math.round(avg / total * 100)/100 + '%' ; | ||
232 | + } | ||
233 | + | ||
234 | + function tosearch(){ | ||
235 | + var url = "<%=basePath%>report/report.do?classid=${info.CLASS_ID}" ; | ||
236 | + var startDate = $("#lastStart").val(); | ||
237 | + var endDate = $("#lastEnd").val(); | ||
238 | + var subject_id = $("#SUBJECT_ID").val(); | ||
239 | + url = url + "&start_date=" + startDate ; | ||
240 | + if(endDate != null){ | ||
241 | + url = url + "&end_date=" + endDate; | ||
242 | + } | ||
243 | + if(subject_id != null){ | ||
244 | + url = url + "&SUBJECT_ID=" + subject_id; | ||
245 | + } | ||
246 | + if(role == "admin"){ | ||
247 | + url = url + "&ROLE=admin" ; | ||
248 | + } | ||
249 | + window.location.href = url; | ||
250 | + window.top.loading.show(); | ||
251 | + /* $("#Form").sumbit(); */ | ||
252 | + } | ||
253 | + | ||
254 | + function student(classid,studentid){ | ||
255 | + | ||
256 | + var url = "<%=basePath%>report/student_report?studentid=" + studentid + "&class_id=" + classid ; | ||
257 | + var startDate = $("#lastStart").val(); | ||
258 | + var endDate = $("#lastEnd").val(); | ||
259 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
260 | + var SUBJECT_ID = $("#SUBJECT_ID").val(); | ||
261 | + if(SUBJECT_ID != null && SUBJECT_ID != ''){ | ||
262 | + url = url + "&SUBJECT_ID="+ SUBJECT_ID ; | ||
263 | + } | ||
264 | + window.self.location.href = url; | ||
265 | + window.top.loading.show(); | ||
266 | + } | ||
267 | + | ||
268 | + function paper(class_id,testpaper_id){ | ||
269 | + var url = "<%=basePath%>report/test_report?TestID=" + testpaper_id + "&class_id=" + class_id; | ||
270 | + var startDate = $("#lastStart").val(); | ||
271 | + var endDate = $("#lastEnd").val(); | ||
272 | + url = url + "&start_date=" + startDate + "&end_date=" + endDate ; | ||
273 | + window.self.location.href = url; | ||
274 | + window.top.loading.show(); | ||
275 | + } | ||
276 | + | ||
277 | + $(document).ready(function(){ | ||
278 | + window.top.loading.remove(); | ||
279 | + | ||
280 | + var sour = "${testpaperList}"; | ||
281 | + | ||
282 | + if(sour != null && sour.length > 3){ | ||
283 | + var _width = $('#mainFrame', parent.document).width()-40; | ||
284 | + var _heigh = $('#mainFrame', parent.document).height()-100; | ||
285 | + var options = { | ||
286 | + width: _width, | ||
287 | + height: _heigh, | ||
288 | + pinnedRows: 4, | ||
289 | + pinnedCols: 3, | ||
290 | + container: "#scrollableTable", | ||
291 | + removeOriginal: true | ||
292 | + }; | ||
293 | + $("#simple-table").tablescroller(options); | ||
294 | + var name_height = $(".kc").last().parent().height()-18.5; | ||
295 | + console.log(name_height); | ||
296 | + $(".th_name").height(name_height); | ||
297 | + } | ||
298 | + | ||
299 | + }); | ||
300 | + | ||
301 | + </script> | ||
302 | + | ||
303 | +</body> | ||
304 | +</html> |
WebRoot/WEB-INF/jsp/sunvote/homework/homework_view.jsp
@@ -62,46 +62,7 @@ | @@ -62,46 +62,7 @@ | ||
62 | <input class="date-picker" type="text" class="form-control" style="width:150px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.COMPLETE_DATE}"/> | 62 | <input class="date-picker" type="text" class="form-control" style="width:150px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value="${pd.COMPLETE_DATE}"/> |
63 | </li> | 63 | </li> |
64 | </c:if> | 64 | </c:if> |
65 | - <!-- <li> | ||
66 | - | ||
67 | - <input type="checkbox" id="class1" name="className" value="1" /> | ||
68 | - <label for="class1"></label> | ||
69 | - <span>1班</span> | ||
70 | - <input class="date-picker" type="text" class="form-control" style="width:200px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
71 | - </li> | ||
72 | - <li> | ||
73 | - | ||
74 | - <input type="checkbox" id="class2" name="className" value="1" /> | ||
75 | - <label for="class2"></label> | ||
76 | - <span>2班</span> | ||
77 | - <input class="date-picker" type="text" class="form-control" style="width:200px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
78 | - </li> | ||
79 | - <li> | ||
80 | - | ||
81 | - <input type="checkbox" id="class3" name="className" value="1" /> | ||
82 | - <label for="class3"></label> | ||
83 | - <span>3班</span> | ||
84 | - <input class="date-picker" type="text" class="form-control" style="width:200px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
85 | - </li> | ||
86 | - <li> | ||
87 | - | ||
88 | - <input type="checkbox" id="class4" name="className" value="1" /> | ||
89 | - <label for="class4"></label> | ||
90 | - <span>4班</span> | ||
91 | - <input class="date-picker" type="text" class="form-control" style="width:200px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
92 | - </li> | ||
93 | - <li> | ||
94 | - <input type="checkbox" id="class5" name="className" value="1" /> | ||
95 | - <label for="class5"></label> | ||
96 | - <span>5班</span> | ||
97 | - <input class="date-picker" type="text" class="form-control" style="width:200px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
98 | - </li> | ||
99 | - <li> | ||
100 | - <input type="checkbox" id="class6" name="className" value="1" /> | ||
101 | - <label for="class6"></label> | ||
102 | - <span>6班</span> | ||
103 | - <input class="date-picker" type="text" class="form-control" style="width:200px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""/> | ||
104 | - </li> --> | 65 | + |
105 | </ul> | 66 | </ul> |
106 | </div> | 67 | </div> |
107 | 68 | ||
@@ -119,9 +80,9 @@ | @@ -119,9 +80,9 @@ | ||
119 | <col width="10%"/> | 80 | <col width="10%"/> |
120 | <thead> | 81 | <thead> |
121 | <tr> | 82 | <tr> |
122 | - <th style="text-align:left;"><span>题目数量</span><span class="add">+</span><input type="number" class="w_100" id="que_num" value="${pd.QUESTION_COUNT==null?0:pd.QUESTION_COUNT}"/><span class="redu">-</span></th> | ||
123 | - <th><span>选项个数</span><span class="add">+</span><input type="number" class="w_100 ans_num" id="ans_num" value="4"/><span class="redu">-</span></th> | ||
124 | - <th><span>分值</span><span class="add">+</span><input type="number" class="w_100 score" id="score" value="1"/><span class="redu">-</span></th> | 83 | + <th style="text-align:left;"><span>题目数量</span><input type="number" class="w_100" id="que_num" value="${pd.QUESTION_COUNT==null?0:pd.QUESTION_COUNT}"/></th> |
84 | + <th><span>选项个数</span><input type="number" class="w_100 ans_num" id="ans_num" value="4"/></th> | ||
85 | + <th><span>分值</span><input type="number" class="w_100 score" id="score" value="1"/></th> | ||
125 | <th></th> | 86 | <th></th> |
126 | </tr> | 87 | </tr> |
127 | </thead> | 88 | </thead> |
@@ -151,9 +112,9 @@ | @@ -151,9 +112,9 @@ | ||
151 | </div> | 112 | </div> |
152 | 113 | ||
153 | </td> | 114 | </td> |
154 | - <td class="middle"><span>选项个数</span><span class="add">+</span><input type="number" class="w_100 ans_num" value="${var.OPTION_NUM}"/><span class="redu">-</span></td> | ||
155 | - <td class="middle"><span>分值</span><span class="add">+</span><input type="number" class="w_100 score" value="${var.SCORE}"/><span class="redu">-</span></td> | ||
156 | - <td class="last"><a class="remove"><img src="static/images/remove.png" /></a></td> | 115 | + <td class="middle"><span>选项个数</span><input type="number" class="w_100 ans_num" value="${var.OPTION_NUM}"/></td> |
116 | + <td class="middle"><span>分值</span><input type="number" class="w_100 score" value="${var.SCORE}"/></td> | ||
117 | + <td class="last"></td> | ||
157 | </tr> | 118 | </tr> |
158 | </c:forEach> | 119 | </c:forEach> |
159 | </c:when> | 120 | </c:when> |
@@ -171,8 +132,8 @@ | @@ -171,8 +132,8 @@ | ||
171 | <div> | 132 | <div> |
172 | <div style="text-align: center;" colspan="10"> | 133 | <div style="text-align: center;" colspan="10"> |
173 | 134 | ||
174 | - <a class="btn btn-mini btn-primary" onclick="save();">确定布置</a> | ||
175 | - <a class="btn btn-mini btn-danger" onclick="window.top.modal.remove();">取消</a> | 135 | + |
136 | + <a class="btn btn-mini btn-danger" onclick="back();">退出</a> | ||
176 | </div> | 137 | </div> |
177 | </div> | 138 | </div> |
178 | <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> | 139 | <div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div> |
@@ -202,83 +163,20 @@ | @@ -202,83 +163,20 @@ | ||
202 | <!--提示框--> | 163 | <!--提示框--> |
203 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> | 164 | <script type="text/javascript" src="static/js/jquery.tips.js"></script> |
204 | <!--页面交互--> | 165 | <!--页面交互--> |
205 | - <script src="static/js/control_homework.js?t=1"></script> | 166 | + |
206 | <script> | 167 | <script> |
207 | - var homework_id="${pd.HOMEWORK_ID}"; | ||
208 | 168 | ||
209 | $(function() { | 169 | $(function() { |
210 | window.top.loading.remove(); | 170 | window.top.loading.remove(); |
211 | - work.que_num=parseInt($("#que_num").val()); | ||
212 | - //日期框 | ||
213 | - $(document).on("focus",".date-picker",function(){ | ||
214 | - $(this).datepicker({ | ||
215 | - autoclose: true, | ||
216 | - todayHighlight: true | ||
217 | - }); | ||
218 | - }); | ||
219 | - if(${pd.CLASS_ID==null}==true){ | ||
220 | - $.ajax({ //获取该名教师下的班级信息 | ||
221 | - url:'<%=basePath%>coursemanagement/teacherClass', | ||
222 | - type:"get", | ||
223 | - data:{teacher_id:"${pd.TEACHER_ID}"}, | ||
224 | - success:function(res){ | ||
225 | - console.log(res); | ||
226 | - if(res.data.length>0){ | ||
227 | - var _html=""; | ||
228 | - $.each(res.data,function(k,v){ | ||
229 | - _html+='<li><input type="checkbox" id="class'+k+'" name="className" value="'+v.ID+'"><label for="class'+k+'"></label><span>'+v.CLASS_NAME+'</span><input class="date-picker" type="text" style="width:150px;text-align:center;" placeholder="完成日期" name="lastStart" id="lastStart" data-date-format="yyyy-mm-dd" readonly="readonly" value=""></li>'; | ||
230 | - | ||
231 | - }); | ||
232 | - $(".classBox ul").html(_html); | ||
233 | - } | ||
234 | - } | ||
235 | - }); | ||
236 | - } | ||
237 | - | ||
238 | - | ||
239 | }); | 171 | }); |
240 | - | ||
241 | - function save_data(data){ | ||
242 | - $.ajax({ //获取该名教师下的班级信息 | ||
243 | - url:'<%=basePath%>homework/uploadHomework', | ||
244 | - type:"post", | ||
245 | - dataType:"text", | ||
246 | - data:{"JSON":data}, | ||
247 | - success:function(res){ | ||
248 | - var res=JSON.parse(res); | ||
249 | - if(res.message=="success"){ | ||
250 | - alert(res.message); | ||
251 | - console.log(res); | ||
252 | - | ||
253 | - var path = '<%=basePath%>homework/list.do?teacher_id=${pd.TEACHER_ID}'; | ||
254 | - parent.$("#mainFrame").attr('src',path); | ||
255 | - window.top.loading.show(); | ||
256 | - } | ||
257 | - | ||
258 | - } | ||
259 | - }); | ||
260 | - } | ||
261 | - function up_data(data){ | ||
262 | - $.ajax({ //获取该名教师下的班级信息 | ||
263 | - url:'<%=basePath%>homework/updateHomework', | ||
264 | - type:"post", | ||
265 | - dataType:"text", | ||
266 | - data:{"JSON":data}, | ||
267 | - success:function(res){ | ||
268 | - var res=JSON.parse(res); | ||
269 | - if(res.message=="success"){ | ||
270 | - alert(res.message); | ||
271 | - console.log(res); | ||
272 | - | ||
273 | - var path = '<%=basePath%>homework/list.do?teacher_id=${pd.TEACHER_ID}'; | ||
274 | - parent.$("#mainFrame").attr('src',path); | ||
275 | - window.top.loading.show(); | ||
276 | - | ||
277 | - } | ||
278 | - } | ||
279 | - }); | 172 | + function back(){ |
173 | + var path = '<%=basePath%>homework/list.do?teacher_id=${pd.TEACHER_ID}'; | ||
174 | + parent.$("#mainFrame").attr('src',path); | ||
175 | + window.top.loading.show(); | ||
280 | } | 176 | } |
281 | 177 | ||
178 | + | ||
179 | + | ||
282 | </script> | 180 | </script> |
283 | </body> | 181 | </body> |
284 | </html> | 182 | </html> |
285 | \ No newline at end of file | 183 | \ No newline at end of file |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | <p id="practice_do" onclick="event.stopPropagation();homeWork('${SCHOOL_ID}')">布置练习</p> | 106 | <p id="practice_do" onclick="event.stopPropagation();homeWork('${SCHOOL_ID}')">布置练习</p> |
107 | </li> | 107 | </li> |
108 | <li> | 108 | <li> |
109 | - <p id="practice_report">练习报表</p> | 109 | + <p id="practice_report" onclick="event.stopPropagation();homeReport('${SCHOOL_ID}')">练习报表</p> |
110 | </li> | 110 | </li> |
111 | </ul> | 111 | </ul> |
112 | </div> | 112 | </div> |
@@ -193,6 +193,13 @@ | @@ -193,6 +193,13 @@ | ||
193 | window.top.loading.show(); | 193 | window.top.loading.show(); |
194 | } | 194 | } |
195 | 195 | ||
196 | + function homeReport(schoolId){ | ||
197 | + var path = '<%=basePath%>homework/report.do?teacher_id=${pd.TEACHER.ID}&ID=' + schoolId ; | ||
198 | + | ||
199 | + $("#mainFrame").attr('src',path); | ||
200 | + window.top.loading.show(); | ||
201 | + } | ||
202 | + | ||
196 | function report(classId){ | 203 | function report(classId){ |
197 | //window.open('<%=basePath%>report/report.do?classid=' + classId); | 204 | //window.open('<%=basePath%>report/report.do?classid=' + classId); |
198 | //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){ | 205 | //if($("#mainFrame").attr('src') != ('<%=basePath%>report/report.do?classid=' + classId)){ |
src/com/fh/controller/sunvote/homework/HomeworkController.java
@@ -202,7 +202,7 @@ public class HomeworkController extends BaseController { | @@ -202,7 +202,7 @@ public class HomeworkController extends BaseController { | ||
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | - * 去修改页面 | 205 | + * 去预览页面 |
206 | * | 206 | * |
207 | * @param | 207 | * @param |
208 | * @throws Exception | 208 | * @throws Exception |
@@ -215,7 +215,28 @@ public class HomeworkController extends BaseController { | @@ -215,7 +215,28 @@ public class HomeworkController extends BaseController { | ||
215 | pd = homeworkService.findById(pd); // 根据ID读取 | 215 | pd = homeworkService.findById(pd); // 根据ID读取 |
216 | pd.put("QUESTIONS", homeworkproblemService.listProblem(pd)); | 216 | pd.put("QUESTIONS", homeworkproblemService.listProblem(pd)); |
217 | pd.put("TEACHER_ID", geTeacherID()); | 217 | pd.put("TEACHER_ID", geTeacherID()); |
218 | - mv.setViewName("sunvote/homework/homework_edit2"); | 218 | + mv.setViewName("sunvote/homework/homework_view"); |
219 | + mv.addObject("msg", "edit"); | ||
220 | + mv.addObject("operation", "view"); | ||
221 | + mv.addObject("pd", pd); | ||
222 | + return mv; | ||
223 | + } | ||
224 | + | ||
225 | + /** | ||
226 | + * 去查看报表页面 | ||
227 | + * | ||
228 | + * @param | ||
229 | + * @throws Exception | ||
230 | + */ | ||
231 | + @RequestMapping(value = "/report") | ||
232 | + public ModelAndView report() throws Exception { | ||
233 | + ModelAndView mv = this.getModelAndView(); | ||
234 | + PageData pd = new PageData(); | ||
235 | + pd = this.getPageData(); | ||
236 | + pd = homeworkService.findById(pd); // 根据ID读取 | ||
237 | + pd.put("QUESTIONS", homeworkproblemService.listProblem(pd)); | ||
238 | + pd.put("TEACHER_ID", geTeacherID()); | ||
239 | + mv.setViewName("sunvote/homework/homework_report"); | ||
219 | mv.addObject("msg", "edit"); | 240 | mv.addObject("msg", "edit"); |
220 | mv.addObject("operation", "view"); | 241 | mv.addObject("operation", "view"); |
221 | mv.addObject("pd", pd); | 242 | mv.addObject("pd", pd); |