diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index e898b855d..8eaf20716 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -822,7 +822,7 @@ class BidsController < ApplicationController flash[:notice] = l(:label_bid_succeed) end end - redirect_to respond_url(@bid) + redirect_to course_for_bid_path(@bid) else @bid.safe_attributes = params[:bid] @homework = @bid diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index e54df3d22..45564addd 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -127,7 +127,7 @@ class HomeworkAttachController < ApplicationController #获取作业的留言列表 def get_homework_jours - #@user = @bid.author + @user = @bid.author @jours = @bid.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') @jour = paginateHelper @jours,10 @state = false diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index c6a5d2819..8797474ec 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -82,7 +82,12 @@ class WordsController < ApplicationController def destroy @journal_destroyed = JournalsForMessage.delete_message(params[:object_id]) - + if @journal_destroyed.jour_type == "Bid" + @bid = Bid.find(@journal_destroyed.jour_id) + end + if @bid + @jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count + end respond_to do |format| format.js #format.api { render_api_ok } diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index 29ed094bf..2954adbcb 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -1,7 +1,7 @@