From 2c4e86408058c3634234aabfd21c6a2bf601fa23 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 3 Mar 2015 17:53:15 +0800 Subject: [PATCH] =?UTF-8?q?#1949=20=E5=AD=A6=E7=94=9F=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=80=9A=E8=BF=87url=E8=AE=BF=E9=97=AE=E8=80=81=E5=B8=88?= =?UTF-8?q?=E5=B9=B6=E6=9C=AA=E5=8F=91=E5=B8=83=E7=9A=84=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E5=B9=B6=E8=BF=9B=E8=A1=8C=E4=BD=9C=E7=AD=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 1b2794034..b897d039a 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -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