Description:
updated graded_at fields for graded submissions
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r387:d79d1e42bcbb - - 1 file changed: 1 inserted, 0 deleted

@@ -30,18 +30,19
30 30 submissions = Submission.find_all_by_user_problem(u.id, problem.id)
31 31 submissions.each do |sub|
32 32 result = test_pair.grade(sub.output)
33 33 result2 = test_pair.grade(sub.source)
34 34 if result2[:score] > result[:score]
35 35 result = result2
36 36 puts "Use source field (#{sub.id})"
37 37 end
38 38
39 39 full_score = result[:full_score]
40 40 sub.points = result[:score]*100 / full_score
41 41 sub.grader_comment = result[:msg]
42 + sub.graded_at = Time.now.gmtime
42 43 sub.save
43 44 end
44 45 end
45 46 end
46 47
47 48 main
You need to be logged in to leave comments. Login now