diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 5ee3d4823..9dd64bd7a 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -181,6 +181,7 @@ class BidsController < ApplicationController end end + #将某个企业外包需求选为作业,目前此功能已放弃 def create_fork @homework = Bid.new @homework.name = params[:bid][:name] @@ -215,6 +216,7 @@ class BidsController < ApplicationController end end + #有两个路由链接到此方法:/bids/:id /calls/:id但是貌似这两个路由都不能访问。。方法作用有待确认 def show @user = @bid.author @jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') @@ -250,40 +252,31 @@ class BidsController < ApplicationController else @state = 1 end - respond_to do |format| - # format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} - # TO_DO format.js { render :partial => 'set_join', :locals => {:user => User.current, :object_id => params[:id]} } end end def unjoin_in_contest - joined = JoinInContest.where('bid_id = ? and user_id = ?', @bid.id, User.current.id) - joined.each do |join| join.delete end - respond_to do |format| - # format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} format.js { render :partial => 'set_join', :locals => {:user => User.current, :object_id => params[:id]} } end end def new_join - # added by fq - end # added by bai 增加了参与者和竞赛设置 def show_participator render :layout => 'base_contest' - end + #配置竞赛 def settings if @bid.author.id == User.current.id if @bid.reward_type == 2 @@ -296,7 +289,7 @@ class BidsController < ApplicationController end #end - # 显示课程 + # 显示课程作业,但是好像已经废弃 def show_course bids = Bid.where('parent_id = ?', @bid.id) @courses = [] @@ -459,9 +452,7 @@ class BidsController < ApplicationController def show_courseEx if (User.current.logged? && (User.current.member_of_course?(@bid.courses.first) || User.current.admin?)) - # flash[:notice] = "" @membership = User.current.coursememberships.all(:conditions => Course.visible_condition(User.current)) - @user = @bid.author @bidding_project = @bid.biding_projects.all diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index 751558237..f5fe74953 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -29,10 +29,22 @@
<%= textilizable bid, :description %>
-
<%= l(:label_create_time)%> : <%= format_time bid.created_on%>