修改已经提交过作业、再次提交报403

Homework
sw 11 years ago
parent bc36e16e57
commit 5e91a258fe

@ -227,7 +227,7 @@ class HomeworkAttachController < ApplicationController
def create
bid = Bid.find params[:bid_id]
if User.current.admin? || User.current.member_of_course?(bid.courses.first) # modify by nwb
if bid.homeworks.where("user_id = ?",User.current).count == 0
if bid.homeworks.where("user_id = ?",User.current).empty?
user_id = params[:user_id]
bid_id = params[:bid_id]
if params[:homework_attach]

Loading…
Cancel
Save