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 @@
<% first_pro = project_sort_first(projects).first %> - # <%=time_from_now first_pro.first.updated_at %><%= link_to User.find(first_pro.first.user_id).show_name, user_activities_url_in_org(first_pro.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新: + # <%=time_from_now first_pro.updated_at %><%= link_to User.find(first_pro.user_id).show_name, user_activities_url_in_org(first_pro.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
<% sort_projects.each_with_index do |pro, i| %> diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 5b273d014..6383ccc26 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -198,7 +198,7 @@
<% first_pro = project_sort_first(projects).first %> - # <%=time_from_now first_pro.first.updated_at %><%= link_to User.find(first_pro.first.user_id).show_name, user_activities_path(first_pro.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新: + # <%=time_from_now first_pro.updated_at %><%= link_to User.find(first_pro.user_id).show_name, user_activities_path(first_pro.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
<% sort_projects.each_with_index do |pro, i| %>