Description:
[web] fix problem availability bug git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@155 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r75:8466e8e886f1 - - 1 file changed: 1 inserted, 1 deleted

@@ -110,13 +110,13
110 problem = Problem.find(self.problem_id)
110 problem = Problem.find(self.problem_id)
111 else
111 else
112 problem = Submission.find_problem_in_source(self.source)
112 problem = Submission.find_problem_in_source(self.source)
113 end
113 end
114 if problem==nil
114 if problem==nil
115 errors.add_to_base("must specify problem")
115 errors.add_to_base("must specify problem")
116 - elsif !problem.available
116 + elsif (!problem.available) and (self.new_record?)
117 errors.add_to_base("must specify valid problem")
117 errors.add_to_base("must specify valid problem")
118 else
118 else
119 self.problem = problem
119 self.problem = problem
120 end
120 end
121 end
121 end
122
122
You need to be logged in to leave comments. Login now