修改非课程成员能看到提交作业按钮
This commit is contained in:
parent
dc480ecd44
commit
3215786538
|
@ -328,7 +328,7 @@ module CoursesHelper
|
|||
#当前用户是不是指定课程的学生
|
||||
def is_cur_course_student course
|
||||
#course.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and members.user_id = #{User.current.id}", {:role_id => StudentRoles}).count != 0
|
||||
!(User.current.allowed_to?(:as_teacher,course))
|
||||
User.current.logged? && User.current.member_of_course?(course) && !(User.current.allowed_to?(:as_teacher,course))
|
||||
#修改:能新建占位且不能新建任务的角色判定为学生
|
||||
#is_student = false
|
||||
#@membership = User.current.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
|
|
Loading…
Reference in New Issue