Merge branch 'yuanke' into develop
This commit is contained in:
commit
15ccf5cfbe
|
@ -45,7 +45,7 @@ class StudentWorkTest < ActiveRecord::Base
|
|||
private
|
||||
def get_success_count
|
||||
self.results.inject(0) do |sum, result|
|
||||
sum += (result["status"] && result["status"].to_i == 0 ? 1 : 0)
|
||||
sum += (result["status"] && result["status"].class == ::Fixnum && result["status"].to_i == 0 ? 1 : 0)
|
||||
end || 0
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue