#1949 学生可以通过url访问老师并未发布的问卷并进行作答
This commit is contained in:
parent
da21e61afd
commit
2c4e864080
|
@ -23,6 +23,10 @@ class PollController < ApplicationController
|
|||
|
||||
def show
|
||||
@poll = Poll.find params[:id]
|
||||
if @poll.polls_status != 2 && !User.current.allowed_to?(:as_teacher,@course)
|
||||
render_403
|
||||
return
|
||||
end
|
||||
#已提交问卷的用户不能再访问该界面
|
||||
if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?)
|
||||
render_403
|
||||
|
|
Loading…
Reference in New Issue