兼容作业数据异常

This commit is contained in:
sw 2014-10-09 09:19:21 +08:00
parent 341ee214c1
commit 0a0a5d6714
1 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,8 @@
<td> <td>
<strong>终评得分:&nbsp; <strong>终评得分:&nbsp;
<%# totle_homework_score = score_for_homework(homework) %> <%# totle_homework_score = score_for_homework(homework) %>
<% totle_homework_score = format("%.2f",(homework.t_score.nil? ? 0.00 : homework.t_score) * (@bid.proportion * 1.0 / 100) + (homework.s_score.nil? ? 0.00 : homework.s_score) * (1 - @bid.proportion * 1.0 / 100)) %> <% totle_homework_score = format("%.2f",(homework.t_score.nil? ? 0.00 : homework.t_score) * ((@bid.proportion.nil? ? 60 : @bid.proportion) * 1.0 / 100) +
(homework.s_score.nil? ? 0.00 : homework.s_score) * (1 - (@bid.proportion.nil? ? 60 : @bid.proportion) * 1.0 / 100)) %>
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;"> <span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %> <% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
<%= score %> <%= score %>