Commit bf0c69bb573d3d344759b305567a88cc050f8d8d

Authored by 孙向锦
1 parent d64d0e79

练习列表页面修改

WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
@@ -48,16 +48,20 @@ @@ -48,16 +48,20 @@
48 <table class="table table-striped"> 48 <table class="table table-striped">
49 <col style="width: 10%" /> 49 <col style="width: 10%" />
50 <col style="width: 20%" /> 50 <col style="width: 20%" />
51 - <col style="width: 20%" />  
52 - <col style="width: 20%" />  
53 - <col style="width: 20%" /> 51 + <col style="width: 15%" />
  52 + <col style="width: 15%" />
  53 + <col style="width: 10%" />
  54 + <col style="width: 10%" />
  55 + <col style="width: 10%" />
54 <col style="width: 10%" /> 56 <col style="width: 10%" />
55 <thead> 57 <thead>
56 <tr> 58 <tr>
57 <th><input type="checkbox" name='ids' id="ids" />序号</th> 59 <th><input type="checkbox" name='ids' id="ids" />序号</th>
58 - <th>测验标题</th>  
59 - <th>创建时间</th>  
60 - <th>建议考试时长</th> 60 + <th>练习标题</th>
  61 + <th>布置时间</th>
  62 + <th>完成时间</th>
  63 + <th>题目数</th>
  64 + <th>完成情况</th>
61 <th>总分</th> 65 <th>总分</th>
62 <th>操作</th> 66 <th>操作</th>
63 </tr> 67 </tr>
@@ -69,23 +73,27 @@ @@ -69,23 +73,27 @@
69 <table class="table table-striped"> 73 <table class="table table-striped">
70 <col style="width: 10%" /> 74 <col style="width: 10%" />
71 <col style="width: 20%" /> 75 <col style="width: 20%" />
72 - <col style="width: 20%" />  
73 - <col style="width: 20%" />  
74 - <col style="width: 20%" /> 76 + <col style="width: 15%" />
  77 + <col style="width: 15%" />
  78 + <col style="width: 10%" />
  79 + <col style="width: 10%" />
  80 + <col style="width: 10%" />
75 <col style="width: 10%" /> 81 <col style="width: 10%" />
76 <tbody> 82 <tbody>
77 <c:choose> 83 <c:choose>
78 <c:when test="${not empty varList}"> 84 <c:when test="${not empty varList}">
79 <c:forEach items="${varList}" var="var" varStatus="vs"> 85 <c:forEach items="${varList}" var="var" varStatus="vs">
80 <tr> 86 <tr>
81 - <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td>  
82 - <td ><a target="_blank" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.PAPER_ID}">${var.TITLE}</a></td> 87 + <td><input type="checkbox" name='ids' id="ids" value="${var.HOMEWORK_ID}"/>${vs.index+1}</td>
  88 + <td ><a target="_blank" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.HOMEWORK_ID}">${var.NAME}</a></td>
83 <td >${var.CREATE_DATE}</td> 89 <td >${var.CREATE_DATE}</td>
84 - <td >${var.EXAM_TIME}</td>  
85 - <td >${var.SCORE}</td> 90 + <td >${var.COMPLETE_DATE}</td>
  91 + <td >${var.QUESTIOM_COUNT}</td>
  92 + <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td>
  93 + <td >${var.ALL_SCORE}</td>
86 <td> 94 <td>
87 - <a onclick="del('${var.PAPER_ID}');"><img src="static/images/remove.png" /></a>  
88 - <a onclick="del('${var.PAPER_ID}');"><img src="static/images/eidtor.png" /></a> 95 + <a onclick="del('${var.HOMEWORK_ID}');"><img src="static/images/remove.png" /></a>
  96 + <a onclick="del('${var.HOMEWORK_ID}');"><img src="static/images/eidtor.png" /></a>
89 </td> 97 </td>
90 </tr> 98 </tr>
91 99
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
@@ -179,7 +179,7 @@ @@ -179,7 +179,7 @@
179 function homeWork(schoolId){ 179 function homeWork(schoolId){
180 //var path = "../school/goEdit2.do?ID=" + schoolId ; 180 //var path = "../school/goEdit2.do?ID=" + schoolId ;
181 181
182 - var path = '<%=basePath%>homework/list.do?ID=' + schoolId ; 182 + var path = '<%=basePath%>homework/list.do?teacher_id=${pd.TEACHER.ID}&ID=' + schoolId ;
183 183
184 $("#mainFrame").attr('src',path); 184 $("#mainFrame").attr('src',path);
185 window.top.loading.show(); 185 window.top.loading.show();
resources/mybatis1/sunvote/HomeworkMapper.xml
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
27 GET_SCORE, 27 GET_SCORE,
28 GET_SCORE_PERSENT, 28 GET_SCORE_PERSENT,
29 GET_MAX_SCORE, 29 GET_MAX_SCORE,
  30 + QUESTIOM_COUNT,
30 HOMEWORK_ID 31 HOMEWORK_ID
31 </sql> 32 </sql>
32 33
@@ -50,6 +51,7 @@ @@ -50,6 +51,7 @@
50 #{GET_SCORE}, 51 #{GET_SCORE},
51 #{GET_SCORE_PERSENT}, 52 #{GET_SCORE_PERSENT},
52 #{GET_MAX_SCORE}, 53 #{GET_MAX_SCORE},
  54 + #{QUESTIOM_COUNT},
53 #{HOMEWORK_ID} 55 #{HOMEWORK_ID}
54 </sql> 56 </sql>
55 57
@@ -113,6 +115,8 @@ @@ -113,6 +115,8 @@
113 GET_SCORE_PERSENT = #{GET_SCORE_PERSENT}, 115 GET_SCORE_PERSENT = #{GET_SCORE_PERSENT},
114 </if><if test="GET_MAX_SCORE != null and GET_MAX_SCORE != ''"> 116 </if><if test="GET_MAX_SCORE != null and GET_MAX_SCORE != ''">
115 GET_MAX_SCORE = #{GET_MAX_SCORE}, 117 GET_MAX_SCORE = #{GET_MAX_SCORE},
  118 + </if><if test="QUESTIOM_COUNT != null and QUESTIOM_COUNT != ''">
  119 + QUESTIOM_COUNT = #{QUESTIOM_COUNT},
116 </if> 120 </if>
117 HOMEWORK_ID = HOMEWORK_ID 121 HOMEWORK_ID = HOMEWORK_ID
118 where 122 where
@@ -136,15 +140,23 @@ @@ -136,15 +140,23 @@
136 from 140 from
137 <include refid="tableName"></include> 141 <include refid="tableName"></include>
138 where 1=1 142 where 1=1
139 - <if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词检索 -->  
140 - and  
141 - (  
142 - <!-- 根据需求自己加检索条件  
143 - 字段1 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')  
144 - or  
145 - 字段2 LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')  
146 - -->  
147 - ) 143 + <if test="pd.SUBJECT_ID != null and pd.SUBJECT_ID != ''"><!-- 关键词检索 -->
  144 + and SUBJECT_ID = #{pd.SUBJECT_ID}
  145 + </if>
  146 + <if test="pd.CLASS_ID != null and pd.CLASS_ID != ''"><!-- 关键词检索 -->
  147 + and CLASS_ID = #{pd.CLASS_ID}
  148 + </if>
  149 + <if test="pd.GRADE_ID != null and pd.GRADE_ID != ''"><!-- 关键词检索 -->
  150 + and GRADE_ID = #{pd.GRADE_ID}
  151 + </if>
  152 + <if test="pd.SCHOOL_ID != null and pd.SCHOOL_ID != ''"><!-- 关键词检索 -->
  153 + and SCHOOL_ID = #{pd.SCHOOL_ID}
  154 + </if>
  155 + <if test="pd.TEACHER_ID != null and pd.TEACHER_ID != ''"><!-- 关键词检索 -->
  156 + and TEACHER_ID = #{pd.TEACHER_ID}
  157 + </if>
  158 + <if test="pd.COMPLETE != null and pd.COMPLETE != ''"><!-- 关键词检索 -->
  159 + and COMPLETE_DATE &gt; #{pd.COMPLETE_DATE}
148 </if> 160 </if>
149 </select> 161 </select>
150 162