#1659 修改助教点击编辑作业报403
This commit is contained in:
parent
64497b10e4
commit
077476f39d
|
@ -842,7 +842,7 @@ class BidsController < ApplicationController
|
|||
# 编辑作业
|
||||
def edit
|
||||
@bid = Bid.find(params[:bid_id])
|
||||
if (User.current.admin?||User.current.id==@bid.author_id)
|
||||
if (User.current.admin?||User.current.allowed_to?(:as_teacher,@bid.courses.first))
|
||||
@course_id = params[:course_id]
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
|
@ -884,6 +884,7 @@ class BidsController < ApplicationController
|
|||
def new_submit_homework
|
||||
#render html to prepare create submit homework
|
||||
find_bid
|
||||
find_bid
|
||||
render :layout => 'base_homework'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue