Description:
prevents submission language assignment when already specified
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r773:1aa5e27cc4f1 - - 1 file changed: 6 inserted, 4 deleted
@@ -127,8 +127,10 | |||||
|
127 | end |
|
127 | end |
|
128 |
|
128 | ||
|
129 | def assign_language |
|
129 | def assign_language |
|
130 | - self.language = Submission.find_language_in_source(self.source, |
|
130 | + if self.language == nil |
|
131 | - self.source_filename) |
|
131 | + self.language = Submission.find_language_in_source(self.source, |
|
|
132 | + self.source_filename) | ||
|
|
133 | + end | ||
|
132 | end |
|
134 | end |
|
133 |
|
135 | ||
|
134 | # validation codes |
|
136 | # validation codes |
@@ -138,8 +140,8 | |||||
|
138 | # for output_only tasks |
|
140 | # for output_only tasks |
|
139 | return if self.problem!=nil and self.problem.output_only |
|
141 | return if self.problem!=nil and self.problem.output_only |
|
140 |
|
142 | ||
|
141 | - if self.language==nil |
|
143 | + if self.language == nil |
|
142 |
- errors.add('source',"Cannot detect language. Did you submit a correct source file?") |
|
144 | + errors.add('source',"Cannot detect language. Did you submit a correct source file?") |
|
143 | end |
|
145 | end |
|
144 | end |
|
146 | end |
|
145 |
|
147 |
You need to be logged in to leave comments.
Login now