# HG changeset patch # User jittat # Date 2008-05-05 04:11:30 # Node ID b32b8de97eaec3bc825a1ad0701b6c8cba4aefc0 # Parent 1706f495c73a0b2f87ab0fcc585bdb0b174f2dfc [grader] change messages git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@242 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/lib/submission_helper.rb b/lib/submission_helper.rb --- a/lib/submission_helper.rb +++ b/lib/submission_helper.rb @@ -99,14 +99,20 @@ points = result[:points] submission.points = points comment = @config.report_comment(result[:comment]) + + # + # TODO: FIX THIS MESSAGE + # if problem == nil submission.grader_comment = 'PASSED: ' + comment + '(problem is nil)' elsif points == problem.full_score - submission.grader_comment = 'PASSED: ' + comment + #submission.grader_comment = 'PASSED: ' + comment + submission.grader_comment = comment elsif result[:comment].chomp =~ /^[\[\]P]+$/ submission.grader_comment = 'PASSED: ' + comment + '(inconsistent score)' else - submission.grader_comment = 'FAILED: ' + comment + #submission.grader_comment = 'FAILED: ' + comment + submission.grader_comment = comment end submission.compiler_message = result[:cmp_msg] or '' submission.save