<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MarkPaper2.aspx.cs" Inherits="Admin_Marking_MarkPaper2" %>

<!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 runat="server">
    <title>人工评卷</title>
 <link href="../../StyleSheet.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
    .txtBlank
    {
            width:30px;
    }
     .divContent
        {
             overflow:auto;
              width:770px;
              margin:5px;
        }
       .txt
       {
            border-width:0;
            border-bottom:solid 1px black;
       }
       .answerByTester
       {
         color:Green;
         margin:2px 2px 2px 2px;
       }
       .scoresForTester
       {
           color:Green;
       }
        .scoresForTester .txt
        {
            border-bottom:solid 1px green;
        }
    </style>
    <script type="text/javascript">
    
    //计算各类题型的总得分
    function getTotalScoresForTesterOfSubject(rptID,lblCountID,lblTotalScoresID,txtTotalScoresID)
    {
        var e=document.getElementById(lblCountID);
        var count=Number(e.innerText);
        var totalScores=0;
       
        for(var i=0; i<count; i++)
        {
            var str1=rptID+"_ctl";
            if(i<9)
                str1=str1+"0";
            var id=str1+(i+1)+"_"+txtTotalScoresID;
            var scores=document.getElementById(id).value;
            if(scores=="" || null==scores)
                scores=0;
            totalScores+=Number(scores);
        }
        
        document.getElementById(lblTotalScoresID).innerText=totalScores;
        
        getTotalScoresForTester()
    }
    
    function getTotalScoresForTester()
    {
        var n1=document.getElementById("lblFillBlankTotalScoresForTester").innerText;
        var n2=document.getElementById("lblJudgeTotalScoresForTester").innerText;
        var n3=document.getElementById("lblSingleSelectionTotalScoresForTester").innerText;
        var n4=document.getElementById("lblMultiSelectionTotalScoresForTester").innerText;
        var n5=document.getElementById("lblSimpleAnswerTotalScoresForTester").innerText;
        var sum=Number(n1)+Number(n2)+Number(n3)+Number(n4)+Number(n5);

        document.getElementById("txtTotalScoresForTester").value=sum;
    }
    
      function dispTitle()
    {
            var e1=document.getElementById("lblFillBlankListCount");
            if(e1.innerText=="0")
                {
                    var e=document.getElementById("trFillBlank");
                    e.style.display="none";
                }
             
            var e2=document.getElementById("lblJudgeListCount");
            if(e2.innerText=="0")
                {
                    var e=document.getElementById("trJudge");
                    e.style.display="none";
                }
             
            var e3=document.getElementById("lblSingleSelectionCount");
            if(e3.innerText=="0")
                {
                    var e=document.getElementById("trSingleSelection");
                    e.style.display="none";
                }   
             
            var e4=document.getElementById("lblMultiSelectionCount");
            if(e4.innerText=="0")
                {
                    var e=document.getElementById("trMultiSelection");
                    e.style.display="none";
                }
                
           var e5=document.getElementById("lblSimpleAnswerCount");
            if(e5.innerText=="0")
                {
                    var e=document.getElementById("trSimpleAnswer");
                    e.style.display="none";
                }
      }   
    </script>
</head>
<body onload="dispTitle()">
    <form id="form1" runat="server">
            <table cellpadding="0" cellspacing="0" class="form" width="800px">
                <tr>
                    <td class="formName" align="left">
                     <span style="margin-left:10px">人工评卷</span>
                    </td>
                </tr>
                <tr id="trFillBlank">
                    <td class="titleName" style="text-align:left; font-weight:bold;">
                        填空题(<asp:Label ID="lblFillBlankListCount" runat="server" Text="0"></asp:Label>)
                        每题<asp:Label ID="lblFillBlankScores" runat="server" Text="0"></asp:Label>
                        分 共<asp:Label ID="lblFillBlankTotalScores" runat="server" Text="0"></asp:Label>
                        分 共得<asp:Label ID="lblFillBlankTotalScoresForTester" runat="server" Text="0"></asp:Label>分</td>
                </tr>
                
                 <tr>
                    <td >
                    <div style="text-align:left;">
                          <asp:Repeater ID="rptSubjectOfFillBlankList" runat="server" 
                    >
                    <HeaderTemplate>
                    <table cellpadding="0" cellspacing="0" class="tableList" width="800">
                    </HeaderTemplate>
                <ItemTemplate>
                     <tr >
                        <td >
                            <asp:HiddenField ID="hidFillBlankID" runat="server" Value='<%#Eval("ID") %>' />
                           <div>(<%#Eval("Index")%>) <%#Eval("Question")%> <span class="scoresForTester">得<asp:TextBox runat="server" ID="txtFillBlankScoresForTester" CssClass="txt scoresForTester" Width="20px"  Text='<%#Eval("ScoresForTester") %>'  onkeyup="getTotalScoresForTesterOfSubject('rptSubjectOfFillBlankList','lblFillBlankListCount','lblFillBlankTotalScoresForTester','txtFillBlankScoresForTester');"></asp:TextBox>分</span> </div>
                            <span class="answerByTester">回答：<%#Eval("AnswerByTester") %></span>
                            <span style="color:Red"> 答案：<%# Eval("Answer")%></span></td>
                    </tr>     
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
               </asp:Repeater>
                        </div>
                   
                        </td>
                </tr>
                 <tr id="trJudge">
                    <td class="titleName" style="text-align:left; font-weight:bold;">
                       判断题(<asp:Label ID="lblJudgeListCount" runat="server" Text="0"></asp:Label>)
                        每题<asp:Label ID="lblJudgeScores" runat="server" Text="0"></asp:Label>
                        分 共<asp:Label ID="lblJudgeTotalScores" runat="server" Text="0"></asp:Label>
                        分 共得<asp:Label ID="lblJudgeTotalScoresForTester" runat="server" Text="0"></asp:Label>分 
                         <span style="color:Red;font-weight:normal;">说明：系统已自动给出分数，但是分数可以修改</span>
                        </td>
                </tr>
                
                 <tr>
                    <td >
                      <div style="text-align:left;">
                          <asp:Repeater ID="rptSubjectOfJudgeList" runat="server" 
                    >
                    <HeaderTemplate>
                    <table cellpadding="0" cellspacing="0" class="tableList" width="800">
                    </HeaderTemplate>
                <ItemTemplate>
                     <tr >
                        <td >
                         <asp:HiddenField ID="hidJudgeID" runat="server" Value='<%#Eval("ID") %>' />
                        <div> (<%#Eval("Index")%>) <%#Eval("Question")%> (  )
                         <span class="scoresForTester">得<asp:TextBox runat="server" ID="txtJudgeScoresForTester" CssClass="txt scoresForTester" Width="20px"  Text='<%#Eval("ScoresForTester") %>'  onkeyup="getTotalScoresForTesterOfSubject('rptSubjectOfJudgeList','lblJudgeListCount','lblJudgeTotalScoresForTester','txtJudgeScoresForTester');"></asp:TextBox>分 </span></div>
                          <span class="answerByTester">回答：<%#(bool)Eval("AnswerByTester") ? "Y" : "N"%></span> <span style="color:Red">答案：<%#(bool)Eval("Answer") ? "Y" : "N"%></span>
                         </td>
                    </tr>     
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
               </asp:Repeater>
                        </div>
                    </td>
                </tr>
                  <tr id="trSingleSelection">
                    <td class="titleName" style="text-align:left; font-weight:bold;">
                        单选题(<asp:Label ID="lblSingleSelectionCount" runat="server" Text="0"></asp:Label>)
                        每题<asp:Label ID="lblSingleSelectionScores" runat="server" Text="0"></asp:Label>
                        分 共<asp:Label ID="lblSingleSelectionTotalScores" runat="server" Text="0"></asp:Label>
                        分 共得<asp:Label ID="lblSingleSelectionTotalScoresForTester" runat="server" Text="0"></asp:Label>分 
                        <span style="color:Red; font-weight:normal;">说明：系统已自动给出分数，但是分数可以修改</span></td>
                </tr>
                
                 <tr>
                    <td>
                    
                    <div style="text-align:left">
                     <asp:Repeater ID="rptSubjectOfSingleSelectionList" runat="server" 
                   >
               <HeaderTemplate>
                     <table cellpadding="0" cellspacing="0" class="tableList" width="800">
                </HeaderTemplate>
                <ItemTemplate>
                     <tr >
                        <td >
                        <asp:HiddenField ID="hidSingleSelectionID" runat="server" Value='<%#Eval("ID") %>' />
                        <div>
                        <b>
                         (<%#Eval("Index")%>)  <%#Eval("Question") %> (  )
                         </b>
                         <span class="scoresForTester">得<asp:TextBox runat="server" ID="txtSingleSelectionScoresForTester" CssClass="txt scoresForTester" Width="20px" Text='<%#Eval("ScoresForTester") %>'  onkeyup="getTotalScoresForTesterOfSubject('rptSubjectOfSingleSelectionList','lblSingleSelectionCount','lblSingleSelectionTotalScoresForTester','txtSingleSelectionScoresForTester');"></asp:TextBox>分</span>
                          </div>
                           <table width="100%">
                           <tr align="left"><td style="width:50%">A:<%#Eval("SelectA")%></td><td>B:<%#Eval("SelectB")%></td></tr>
                            <tr align="left"><td style="width:50%">C:<%#Eval("SelectC")%></td><td>D:<%#Eval("SelectD")%></td></tr>
                           </table>
                           <span class="answerByTester">回答：<%# Eval("AnswerByTester")%></span> <span style="color:Red;"> 答案：<%# Eval("Answer")%></span>
                            </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                     </table>
                </FooterTemplate>
               </asp:Repeater>
                    </div>
                   </td>
                </tr>
                  <tr id="trMultiSelection">
                    <td class="titleName" style="text-align:left; font-weight:bold;">
                        多选题(<asp:Label ID="lblMultiSelectionCount" runat="server" Text="0"></asp:Label>)
                        每题<asp:Label ID="lblMultiSelectionScores" runat="server" Text="0"></asp:Label>
                        分 共<asp:Label ID="lblMultiSelectionTotalScores" runat="server" Text="0"></asp:Label>
                        分 共得<asp:Label ID="lblMultiSelectionTotalScoresForTester" runat="server" Text="0"></asp:Label>分<span style="color:Red; font-weight:normal;">说明：系统已对答案答全的自动给出分数，但是分数可以修改</span>
                      </td>
                </tr>
                
                 <tr>
                    <td >
                      <div style="text-align:left">
                     <asp:Repeater ID="rptSubjectOfMultiSelectionList" runat="server" 
                   >
               <HeaderTemplate>
                     <table cellpadding="0" cellspacing="0" class="tableList" width="800">
                </HeaderTemplate>
                <ItemTemplate>
                     <tr >
                        <td >
                        <asp:HiddenField ID="hidMultiSelectionID" runat="server" Value='<%#Eval("ID") %>' />
                        <div>
                        <b>
                         (<%#Eval("Index")%>)  <%#Eval("Question")%> (  )
                         </b>
                         <span class="scoresForTester">得<asp:TextBox runat="server" ID="txtMultiSelectionScoresForTester" CssClass="txt scoresForTester" Width="20px" Text='<%#Eval("ScoresForTester") %>' onkeyup="getTotalScoresForTesterOfSubject('rptSubjectOfMultiSelectionList','lblMultiSelectionCount','lblMultiSelectionTotalScoresForTester','txtMultiSelectionScoresForTester');"></asp:TextBox>分</span>
                           </div>
                           <table width="100%">
                           <tr align="left"><td style="width:50%">A:<%#Eval("SelectA")%></td><td>B:<%#Eval("SelectB")%></td></tr>
                            <tr align="left"><td style="width:50%">C:<%#Eval("SelectC")%></td><td>D:<%#Eval("SelectD")%></td></tr>
                           </table>
                           <span class="answerByTester">回答：<%# Eval("AnswerByTester")%></span> <span style="color:Red;">答案：<%# Eval("Answer")%></span>
                            </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                     </table>
                </FooterTemplate>
               </asp:Repeater>
                    </div>
                    </td>
                </tr>
                  <tr id="trSimpleAnswer">
                    <td class="titleName" style="text-align:left; font-weight:bold;">
                        简答题(<asp:Label ID="lblSimpleAnswerCount" runat="server" Text="0"></asp:Label>)&nbsp; 
                        共<asp:Label ID="lblSimpleAnswerTotalScores" runat="server" Text="0"></asp:Label>
                        分 共得<asp:Label ID="lblSimpleAnswerTotalScoresForTester" runat="server" Text="0"></asp:Label>分</td>
                </tr>
                
                 <tr>
                    <td >
                    <asp:Repeater ID="rptSubjectOfSimpleAnswerList" runat="server" 
                    >
                <HeaderTemplate>
                     <table cellpadding="0" cellspacing="0" class="tableList" width="800">
                </HeaderTemplate>
                <ItemTemplate>
                     <tr >
                        <td >
                        <asp:HiddenField ID="hidSimpleAnswerID" runat="server" Value='<%#Eval("ID") %>' />
                        <div style="width:20px;  float:left; margin:0;margin-top:5px;">(<%#Eval("Index")%>)</div>
                        <div class="divContent">
                          <%#Eval("Question")%>(<%#Eval("Scores")%>分)
                          <span class="scoresForTester">得<asp:TextBox runat="server" ID="txtSimpleAnswerScoresForTester" CssClass="txt scoresForTester" Width="20px" Text='<%#Eval("ScoresForTester") %>' onkeyup="getTotalScoresForTesterOfSubject('rptSubjectOfSimpleAnswerList','lblSimpleAnswerCount','lblSimpleAnswerTotalScoresForTester','txtSimpleAnswerScoresForTester');"></asp:TextBox>分</span>
                            </div>
                            <div class="divContent answerByTester">
                            考生回答：<%#Eval("AnswerByTester") %>
                            </div>
                            <div class="divContent" style="color:Red">
                            答案：<%# Eval("Answer")%>
                            </div>
                            </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                     </table>
                </FooterTemplate>
               </asp:Repeater>
                   </td>
                </tr>
                 
                <tr>
                    <td >
                         <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Width="800px"  Height="50px" Text="评语" ></asp:TextBox>
                       </td>
                </tr>
                 
                <tr>
                    <td  class="submitArea">
                         <span style="margin-right:10px">
                         <b style="color:White;">
                         该试卷共<asp:Label ID="lblTotalScores" runat="server" Text="0"></asp:Label>
                         分</b> <b style="color:Green">共得<asp:TextBox ID="txtTotalScoresForTester" runat="server" ForeColor="Green" Width="20px" CssClass="txt" ></asp:TextBox>分</b>
&nbsp;</span><asp:Button ID="btnSave" runat="server" Text="保 存" CssClass="btn" Width="80px" 
                             onclick="btnSave_Click" />
                            </td>
                </tr>
            </table>
              
    </form>
</body>
</html>
