diff --git a/app/models/student_work.rb b/app/models/student_work.rb index a6d641c0c..cd4d81a32 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -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 diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index caaaa2775..d3bac240d 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -57,7 +57,7 @@ - <% 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%>
  • <%= score.nil? ? "--" : format("%.1f",score)%> <% unless score.nil?%>