<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>阅卷平台高校版</title>
    <link href="${ctxStatic}/mark-new/css/bootstrap.css" rel="stylesheet" type="text/css"/>
    <link href="${ctxStatic}/mark-new/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/json2.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery.min.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery-ui.min.js "></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/jquery.mousewheel.min.js"></script>
    <script type="text/javascript" src="${ctxStatic}/iviewer/jquery.iviewer.js"></script>
    <link rel="stylesheet" href="${ctxStatic}/iviewer/jquery.iviewer.css" rel="stylesheet"/>
    <script src="${ctxStatic}/perfect-scrollbar/min/perfect-scrollbar.min.js"></script>
    <link href="${ctxStatic}/perfect-scrollbar/min/perfect-scrollbar.min.css" rel="stylesheet">
    <script src="${ctxStatic}/i18n/jquery.i18n.properties.js" type="text/javascript"></script>
    <script src="${ctxStatic}/i18n/load.js" type="text/javascript"></script>
    <script src="${ctxStatic}/rich-text/js/render.js"></script>
    <link href="${ctxStatic}/rich-text/css/rich-text.css" rel="stylesheet">
    <script type="text/javascript" src="${ctxStatic}/viewer/viewer.js"></script>
    <link href="${ctxStatic}/viewer/viewer.css" rel="stylesheet">
    <script type="text/javascript" src="${ctxStatic}/mark-json/js/mark-control.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-json/js/json-view.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-json/js/json-loader.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/task-control.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/paper-view.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/image-builder.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-board.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-history.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-status.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/warning-info.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/change-name.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/view-sidebar.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/problem-process.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/switch-group.js"></script>
</head>
<body>
<div class="container-fluid" id="container"></div>
<script type="text/javascript">
	$(document).ajaxError(function (evt, req, settings) {
	    if (req.status == 401) {
	        alert("账号已在其他地方登录！");
	        window.location.href = '/mark-login';
	    }
	});
	
    $(document).ready(function () {
        var mc = new MarkControl({
            container: $('#container'),
            staticServer: '${ctxStatic}',
            imageServer: '${fileServer}',
            userId: '${marker.id}',
            userName: '${web_user.name}',
            logoutUrl: '${ctx}/mark/logout',
            //clearUrl: '${ctx}/mark/clear',
            /* 	<c:if test="${forceMode==false}">
				switchTrackUrl: '${ctx}/mark/index?mode=track',
				</c:if>
				forceSpecialTag : eval('${forceSpecialTag}'.toLowerCase()), */
            <c:if test="${defaultSetting!=null}">
            defaultSetting: '${defaultSetting}',
            </c:if>
            settingSyncUrl: '${ctx}/mark/update-setting',
            modules: {
                'json-loader': {
                    jsonServer: '${fileServer}'
                },
                'json-view': {},
                'mark-status': {
                    simple: false,
                    subjectSelectUrl: '${ctx}/mark/subject-select',
                    subjectName: '${subject.displayName}_${marker.groupNumber}'
                },
                'mark-history': {
                    pageSize: 10
                },
                'mark-board': {
                    showScoreBoard: false,
                    autoSubmit: false,
                    needConfirm: false,
                },
                'warning-info': {},
                <c:if test="${isFormal==true}">
                'problem-process': {
                    problemTypes: '${problemTypes}'
                },
                </c:if>
                'change-name': {
                    url: '${ctx}/mark/change-name'
                },
                'switch-group': {
                    url: '${ctx}/mark/subject-select',
                    groups:'${groups}'
                }
            }
        });
        mc.start({
            mode: 'loop',
            statusUrl: '${ctx}/mark/status',
            getUrl: '${ctx}/mark/gettask',
            historyUrl: '${ctx}/mark/gethistory',
            submitUrl: '${ctx}/mark/savetask'
            //clearUrl : '${ctx}/mark/clear'
        });
    });
</script>
</body>
</html>