<%@ Page Title="" Language="C#" MasterPageFile="admin.Master" AutoEventWireup="true" CodeBehind="course_my_ques_list.aspx.cs" Inherits="Math.math.my_by_course" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


     <style>
      .hard img{ height:20px; }
  </style>
 

                  <div style="margin-top:10px; margin-left:20px;">
 共查询结果： <asp:Label runat="server" ID="lbl_total"></asp:Label> 条
                      </div>
 <asp:ListView ID="lv_lists" runat="server"      ItemContainerID="layoutTableTemplate"  
    DataKeyNames="id" OnPagePropertiesChanging="lv_lists_PagePropertiesChanging"    
 >
 
 
    <LayoutTemplate>
 
   <table   class="layui-table">
      <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
    </table>
  </LayoutTemplate>
     
  
   
    <ItemTemplate>
     
 
	 
          		
    <tr style="background-color:#f2f2f2">
    	 <td colspan=6 align="right"> 

            

    		 <a   href='view.aspx?id=<%# Eval("id")%>'  class="layui-btn layui-btn-sm">查看</a>  
     		                  	
             
              
  
    
             	 <a   href='###'  onclick="remove(this, <%#Eval("id")%>, <%=cid %>)"   class="del layui-btn layui-btn-primary layui-border-black layui-btn-sm">移除此题</a>  

             
                  <a   href='###'  onclick="Pop('Share_Up.aspx?id=<%#Eval("id")%>',600,400,'共享试题'); "  class="layui-btn layui-btn-warm layui-btn-sm">试题上传</a> 
 

    	 </td> 	
     </tr>
    
    
    
     <tr  align="left">
			 <td  width="33%"   ><b>题号:</b> <%# Eval("id")%> 
             (<span style=" font-size:10px">Create Date <%#DateTime.Parse(Eval("adddate").ToString()) %></span>)
			  </td>

           <td  width="10%"  ><b>分值:</b> <%# Eval("score")%>分  </td>



          <td  width="20%" ><b>难度:</b> <span class="hd hard" data-count="<%# Eval("hard")%>" ></span> </td>


         

			 <td  width="33%" colspan="2"  ><b>来源:</b> <%# Eval("source")%>  </td>
			 
	 </tr>
							
	  
         
       <tr  >
			 <td colspan="6" >
                 <%# Eval("question2")%> 
			 </td>
			 
	 </tr>
	
	
	  
	
	
	  
	   		
	   		
	   		 
          
	   		
	   		
    </ItemTemplate>


  

</asp:ListView>   





    

 <div  class="paging"  >

 <asp:DataPager ID="DataPager1" 
      class="layui-box layui-laypage layui-laypage-default"  
       
     PagedControlID="lv_lists" runat="server" PageSize=10>
 <Fields>
            
        <asp:NextPreviousPagerField 
                PreviousPageText="上一页" 
                FirstPageText="|<" 
                ShowPreviousPageButton="true"
                ShowFirstPageButton="false" 
                ShowNextPageButton="false" 
                ShowLastPageButton="false"
                ButtonCssClass="btn btn-default" 
                RenderNonBreakingSpacesBetweenControls="false" 
                RenderDisabledButtonsAsLabels="false" />


           <asp:NumericPagerField  
                ButtonType="Link" 
                CurrentPageLabelCssClass="currentpage btn"  
                RenderNonBreakingSpacesBetweenControls="false" 
                  
                ButtonCount="10" 
                NextPageText="..." 
               />

     

     <asp:NextPreviousPagerField  
               NextPageText="下一页" 
               LastPageText=">|" 
               ShowNextPageButton="true"
               ShowLastPageButton="false" 
               ShowPreviousPageButton="false" 
               ShowFirstPageButton="false"
              
               RenderNonBreakingSpacesBetweenControls="false" 
               RenderDisabledButtonsAsLabels="false"/>
      

  </Fields> 
</asp:DataPager>
</div>

  
    
 
                    

        
          
      <script src="../layuiadmin/layui/layui.all.js"></script> 

     



        <script>

            function remove(obj, id,cid) {
                if (confirm('确定从课程里移除此题吗？')) {
                    var tr = $(obj).parent().parent();//.remove();
                    $(tr).next("tr").next("tr").remove();
                    $(tr).next("tr").remove();
                    $(tr).remove();

                    $.get("../api/del.aspx?t=remove&id=" + id+"&cid="+cid);

                }

            

            }



 

        </script>
    
    






    
    <script>

        $(".editormd-tex").each(function () {
            var tex = $(this).text();
            var element = $(this)[0];
            katex.render(tex, element, {
                throwOnError: false
            });

        });

    </script>

    <script>
        $(".hard").each(function () {
            var c = $(this).data("count");
            var r = "";
            for (var i = 0; i < c; i++) {
                r += "<img src=img/star.svg> ";
            }
            $(this).html(r);

        });

    </script>







</asp:Content>
