<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>成绩复核</title>
    <meta name="decorator" content="default"/>
    <%@include file="/WEB-INF/views/include/head.jsp" %>
    <style type="text/css">
    .sort {
        color: #0663A2;
        cursor: pointer;
    }
    </style>
</head>
<body>
<form id="searchForm" action="${ctx}/admin/exam/inspected/import/list" method="post" class="breadcrumb form-search" >
    <input type="hidden" id="pageNumber" name="pageNumber" value="${query.pageNumber }"/>
    <input type="hidden" id="pageSize" name="pageSize" value="${query.pageSize }"/>
    <div>
        <input id="reset-button" class="btn btn-primary" type="button" value="重置" onclick="goReset()"/>
        &nbsp;
        <input id="export-button" class="btn" type="button" value="错误日志" onclick="goExport()"/>
        &nbsp;
        <a target="_blank"   class="btn" href="${ctx}/web/admin/exam/inspected/import/start">批量复核:${inspectCount }</a>
        &nbsp;
        <input id="export-button" class="btn" type="button" value="导出标记卷" onclick="goTagExport()"/>
        
    </div>
</form>
<tags:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>科目</th>
        <th>学号</th>
        <th>标记卷</th>
        <th>试卷总分</th>
        <th>得分明细</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${query.result}" var="result">
        <tr>
            <td>${result.subjectCode}-${result.subjectName}</td>
            <td>${result.studentCode}</td>
            <td><c:if test="${result.tagValue=='1'}"><i class="icon-star"></i></c:if></td>
            <td><fmt:formatNumber pattern="###.###" value="${result.totalScore}"/></td>
            <td>
            	<c:choose>
            		<c:when test="${result.absent == true || result.upload == false}">
                        缺考
                    </c:when>
                     <c:when test="${result.breach == true}">
                        违纪
                    </c:when>
                    <c:otherwise>
                        ${result.subjectiveScoreList}
                    </c:otherwise>
            	</c:choose>
            </td>
            <td>
            	<c:choose>
            		<c:when test="${result.absent == true || result.upload == false}">
                    </c:when>
                    <c:otherwise>
						<a target="_blank" href="${ctx}/web/admin/exam/inspected/import/start?studentId=${result.id}&subjectCode=${result.subjectCode}">进入复核</a>
                    </c:otherwise>
            	</c:choose>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${query}</div>
<script type="text/javascript">
    function page(n, s) {
        $("#pageNumber").val(n);
        $("#searchForm").attr('target', "_self");
        $("#searchForm").attr('action', '${ctx}/admin/exam/inspected/import/list');
        $("#searchForm").submit();
        return false;
    }
    function goSearch() {
        $("#pageNumber").val(1);
        $("#searchForm").attr('target', "_self");
        $("#searchForm").attr('action', '${ctx}/admin/exam/inspected/import/list');
        $("#searchForm").submit();
        return false;
    }
    function goExport() {
        $("#searchForm").attr('action', '${ctx}/admin/exam/inspected/import/export');
        $("#searchForm").submit();
    }
    function goReset() {
    	$("#searchForm").attr('target', "");
        $("#searchForm").attr('action', '${ctx}/admin/exam/inspected/import/reset');
        $("#searchForm").submit();
    }
    function goTagExport() {
        $("#searchForm").attr('action', '${ctx}/admin/exam/inspected/import/exportTag');
        $("#searchForm").submit();
    }
</script>
</body>
</html>