匿评作业成绩计算错误
This commit is contained in:
parent
20b4c056a8
commit
ec4c7f531d
|
@ -31,9 +31,8 @@ class StudentWork < ActiveRecord::Base
|
|||
else
|
||||
self.system_score = last_test.test_score
|
||||
end
|
||||
set_final_score self.homework_common,self
|
||||
end
|
||||
|
||||
set_final_score self.homework_common,self
|
||||
end
|
||||
def set_src
|
||||
self.description = last_test.src if last_test
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
</li>
|
||||
|
||||
<!-- 成绩 -->
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
||||
<%= score.nil? ? "--" : format("%.1f",score)%>
|
||||
<% unless score.nil?%>
|
||||
|
|
Loading…
Reference in New Issue