|
|
|
@ -373,7 +373,7 @@ class BidsController < ApplicationController
|
|
|
|
|
#by xianbo
|
|
|
|
|
def homework_destroy
|
|
|
|
|
@bid_to_destroy = Bid.find params[:course_id]
|
|
|
|
|
(render_403; return false) unless User.current.admin?||User.current.id==bid.author_id
|
|
|
|
|
(render_403; return false) unless User.current.admin?||User.current.id==@bid_to_destroy.author_id
|
|
|
|
|
@bid_to_destroy.destroy
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html { redirect_to :back }
|
|
|
|
|