diff --git a/vendor/built_in_modules/survey/app/models/survey.rb b/vendor/built_in_modules/survey/app/models/survey.rb index 51abfd36..57fa3998 100644 --- a/vendor/built_in_modules/survey/app/models/survey.rb +++ b/vendor/built_in_modules/survey/app/models/survey.rb @@ -43,12 +43,12 @@ class Survey def time_range r = "#{self.postdate.to_date}" - r += "- #{self.deadline.to_date}" unless self.deadline.nil? + r += "- #{self.deadline.to_date}" if self.deadline r end def result - if ( self.result_type == Survey::ResultChart && Time.now > self.deadline ) || + if ( self.result_type == Survey::ResultChart && self.deadline && Time.now > self.deadline ) || ( self.result_type == Survey::ResultExtern && !self.extern_link.blank? ) || ( self.result_type == Survey::ResultFile && self.upload_file? ) ('').html_safe @@ -58,7 +58,7 @@ class Survey end def write - if Time.now < self.deadline + if self.deadline || Time.now < self.deadline ('').html_safe else ''