修改评分为nil报错

This commit is contained in:
sw 2014-11-06 16:37:30 +08:00
parent 0a8d0182fd
commit 6c13a682c0
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@
<li class="wscore">
<%= is_student_batch_homework ? l(:label_my_score) : l(:label_student_score)%>:
<span class="c_red">
<%= homework.s_score.nil? ? l(:label_without_score) : format("%.2f",(is_student_batch_homework ? homework.m_score : homework.s_score)) %>
<%= homework.s_score.nil? ? l(:label_without_score) : format("%.2f",(is_student_batch_homework ? (homework.m_score.nil? ? 0 : homework.m_score) : (homework.s_score.nil? ? 0 : homework.s_score))) %>
</span>
</li>
<% if is_teacher %>