Description:
[grader] fixed bug #6 and #9
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@139 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
r37:effd16a52c43 - - 5 files changed: 13 inserted, 3 deleted
@@ -42,8 +42,10 | |||
|
42 | 42 | def report_comment(comment) |
|
43 | 43 | case comment_report_style |
|
44 | 44 | when :short |
|
45 | - if comment.chomp =~ /^P+$/ # all P's | |
|
45 | + if comment.chomp =~ /^[\[\]P]+$/ # all P's | |
|
46 | 46 | 'passed' |
|
47 | + elsif comment.chomp =~ /[Cc]ompil.*[Ee]rror/ | |
|
48 | + 'compilation error' | |
|
47 | 49 | else |
|
48 | 50 | 'failed' |
|
49 | 51 | end |
@@ -87,7 +87,7 | |||
|
87 | 87 | :cmp_msg => cmp_msg} |
|
88 | 88 | else |
|
89 | 89 | return {:points => 0, |
|
90 |
- :comment => 'compil |
|
|
90 | + :comment => 'compilation error', | |
|
91 | 91 | :cmp_msg => cmp_msg} |
|
92 | 92 | end |
|
93 | 93 | end |
@@ -103,6 +103,8 | |||
|
103 | 103 | submission.grader_comment = 'PASSED: ' + comment + '(problem is nil)' |
|
104 | 104 | elsif points == problem.full_score |
|
105 | 105 | submission.grader_comment = 'PASSED: ' + comment |
|
106 | + elsif result[:comment].chomp =~ /^[\[\]P]+$/ | |
|
107 | + submission.grader_comment = 'PASSED: ' + comment + '(inconsistent score)' | |
|
106 | 108 | else |
|
107 | 109 | submission.grader_comment = 'FAILED: ' + comment |
|
108 | 110 | end |
You need to be logged in to leave comments.
Login now