diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 919ca0a34..18ce26c36 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -11,7 +11,9 @@ class HomeworkCommonController < ApplicationController before_filter :member_of_course, :only => [:index] def index - update_homework_time(@course.homework_commons) + unless params[:page] + update_homework_time(@course.homework_commons) + end @new_homework = HomeworkCommon.new @new_homework.homework_detail_manual = HomeworkDetailManual.new @new_homework.course = @course diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index de11246d0..86a78708b 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -276,8 +276,7 @@ class WordsController < ApplicationController ids = params[:asset_id].split(',') update_kindeditor_assets_owner ids,feedback[:id],OwnerTypeHelper::JOURNALSFORMESSAGE end - @homework_common.update_column(:updated_at, Time.now) - update_course_activity(@homework_common.class,@homework_common.id) + @homework_common.update_column('updated_at', Time.now) update_course_activity(@homework_common.class,@homework_common.id) update_user_activity(@homework_common.class,@homework_common.id) update_org_activity(@homework_common.class,@homework_common.id) respond_to do |format| @@ -311,7 +310,7 @@ class WordsController < ApplicationController ids = params[:asset_id].split(',') update_kindeditor_assets_owner ids,feedback[:id],OwnerTypeHelper::JOURNALSFORMESSAGE end - @homework_common.update_attributes(:updated_at => Time.now) + @homework_common.update_column('updated_at', Time.now) update_course_activity(@homework_common.class,@homework_common.id) update_user_activity(@homework_common.class,@homework_common.id) update_org_activity(@homework_common.class,@homework_common.id) diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb index 068d50437..19cdcf2f1 100644 --- a/app/views/organizations/_org_course_homework.html.erb +++ b/app/views/organizations/_org_course_homework.html.erb @@ -183,7 +183,7 @@