diff --git a/lib/tasks/resource_publish.rake b/lib/tasks/resource_publish.rake index df8fefda1..2df0c6145 100644 --- a/lib/tasks/resource_publish.rake +++ b/lib/tasks/resource_publish.rake @@ -3,9 +3,9 @@ namespace :resource_publish do desc "start publish resource" task :publish => :environment do - attachments = Attachment.where("publish_time <= '#{Date.today}'") + attachments = Attachment.where("publish_time = '#{Date.today}'") attachments.each do |attachment| - attachment.update_column('is_publish', 1) if attachment.is_publish == 0 + attachment.update_column('is_publish', 1) end end end \ No newline at end of file diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 1578d72df..b5db42df9 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -48,14 +48,14 @@ $(function(){ //弹框 var root_path = getRootPath(); var forums_1_path = root_path + "/forums/1" - var htmlvalue = "