Commit 31d7a48c6b03fc3738d87e3c457727a541a1f2ac

Authored by 孙向锦
1 parent 2ba4dc50

分数bug修复

WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit2.jsp
@@ -134,15 +134,15 @@ @@ -134,15 +134,15 @@
134 <col width="10%"/> 134 <col width="10%"/>
135 <tbody class="subject_body_tbody"> 135 <tbody class="subject_body_tbody">
136 <c:choose> 136 <c:choose>
137 - <c:when test="${not empty pd.PROBLEMS}">  
138 - <c:forEach items="${pd.PROBLEMS}" var="var" varStatus="vs"> 137 + <c:when test="${not empty pd.QUESTIONS}">
  138 + <c:forEach items="${pd.QUESTIONS}" var="var" varStatus="vs">
139 <tr> 139 <tr>
140 <td class="first">${var.RANK}</td> 140 <td class="first">${var.RANK}</td>
141 <td class="middle"> 141 <td class="middle">
142 <div class="question question${var.RANK}"> 142 <div class="question question${var.RANK}">
143 <ul> 143 <ul>
144 <c:forEach var="i" begin="1" end="${var.OPTION_NUM}"> 144 <c:forEach var="i" begin="1" end="${var.OPTION_NUM}">
145 - <c:set var="a" value="fn:substring('ABCDEFGHI',i-1,i)"/> 145 + <c:set var="a" value="${fn:substring('ABCDEFGHI',i-1,i)}"/>
146 146
147 <li class="btn btn-default <c:if test="${fn:contains(var.RIGHT_ANSWER, a)}"> on </c:if>">${a}</li> 147 <li class="btn btn-default <c:if test="${fn:contains(var.RIGHT_ANSWER, a)}"> on </c:if>">${a}</li>
148 </c:forEach> 148 </c:forEach>
WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
89 <td ><a target="_blank" href="<%=basePath%>homework/iteminfo.do?homework_id=${var.HOMEWORK_ID}">${var.NAME}</a></td> 89 <td ><a target="_blank" href="<%=basePath%>homework/iteminfo.do?homework_id=${var.HOMEWORK_ID}">${var.NAME}</a></td>
90 <td >${var.CREATE_DATE}</td> 90 <td >${var.CREATE_DATE}</td>
91 <td >${var.COMPLETE_DATE}</td> 91 <td >${var.COMPLETE_DATE}</td>
92 - <td >${var.QUESTIOM_COUNT}</td> 92 + <td >${var.QUESTION_COUNT}</td>
93 <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td> 93 <td >${var.COMPLETE_COUNT == "0" ? "未完成":"已完成"}</td>
94 <td >${var.ALL_SCORE}</td> 94 <td >${var.ALL_SCORE}</td>
95 <td> 95 <td>
WebRoot/WEB-INF/tld/elfun.tld
@@ -134,6 +134,14 @@ @@ -134,6 +134,14 @@
134 <example>${myelfun:findSoftwareName(obj1)}</example><!-- 自定义标签的使用示范 ,域参数会自动传递到具体的方法里面--> 134 <example>${myelfun:findSoftwareName(obj1)}</example><!-- 自定义标签的使用示范 ,域参数会自动传递到具体的方法里面-->
135 </function> 135 </function>
136 136
  137 + <function>
  138 + <description>数字转字符</description><!-- 对该标签的说明 -->
  139 + <name>jstlInt2Char</name><!-- 定义标签名,放在短标签之后 -->
  140 + <function-class>com.fh.controller.sunvote.Myelfun</function-class><!-- 标签处理域值的类路径 -->
  141 + <function-signature>java.lang.String findSoftwareName(int)</function-signature><!-- 标签处理域值的具体的类方法 -->
  142 + <example>${myelfun:jstlInt2Char(obj1)}</example><!-- 自定义标签的使用示范 ,域参数会自动传递到具体的方法里面-->
  143 + </function>
  144 +
137 145
138 146
139 </taglib> 147 </taglib>
resources/mybatis1/sunvote/HomeworkMapper.xml
@@ -27,7 +27,7 @@ @@ -27,7 +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 + QUESTION_COUNT,
31 HOMEWORK_ID 31 HOMEWORK_ID
32 </sql> 32 </sql>
33 33
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 #{GET_SCORE}, 51 #{GET_SCORE},
52 #{GET_SCORE_PERSENT}, 52 #{GET_SCORE_PERSENT},
53 #{GET_MAX_SCORE}, 53 #{GET_MAX_SCORE},
54 - #{QUESTIOM_COUNT}, 54 + #{QUESTION_COUNT},
55 #{HOMEWORK_ID} 55 #{HOMEWORK_ID}
56 </sql> 56 </sql>
57 57
@@ -115,8 +115,8 @@ @@ -115,8 +115,8 @@
115 GET_SCORE_PERSENT = #{GET_SCORE_PERSENT}, 115 GET_SCORE_PERSENT = #{GET_SCORE_PERSENT},
116 </if><if test="GET_MAX_SCORE != null and GET_MAX_SCORE != ''"> 116 </if><if test="GET_MAX_SCORE != null and GET_MAX_SCORE != ''">
117 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}, 118 + </if><if test="QUESTION_COUNT != null and QUESTION_COUNT != ''">
  119 + QUESTION_COUNT = #{QUESTION_COUNT},
120 </if> 120 </if>
121 HOMEWORK_ID = HOMEWORK_ID 121 HOMEWORK_ID = HOMEWORK_ID
122 where 122 where
src/com/fh/controller/sunvote/Myelfun.java
@@ -331,4 +331,8 @@ public class Myelfun { @@ -331,4 +331,8 @@ public class Myelfun {
331 return "" ; 331 return "" ;
332 } 332 }
333 } 333 }
  334 +
  335 + public static String jstlInt2Char(int i){
  336 + return "" + ('A' + (i - 1));
  337 + }
334 } 338 }