Description:
[web] fixed bug in grader_process update
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@254 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
r126:b4095ef6a972 - - 1 file changed: 10 inserted, 4 deleted
@@ -34,17 +34,23 | |||||
|
34 | self.active = true |
|
34 | self.active = true |
|
35 | if task!=nil |
|
35 | if task!=nil |
|
36 | self.task_id = task.id |
|
36 | self.task_id = task.id |
|
|
37 | + self.task_type = task.class.to_s | ||
|
37 | else |
|
38 | else |
|
38 | self.task_id = nil |
|
39 | self.task_id = nil |
|
|
40 | + self.task_type = nil | ||
|
39 | end |
|
41 | end |
|
40 | - self.task_type = task.class.to_s |
|
||
|
41 | self.save |
|
42 | self.save |
|
42 | end |
|
43 | end |
|
43 |
|
44 | ||
|
44 | - def report_inactive() |
|
45 | + def report_inactive(task=nil) |
|
45 | self.active = false |
|
46 | self.active = false |
|
46 |
- |
|
47 | + if task!=nil |
|
47 |
- self.task_ |
|
48 | + self.task_id = task.id |
|
|
49 | + self.task_type = task.class.to_s | ||
|
|
50 | + else | ||
|
|
51 | + self.task_id = nil | ||
|
|
52 | + self.task_type = nil | ||
|
|
53 | + end | ||
|
48 | self.save |
|
54 | self.save |
|
49 | end |
|
55 | end |
|
50 |
|
56 |
You need to be logged in to leave comments.
Login now