Description:
fixed grading wrong submission when 2 submissions created at the same time
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@373 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r68:fd3aca136ef8 - - 1 file changed: 1 inserted, 4 deleted
@@ -28,10 +28,7 | |||||
|
28 | users = User.find(:all) |
|
28 | users = User.find(:all) |
|
29 | users.each do |u| |
|
29 | users.each do |u| |
|
30 | puts "user: #{u.login}" |
|
30 | puts "user: #{u.login}" |
|
31 |
- last_sub = Submission.find( |
|
31 | + last_sub = Submission.find_last_by_user_and_problem(u.id,problem.id) |
|
32 | - :conditions => "user_id = #{u.id} and " + |
|
||
|
33 | - "problem_id = #{problem.id}", |
|
||
|
34 | - :order => 'submitted_at DESC') |
|
||
|
35 | if last_sub!=nil |
|
32 | if last_sub!=nil |
|
36 | @engine.grade(last_sub) |
|
33 | @engine.grade(last_sub) |
|
37 | end |
|
34 | end |
You need to be logged in to leave comments.
Login now