diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb
index 680a13963..3d6772ea8 100644
--- a/app/controllers/words_controller.rb
+++ b/app/controllers/words_controller.rb
@@ -81,9 +81,10 @@ class WordsController < ApplicationController
@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
+ elsif @journal_destroyed.jour_type == "Course"
+ @course = Course.find @journal_destroyed.jour_id
+ @jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count
end
respond_to do |format|
format.js
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb
index 6993b6554..2a26ff59f 100644
--- a/app/views/layouts/base_courses.html.erb
+++ b/app/views/layouts/base_courses.html.erb
@@ -137,7 +137,7 @@
<%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f14 c_blue02" %>
- <%= link_to "(#{course_feedback_count})", course_feedback_path(@course), :class => "subnav_num c_orange" %>
+ <%= link_to "(#{course_feedback_count})", course_feedback_path(@course), :class => "subnav_num c_orange", :id => "course_jour_count"%>
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f14 c_blue02"%>
diff --git a/app/views/words/destroy.js.erb b/app/views/words/destroy.js.erb
index d00db0695..c3d339685 100644
--- a/app/views/words/destroy.js.erb
+++ b/app/views/words/destroy.js.erb
@@ -1,8 +1,10 @@
<% if @journal_destroyed.nil? %>
alert('<%=l(:notice_failed_delete)%>');
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
- <% if @jours_count %>
+ <% if @bid && @@jours_count %>
$('#jours_count').html("<%= @jours_count %>");
+ <% elsif @course && @jours_count%>
+ $('#course_jour_count').html("(<%= @jours_count %>)");
<% end %>
var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>')
destroyedItem.fadeOut(600,function(){