diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 6ad1a66b4..8590b836a 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -272,6 +272,7 @@ class WordsController < ApplicationController
format.js{
@user_activity_id = params[:user_activity_id]
@is_in_course = params[:is_in_course]
+ @course_activity = params[:course_activity]
@homework_common_id = params[:homework_common_id]
}
end
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index f442e34e4..f77dd13bf 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -167,6 +167,7 @@
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
+ <%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
发送
diff --git a/app/views/words/leave_homework_message.js.erb b/app/views/words/leave_homework_message.js.erb
index 91525c889..08fed725c 100644
--- a/app/views/words/leave_homework_message.js.erb
+++ b/app/views/words/leave_homework_message.js.erb
@@ -1,5 +1,5 @@
<% if @user_activity_id %>
- $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework_common,:user_activity_id =>@user_activity_id}) %>");
+ $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework_common,:user_activity_id =>@user_activity_id,:course_activity => @course_activity}) %>");
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
<% elsif @homework_common_id && @is_in_course %>
$("#homework_common_<%= @homework_common_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework_common,:is_in_course => @is_in_course}) %>");