Description:
fixed submission bug: forgot to set problem attribute in case that the problem is set in the submission code.
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@100 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
r48:0bbd9fb65914 - - 1 file changed: 2 inserted, 0 deleted
@@ -104,12 +104,14 | |||
|
104 | 104 | problem = Submission.find_problem_in_source(self.source) |
|
105 | 105 | end |
|
106 | 106 | if problem==nil |
|
107 | 107 | errors.add_to_base("must specify problem") |
|
108 | 108 | elsif !problem.available |
|
109 | 109 | errors.add_to_base("must specify valid problem") |
|
110 | + else | |
|
111 | + self.problem = problem | |
|
110 | 112 | end |
|
111 | 113 | end |
|
112 | 114 | |
|
113 | 115 | # callbacks |
|
114 | 116 | def assign_latest_number_if_new_recond |
|
115 | 117 | return if !self.new_record? |
You need to be logged in to leave comments.
Login now