From b2756650cf578eba965ff9f7f12ce991fed15bb7 Mon Sep 17 00:00:00 2001 From: nwb Date: Fri, 13 Jun 2014 16:18:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AF=BE=E7=A8=8B=E7=95=99?= =?UTF-8?q?=E8=A8=80=E5=8A=A8=E6=80=81=E5=BC=95=E8=B5=B7=E7=9A=84=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 + .../lib/acts_as_activity_provider.rb | 2 +- lib/redmine/activity/fetcher.rb | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 72e9c1728..b2f87ba72 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -56,6 +56,7 @@ class CoursesController < ApplicationController end end + #更新课程信息 def update @course.safe_attributes = params[:course] @course.class_period = params[:class_period] diff --git a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb index c719629ae..95bda9bb0 100644 --- a/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +++ b/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb @@ -118,7 +118,7 @@ module Redmine scope = scope.visible(user1, options) elsif provider_options.has_key?(:func) && provider_options[:func].eql?('memos') scope = scope - elsif event_type.to_s == 'course_files' + elsif event_type.to_s == 'course_files' || event_type.to_s == 'course_journals_for_messages' || event_type.to_s == 'course_messages' scope = scope else ActiveSupport::Deprecation.warn "acts_as_activity_provider with implicit :permission option is deprecated. Add a visible scope to the #{self.name} model or use explicit :permission option." diff --git a/lib/redmine/activity/fetcher.rb b/lib/redmine/activity/fetcher.rb index 0204979e9..0793ff88f 100644 --- a/lib/redmine/activity/fetcher.rb +++ b/lib/redmine/activity/fetcher.rb @@ -103,7 +103,9 @@ module Redmine @scope.each do |event_type| constantized_providers(event_type).each do |provider| - e += provider.find_events1(event_type, @user, from, to, @options) + if event_type.to_s != 'course_journals_for_messages' + e += provider.find_events1(event_type, @user, from, to, @options) + end end end