Description:
Change to better error message when the submitted file has illegal extension
Solve issue #4
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r548:ba97cbe38d86 - - 1 file changed: 1 inserted, 1 deleted
@@ -147,13 +147,13 | |||||
|
147 | return if self.source==nil |
|
147 | return if self.source==nil |
|
148 |
|
148 | ||
|
149 | # for output_only tasks |
|
149 | # for output_only tasks |
|
150 | return if self.problem!=nil and self.problem.output_only |
|
150 | return if self.problem!=nil and self.problem.output_only |
|
151 |
|
151 | ||
|
152 | if self.language==nil |
|
152 | if self.language==nil |
|
153 |
- errors.add('source'," |
|
153 | + errors.add('source',"Cannot detect language. Did you submit a correct source file?") unless self.language!=nil |
|
154 | end |
|
154 | end |
|
155 | end |
|
155 | end |
|
156 |
|
156 | ||
|
157 | def must_have_valid_problem |
|
157 | def must_have_valid_problem |
|
158 | return if self.source==nil |
|
158 | return if self.source==nil |
|
159 | if self.problem==nil |
|
159 | if self.problem==nil |
You need to be logged in to leave comments.
Login now