评分保留两位小数点

This commit is contained in:
z9hang 2014-11-10 10:37:12 +08:00
parent dd95335a67
commit b707cbae16
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">
<%= is_student_batch_homework ? (homework.m_score.nil? ? l(:label_without_score) : homework.m_score) : (homework.s_score.nil? ? l(:label_without_score) : homework.s_score)%>
<%= is_student_batch_homework ? (homework.m_score.nil? ? l(:label_without_score) : format("%.2f",homework.m_score)) : (homework.s_score.nil? ? l(:label_without_score) : format("%.2f",homework.s_score))%>
</span>
</li>
<% if is_teacher %>