调用作业课程时首先判断该作业的所属课程是否存在
This commit is contained in:
parent
683acfcafc
commit
73afb7e6c8
|
@ -436,7 +436,7 @@ class UsersController < ApplicationController
|
|||
activity = activity.reject { |e|
|
||||
((e.act_type=="Issue") && ( !e.act.visible?(User.current))) ||
|
||||
((e.act_type == "Journal") && (!e.act.project.visible?(User.current))) ||
|
||||
((e.act_type == "Bid") && (e.act.homework_for_courses.count > 0 &&
|
||||
((e.act_type == "Bid") && (e.act.courses.first &&
|
||||
(!e.act.homework_for_courses.first.course.visible?(User.current) ||
|
||||
!User.current.member_of_course?(e.act.homework_for_courses.first.course) || !User.current.admin?)))
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20141201085218) do
|
||||
ActiveRecord::Schema.define(:version => 20141210070327) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
Loading…
Reference in New Issue