修改评分为nil报错
This commit is contained in:
parent
0a8d0182fd
commit
6c13a682c0
|
@ -35,7 +35,7 @@
|
||||||
<li class="wscore">
|
<li class="wscore">
|
||||||
<%= is_student_batch_homework ? l(:label_my_score) : l(:label_student_score)%>:
|
<%= is_student_batch_homework ? l(:label_my_score) : l(:label_student_score)%>:
|
||||||
<span class="c_red">
|
<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>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<% if is_teacher %>
|
<% if is_teacher %>
|
||||||
|
|
Loading…
Reference in New Issue