diff --git a/app/views/homework_attach/_histoey_new.html.erb b/app/views/homework_attach/_histoey_new.html.erb index 8332af691..f5bda1909 100644 --- a/app/views/homework_attach/_histoey_new.html.erb +++ b/app/views/homework_attach/_histoey_new.html.erb @@ -35,11 +35,11 @@
- <%= render :partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true} %> + <%= render :partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true,:show_jour => true} %>
- <%= render :partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false} %> + <%= render :partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false || @is_teacher, :show_jour => false} %>
\ No newline at end of file diff --git a/app/views/homework_attach/_review.html.erb b/app/views/homework_attach/_review.html.erb index 17dac35bf..6663bc6fe 100644 --- a/app/views/homework_attach/_review.html.erb +++ b/app/views/homework_attach/_review.html.erb @@ -1,8 +1,8 @@ -<% if !review_list.nil?%> +<% unless review_list.nil?%> <% review_list.each do |review|%> <% user = review.rater %> - <% jour = get_homework_review @homework,@is_teacher,user %> + <% jour = get_homework_review @homework,show_jour,user %>
<% if show_name %> diff --git a/app/views/homework_attach/addjours.js.erb b/app/views/homework_attach/addjours.js.erb index 186addc56..29cd82d9c 100644 --- a/app/views/homework_attach/addjours.js.erb +++ b/app/views/homework_attach/addjours.js.erb @@ -2,12 +2,12 @@ <% if @is_teacher %> HoverLi(4); $('#jour_count_4').html('<%= @teacher_stars.count %>'); - $('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true})) %>'); + $('#tbc_04').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @teacher_stars,:show_name => true,:show_jour => true})) %>'); //匿评 <% elsif @is_anonymous_comments %> HoverLi(5); $('#jour_count_5').html('<%= @student_stars.count %>'); - $('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => true})) %>'); + $('#tbc_05').html('<%= escape_javascript(render(:partial => 'homework_attach/review',:locals => {:review_list => @student_stars,:show_name => false || @is_teacher, :show_jour => false})) %>'); //留言 <% else %> HoverLi(3);