diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 97fd65aa7..b36ef592d 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -107,7 +107,7 @@ class OrganizationsController < ApplicationController if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0 @acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and ((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')}))) - order by updated_at desc limit 6;") + order by created_at desc limit 6;") end render :layout => 'base_org_custom' else @@ -273,7 +273,7 @@ class OrganizationsController < ApplicationController course_ids = (@organization.courses.map(&:id) - shield_course_ids) << 0 @org_acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and ((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')}))) - order by updated_at desc limit 6;") + order by created_at desc limit 6;") respond_to do |format| format.html{render :layout => 'base_org_custom'} format.js diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 4099ea451..cb06bd688 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -105,13 +105,13 @@ module OrganizationsHelper def org_time_by_type obj case obj.act_type when "Message" - obj.act.updated_on + obj.act.created_on when "News" obj.act.created_on when "HomeworkCommon" - obj.act.updated_at + obj.act.created_at when "Issue" - obj.act.updated_on + obj.act.created_on end end