diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb
index a2c2ce5bc..8757ded98 100644
--- a/app/controllers/homework_attach_controller.rb
+++ b/app/controllers/homework_attach_controller.rb
@@ -426,12 +426,12 @@ class HomeworkAttachController < ApplicationController
def addjours
@homework = HomeworkAttach.find(params[:jour_id])
@add_jour = @homework.addjours User.current.id, params[:new_form][:user_message],0,params[:is_comprehensive_evaluation]
- @jours = @homework.journals_for_messages.where("is_comprehensive_evaluation is null").order("created_on DESC")
- @limit = 10
- @feedback_count = @jours.count
- @feedback_pages = Paginator.new @feedback_count, @limit, params['page']
- @offset ||= @feedback_pages.offset
- @jour = @jours[@offset, @limit]
+ @jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC")
+ #@limit = 10
+ #@feedback_count = @jours.count
+ #@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
+ #@offset ||= @feedback_pages.offset
+ #@jour = @jours[@offset, @limit]
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
@totle_score = score_for_homework @homework
diff --git a/app/helpers/homework_attach_helper.rb b/app/helpers/homework_attach_helper.rb
index ec66a42d9..d8d418da5 100644
--- a/app/helpers/homework_attach_helper.rb
+++ b/app/helpers/homework_attach_helper.rb
@@ -98,9 +98,9 @@ module HomeworkAttachHelper
end
array.each do |member|
if member == array.last
- ary += member.to_s + ")"
+ ary += member.id.to_s + ")"
else
- ary += member.to_s + ","
+ ary += member.id.to_s + ","
end
end
ary
diff --git a/app/views/homework_attach/_histoey_new.html.erb b/app/views/homework_attach/_histoey_new.html.erb
new file mode 100644
index 000000000..3ae103040
--- /dev/null
+++ b/app/views/homework_attach/_histoey_new.html.erb
@@ -0,0 +1,25 @@
+
+
+
+ -
+ <%= l(:label_teacher_comments) %>(<%= @comprehensive_evaluation.nil? ? 0 : @comprehensive_evaluation.count %>)
+ -
+ <%= l(:label_anonymous_comments) %>(<%= @anonymous_comments.nil? ? 0 : @anonymous_comments.count %>)
+ -
+ <%= l(:label_responses) %>(<%= @jours.nil? ? 0 : @jours.count %>)
+
+
+
+
+
+ <%= render :partial => 'homework_attach/jour',:locals => {:jours => @jours,:show_score => false,:show_name => true} %>
+
+
+
+ <%= render :partial => 'homework_attach/jour',:locals => {:jours => @comprehensive_evaluation,:show_score => true,:show_name => true} %>
+
+
+ <%= render :partial => 'homework_attach/jour',:locals => {:jours => @anonymous_comments,:show_score => true,:show_name => false} %>
+
+
+
\ No newline at end of file
diff --git a/app/views/homework_attach/_jour.html.erb b/app/views/homework_attach/_jour.html.erb
index 06800084c..30c8b9026 100644
--- a/app/views/homework_attach/_jour.html.erb
+++ b/app/views/homework_attach/_jour.html.erb
@@ -1,11 +1,22 @@
+<% jours.nil? || jours.count == 0 || jours.each do |jour| %>
-
+
<%= link_to jour.user, user_path(jour.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%>
-
<%= jour.created_on %>
- <%= l(:label_work_rating) %>:
- <%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
+ <%= jour.created_on %>
+
+ <% if show_score %>
+ <%= l(:label_work_rating) %>:
+ <%= render :partial => 'show_score', locals: {:stars => get_homework_score(jour.user,@homework ) } %>
+ <% end %>
<%= textilizable jour.notes%>
@@ -25,4 +36,5 @@
-
\ No newline at end of file
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/homework_attach/_show.html.erb b/app/views/homework_attach/_show.html.erb
index 3a17ecb88..5de492f21 100644
--- a/app/views/homework_attach/_show.html.erb
+++ b/app/views/homework_attach/_show.html.erb
@@ -75,40 +75,7 @@
-
-
-
- -
- <%= l(:label_teacher_comments) %>(<%= @comprehensive_evaluation.nil? ? 0 : @comprehensive_evaluation.count %>)
- -
- <%= l(:label_anonymous_comments) %>(<%= @anonymous_comments.nil? ? 0 : @anonymous_comments.count %>)
- -
- <%= l(:label_responses) %>(<%= @jours.nil? ? 0 : @jours.count %>)
-
-
-
-
-
- <% @jours.each do |jour| %>
- <%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
- <% end %>
-
-
-
- <% @comprehensive_evaluation.nil? || @comprehensive_evaluation.count == 0 || @comprehensive_evaluation.each do |jour| %>
- <%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
- <% end %>
-
-
- <%= @anonymous_comments.nil? || @anonymous_comments.each do |jour| %>
- <%= render :partial => 'homework_attach/jour',:locals => {:jour => jour} %>
- <% end %>
-
-
-
-
+ <%= render :partial => 'histoey_new' %>
-
-
\ No newline at end of file
diff --git a/app/views/homework_attach/addjours.js.erb b/app/views/homework_attach/addjours.js.erb
index e16609b68..ae95d2b6c 100644
--- a/app/views/homework_attach/addjours.js.erb
+++ b/app/views/homework_attach/addjours.js.erb
@@ -1,9 +1,19 @@
+//教师评论
<% if @add_jour.is_comprehensive_evaluation == 1 %>
$('#comprehensive_evaluation').html('<%= escape_javascript(render(:partial => 'comprehensive_evaluation',
:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework,:teaher_score => @teaher_score} )) %>');
+//匿评
+<% elsif @add_jour.is_comprehensive_evaluation == 2 %>
+// $('#message').html('<#%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
+// $('#pre_show').html('<#%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
+ HoverLi(5);
+ $('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jours,:show_score => false,:show_name => true})) %>')
+ $('#new_form_user_message').val("");
+ $('#new_form_reference_user_id').val("");
+//留言
<% else %>
- $('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
- $('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
- $('#new_form_user_message').val("");
- $('#new_form_reference_user_id').val("");
+ HoverLi(3);
+ $('#tbc_03').html('<%= escape_javascript(render(:partial => 'homework_attach/jour',:locals => {:jours => @jours,:show_score => false,:show_name => true})) %>')
+ $('#new_form_user_message').val("");
+ $('#new_form_reference_user_id').val("");
<% end %>
\ No newline at end of file
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a8d85efed..18a4819c5 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1849,4 +1849,5 @@ en:
label_participation_person: The participation of personnel
label_homework_without_description: The homework without any description!
label_teacher_comments: Teacher comments
- label_anonymous_comments: Anonymous comments
\ No newline at end of file
+ label_anonymous_comments: Anonymous comments
+ label_anonymous: Anonymous
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 51b73ce24..a92832065 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2181,4 +2181,5 @@ zh:
label_homework_without_description: 该作业无任何描述!
label_sure_exit_homework: 是否确认退出该作业
label_teacher_comments: 教师评论
- label_anonymous_comments: 匿评
\ No newline at end of file
+ label_anonymous_comments: 匿评
+ label_anonymous: 匿名
\ No newline at end of file