homework_report.jsp 9.53 KB
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="myelfun" uri="/WEB-INF/tld/elfun.tld"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>${info.CLASS_NAME}成绩报表</title>
<base href="<%=basePath%>">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
  <link type="text/css" href="static/css/tablescroller.css" rel="stylesheet" />

<!-- <link
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
	rel="stylesheet"> -->
	<link rel="stylesheet" href="static/css/bootstrap.min.css" />
<!-- 日期框 -->
<link rel="stylesheet" href="static/ace/css/datepicker.css" />

<link rel="stylesheet" href="static/css/teach.css" />
<style>
	.font span{    font-size: 12px;
    font-weight: initial;color:#000;}
    .search_btn{width:30px;}
    .btn{margin:0 5px;}
    .center{height:39px;}
    .box_header{position:fixed;top:0;left:0;width:100%;}
    .clear{clear:both}
    ul{
    	padding:0;
    }
	.list{
		width:120px;
		height:40px;
		line-height:40px;
		font-weight:bold;
		text-align:center;
		margin-right:10px;
		margin-top:10px;
		float:left;
		list-style:none;
		border:1px solid #ddd;
	}
	.correct{
		color:#28be56;
	}
	.erro{
		color:#ff5353;
	}
	.overall h3,.single h3{
		font-size:16px;
		font-weight:bold;
	}
	.single{
		margin-top:50px;
	}
	.q_charts{
		width:100%;
		height:200px;
	}
	.rel{
		width:20px;
		height:100%;
	}
	.ans_correct{
		background:#f00;
	}
	.ans_error{
		background:#ff0;
	}
	.ans_list{
		display:inline-block;
		
		margin:0 10px;
	}
	.ans_list p{
		margin:0;
		line-height:20px;
	}
	.p_num{
		
	}
	
	</style>
</head>

<body style="background:#fff;height:auto;">
<div class="box_header">
	<div class="head_box_l">
		<p>
			<span class="right_b"></span>练习报表
		</p>
	</div>						
	<div class="clear"></div>
</div>
<div style="padding:0 20px;padding-top:3%;margin-top:102px;">
	<div class="overall">
		<h3>作业总体情况:</h3>
		<table class="table table-bordered ">
			<col style="width: 20%" />
			<col style="width: 20%" />
			<col style="width: 20%" />
			<col style="width: 20%" />
			<col style="width: 20%" />
			<tbody>
				<tr>
					<td>提交情况:25/30</td>
					<td>题量:10</td>
					<td>最高得分率:100%</td>
					<td>最低得分率:10%</td>
					<td>平均得分率:60%</td>
				</tr>
				<tr>
					<td colspan="5">未提交人:张三、李四</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="single">
		<h3>单题正确率详情:</h3>
		<ul>
			<li class="list correct">1(60%)</li>
			<li class="list erro">2(60%)</li>
			<li class="list correct">3(60%)</li>
			<li class="list correct">4(60%)</li>
			<li class="list correct">5(60%)</li>
			<li class="list correct">6(60%)</li>
			<li class="list correct">7(60%)</li>
			<li class="list correct">8(60%)</li>
			<li class="list correct">9(60%)</li>
			<li class="list correct">10(60%)</li>
			<li class="list correct">11(60%)</li>
			<li class="list correct">12(60%)</li>
		</ul>
		<div class="clear"></div>
	</div>

</div>

	<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document" style="z-index:1041">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">第一题【3分】</h4>
      </div>
      <div class="modal-body">
        <p>正确答案:D  得分率:84%</p>
        <div class="q_charts">
        	<div class="ans_list" style="height:50px;">
        		<p class="p_num">8人</p>
        		<div class="rel ans_correct"></div>
        		<p class="ans_option">A</p>
        	</div>
        	<div class="ans_list" style="height:100px;">
        		<p class="p_num">8人</p>
        		<div class="rel ans_correct"></div>
        		<p class="ans_option">A</p>
        	</div>
        </div>
      </div>
    </div>
  </div>
</div>	
		
	

	<%@ include file="../../system/index/foot.jsp"%>
	<script src="static/ace/js/bootbox.js"></script>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<!-- 日期框 -->
	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>

 	<script language="javascript" src="static/js/tablescroller.js"></script>
    <script language="javascript" src="static/js/tablescroller.jquery.js"></script>
    
  
    
	<script type="text/javascript">
		$(function() {
			
			//日期框
			$('.date-picker').datepicker({
				autoclose : true,
				todayHighlight : true
			});

			//下拉框
			if (!ace.vars['touch']) {
				$('.chosen-select').chosen({
					allow_single_deselect : true
				});
				$(window).off('resize.chosen').on('resize.chosen', function() {
					$('.chosen-select').each(function() {
						var $this = $(this);
						$this.next().css({
							'width' : $this.parent().width()
						});
					});
				}).trigger('resize.chosen');
				$(document).on('settings.ace.chosen',
						function(e, event_name, event_val) {
							if (event_name != 'sidebar_collapsed')
								return;
							$('.chosen-select').each(function() {
								var $this = $(this);
								$this.next().css({
									'width' : $this.parent().width()
								});
							});
						});
				$('#chosen-multiple-style .btn').on(
						'click',
						function(e) {
							var target = $(this).find('input[type=radio]');
							var which = parseInt(target.val());
							if (which == 2)
								$('#form-field-select-4').addClass(
										'tag-input-style');
							else
								$('#form-field-select-4').removeClass(
										'tag-input-style');
						});
			}

			//复选框全选控制
			var active_class = 'active';
			$('#simple-table > thead > tr > th input[type=checkbox]').eq(0).on(
					'click',
					function() {
						var th_checked = this.checked;//checkbox inside "TH" table header
						$(this).closest('table').find('tbody > tr').each(
								function() {
									var row = this;
									if (th_checked)
										$(row).addClass(active_class).find(
												'input[type=checkbox]').eq(0)
												.prop('checked', true);
									else
										$(row).removeClass(active_class).find(
												'input[type=checkbox]').eq(0)
												.prop('checked', false);
								});
					});
		});
		
		var role = '${pd.ROLE}';
		
		function precent(avg,total){
			if(total == 0){
				return "0%"
			}
			return Math.round(avg / total * 100)/100 + '%' ;
		}
		
		function homeReport(classId){
			var path = '<%=basePath%>homework/report.do?School_id=${pd.SCHOOL_ID}&CLASS_ID='+classId;
			console.log(path);
			parent.$("#mainFrame").attr('src',path);
			window.top.loading.show();
		}
		
		function tosearch(){
			
			var url = "<%=basePath%>homework/report.do?CLASS_ID=${pd.CLASS_ID}" ;
			var startDate = $("#lastStart").val();
			var endDate =  $("#lastEnd").val();
			//var subject_id =  $("#SUBJECT_ID").val();
			url = url + "&START_DATE=" + startDate ;
			if(endDate != null){
				url = url + "&END_DATE=" + endDate;
			}

			window.location.href = url;
			window.top.loading.show();
			/* $("#Form").sumbit(); */
		}
		function tosearch_week(type){   //上一周 本周 下一周
			console.log('${pd.CLASS_ID}');
			var url = "<%=basePath%>homework/report.do?CLASS_ID=${pd.CLASS_ID}" ;
			url = url + "&CURRENT_WEEK=" + type ;
			
			console.log(url);
			window.location.href = url;
			window.top.loading.show();
			/* $("#Form").sumbit(); */
		}
		
		function student(classid,studentid){
		
			var url = "<%=basePath%>homework/student.do?STUDENT_ID=" + studentid + "&CLASS_ID=" + classid ;
			var startDate = $("#lastStart").val();
			var endDate =  $("#lastEnd").val();
			url = url + "&START_DATE=" + startDate + "&END_DATE=" + endDate ;
			
			window.location.href = url;
			window.top.loading.show();
		}
		
		function paper(class_id,testpaper_id){
			var url = "<%=basePath%>homework/homework_report?HOMEWORK_ID=" + testpaper_id + "&CLASS_ID=" + class_id;
			var startDate = $("#lastStart").val();
			var endDate =  $("#lastEnd").val();
			url = url + "&START_DATE=" + startDate + "&END_DATE=" + endDate ;
			window.self.location.href = url;
			window.top.loading.show();
		}
		
		$(document).ready(function(){
			window.top.loading.remove();
			
			 var sour = "${pd.DATA.HOMEWORKS}";
			
			
			 if(sour != null && sour.length > 3){
				var _width = $('#mainFrame', parent.document).width()-40;
				var _heigh = $('#mainFrame', parent.document).height()-350;
				var options = {
	            width: _width,
	            height: _heigh,
	            pinnedRows: 5,
	            pinnedCols: 4,
	            container: "#scrollableTable",
	            removeOriginal: true
	        	};
				$("#simple-table").tablescroller(options);
		        var name_height = $(".kc").last().parent().height()-18.5;
		        console.log(name_height);
		        $(".th_name").height(name_height);
			} 
			 
			 
			 $(document).on("click",".list",function(){
				 $('#myModal').modal('toggle')
			 })
				
		});
		
	</script>

</body>
</html>