修改bug,课程动态报错
This commit is contained in:
parent
f3f590a834
commit
0785384813
|
@ -98,21 +98,14 @@ module Redmine
|
||||||
# Author lizanle
|
# Author lizanle
|
||||||
# Description 删除 unless scope.all,因为这个执行查询,并且没有加入时间限制,与下边 scope.all(provider_options[:find_options].dup)重复
|
# Description 删除 unless scope.all,因为这个执行查询,并且没有加入时间限制,与下边 scope.all(provider_options[:find_options].dup)重复
|
||||||
if options[:course]
|
if options[:course]
|
||||||
if provider_options[:timestamp].include? "updated_on"
|
scope.all(provider_options[:find_options].dup)
|
||||||
to = scope.scoped(:order => "#{provider_options[:timestamp]} desc").all(provider_options[:find_options].dup).first.updated_on
|
|
||||||
else
|
else
|
||||||
to = scope.scoped(:order => "#{provider_options[:timestamp]} desc").all(provider_options[:find_options].dup).first.created_on
|
|
||||||
end
|
|
||||||
from = (to - days.days) > created_time ? (to - days.days) : created_time.to_date
|
|
||||||
else
|
|
||||||
#from = to - Setting.activity_days_default.to_i
|
|
||||||
end
|
|
||||||
|
|
||||||
if from && to
|
if from && to
|
||||||
scope = scope.scoped(:conditions => ["#{provider_options[:timestamp]} BETWEEN ? AND ?", from, to])
|
scope = scope.scoped(:conditions => ["#{provider_options[:timestamp]} BETWEEN ? AND ?", from, to])
|
||||||
end
|
|
||||||
scope.all(provider_options[:find_options].dup)
|
scope.all(provider_options[:find_options].dup)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# 为了首页获取数据基本复制了上面的方法,改变了用户查看权限,增加了对讨论区的识别。
|
# 为了首页获取数据基本复制了上面的方法,改变了用户查看权限,增加了对讨论区的识别。
|
||||||
# 因为新建了讨论区的内容,没有与项目方法混合,但是 event_type 取值类型还在共用,可能会对项目活动取值性能造成影响
|
# 因为新建了讨论区的内容,没有与项目方法混合,但是 event_type 取值类型还在共用,可能会对项目活动取值性能造成影响
|
||||||
|
|
Loading…
Reference in New Issue