Description:
add check for nil problem
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r527:662f5e0a87b8 - - 1 file changed: 1 inserted, 1 deleted

@@ -142,7 +142,7
142 142 ustat[0] = u
143 143 @problems.each do |p|
144 144 sub = Submission.find_last_by_user_and_problem(u.id,p.id)
145 - if (sub!=nil) and (sub.points!=nil)
145 + if (sub!=nil) and (sub.points!=nil) and p and p.full_score
146 146 ustat << [(sub.points.to_f*100/p.full_score).round, (sub.points>=p.full_score)]
147 147 else
148 148 ustat << [0,false]
You need to be logged in to leave comments. Login now