Commit a1869fd90ebb3a0fbc3a45fd45c857e6a54e0fee

Authored by jack
1 parent 9006450d

1.修改课后练图表bug

WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
... ... @@ -68,7 +68,7 @@
68 68 <th>题目数</th>
69 69 <th>完成情况</th>
70 70 <th>总分</th>
71   - <th>操作</th>
  71 + <th style="text-align:center">操作</th>
72 72 </tr>
73 73 </thead>
74 74 </table>
... ...
WebRoot/WEB-INF/jsp/sunvote/homework/homework_report.jsp
... ... @@ -295,11 +295,14 @@
295 295 stundent_num[j]=res.DATA[j].length;
296 296 }
297 297 max_num=Math.max.apply(null,stundent_num);
  298 + if(max_num==0){
  299 + _html='<div style="height:200px;"></div>';
  300 + }
298 301 for(i=0;i<res.DATA.length;i++){
299 302 if(res.ANSWER.indexOf(String.fromCharCode(65+i))>-1){
300   - _html += '<div class="ans_list" style="height:'+(stundent_num[i]*200/max_num).toFixed(2)+'px;"><div class="rel ans_correct"><p class="p_num">'+res.DATA[i].length+'人</p></div><p class="ans_option">'+String.fromCharCode(65+i)+'</p></div>'
  303 + _html += '<div class="ans_list" style="height:'+(max_num==0?0:(stundent_num[i]*200/max_num).toFixed(2))+'px;"><div class="rel ans_correct"><p class="p_num">'+res.DATA[i].length+'人</p></div><p class="ans_option">'+String.fromCharCode(65+i)+'</p></div>'
301 304 }else{
302   - _html += '<div class="ans_list" style="height:'+(stundent_num[i]*200/max_num).toFixed(2)+'px;"><div class="rel ans_error"><p class="p_num">'+res.DATA[i].length+'人</p></div><p class="ans_option">'+String.fromCharCode(65+i)+'</p></div>';
  305 + _html += '<div class="ans_list" style="height:'+(max_num==0?0:(stundent_num[i]*200/max_num).toFixed(2))+'px;"><div class="rel ans_error"><p class="p_num">'+res.DATA[i].length+'人</p></div><p class="ans_option">'+String.fromCharCode(65+i)+'</p></div>';
303 306 }
304 307 }
305 308 var student_option_list='';
... ...