Description:
[grader] fixed bug in runner for prob
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@137 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
r36:79248d481294 - - 1 file changed: 1 inserted, 1 deleted
@@ -20,25 +20,25 | |||
|
20 | 20 | @engine.grade(submission) |
|
21 | 21 | task.status_complete! |
|
22 | 22 | end |
|
23 | 23 | return task |
|
24 | 24 | end |
|
25 | 25 | |
|
26 | 26 | def grade_problem(problem) |
|
27 | 27 | users = User.find(:all) |
|
28 | 28 | users.each do |u| |
|
29 | 29 | puts "user: #{u.login}" |
|
30 | 30 | last_sub = Submission.find(:first, |
|
31 | 31 | :conditions => "user_id = #{u.id} and " + |
|
32 | - "problem_id = #{prob.id}", | |
|
32 | + "problem_id = #{problem.id}", | |
|
33 | 33 | :order => 'submitted_at DESC') |
|
34 | 34 | if last_sub!=nil |
|
35 | 35 | @engine.grade(last_sub) |
|
36 | 36 | end |
|
37 | 37 | end |
|
38 | 38 | end |
|
39 | 39 | |
|
40 | 40 | def grade_oldest_test_request |
|
41 | 41 | test_request = TestRequest.get_inqueue_and_change_status(Task::STATUS_GRADING) |
|
42 | 42 | if test_request!=nil |
|
43 | 43 | @grader_process.report_active(test_request) if @grader_process!=nil |
|
44 | 44 |
You need to be logged in to leave comments.
Login now