diff --git a/app/views/homework_attach/_comprehensive_evaluation.html.erb b/app/views/homework_attach/_comprehensive_evaluation.html.erb index b9ae1b496..59654c52c 100644 --- a/app/views/homework_attach/_comprehensive_evaluation.html.erb +++ b/app/views/homework_attach/_comprehensive_evaluation.html.erb @@ -1,31 +1,55 @@ <% is_teacher = is_course_teacher User.current,homework.bid.courses.first %> <% if comprehensive_evaluation != nil && comprehensive_evaluation.count > 0 %> -
+
作业综评: - <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> + <% if teaher_score != "0.00" %> + <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> + <% end %>
<%= comprehensive_evaluation.first.notes%>
+ <% if is_teacher %> + <%= render :partial => 'evaluation', :locals => {:homework => homework} %> +
+ <%= render :partial => 'evaluation_add_jour', + :locals => {:homework_attach => homework, + :sta => 0, + :is_comprehensive_evaluation => 1, + :comprehensive_evaluation => comprehensive_evaluation.first.notes} %> +
+ <% end %>
<% else %> <% if is_teacher %>
作业综评: + <% if teaher_score != "0.00" %> + <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> + <% end %>
<%= render :partial => 'evaluation', :locals => {:homework => homework} %>
- <%= render :partial => 'evaluation_add_jour', :locals => {:homework_attach => homework, :sta => 0,:is_comprehensive_evaluation => 1} %> + <%= render :partial => 'evaluation_add_jour', + :locals => {:homework_attach => homework, + :sta => 0, + :is_comprehensive_evaluation => 1, + :comprehensive_evaluation => nil} %>
<% else %>
作业综评: + <% if teaher_score != "0.00" %> + <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> + <% end %>
-
老师还未进行评价!
+ <% if teaher_score == "0.00" %> +
老师还未进行评价!
+ <% end %>
<% end %> <% end %> \ No newline at end of file diff --git a/app/views/homework_attach/_evaluation.html.erb b/app/views/homework_attach/_evaluation.html.erb index bd8677fb1..40996c787 100644 --- a/app/views/homework_attach/_evaluation.html.erb +++ b/app/views/homework_attach/_evaluation.html.erb @@ -1,4 +1,4 @@
评分: <%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %> - (每个用户对每份作业只能进行一次评价!) + (您可以对作业进行多次评价,以最后一次评价为最终结果)
\ No newline at end of file diff --git a/app/views/homework_attach/_evaluation_add_jour.html.erb b/app/views/homework_attach/_evaluation_add_jour.html.erb index 5ba198013..5103b50ae 100644 --- a/app/views/homework_attach/_evaluation_add_jour.html.erb +++ b/app/views/homework_attach/_evaluation_add_jour.html.erb @@ -65,10 +65,13 @@ <% if User.current.logged? %> - + :style => "resize: none;", :class => 'noline'%> +
<%= f.text_area 'user_message', :rows => 3, :cols => 65, :value => "#{l(:label_leave_a_message)}", + + <%= f.text_area 'user_message', :rows => 3, :cols => 65, + :value => "#{comprehensive_evaluation.nil? ? l(:label_leave_a_message) : comprehensive_evaluation}", :onfocus => "clearInfo('new_form_user_message','#{l(:label_leave_a_message)}')", :onblur => "showInfo('new_form_user_message','#{l(:label_leave_a_message)}')", - :style => "resize: none;", :class => 'noline'%>
<%= f.text_field :reference_user_id, :style=>"display:none"%> @@ -81,7 +84,8 @@ <%= submit_tag l(:button_clear_meassge), :name => nil, :class => "enterprise", :onclick => "clearMessage('new_form_user_message');", :onmouseout => "this.style.backgroundPosition = 'left top'", - :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> + :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> + <% else %> diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb index 87dcf60cb..d3fe3f334 100644 --- a/app/views/homework_attach/show.html.erb +++ b/app/views/homework_attach/show.html.erb @@ -9,7 +9,6 @@ <% is_student = is_cur_course_student @homework.bid.courses.first %> <% is_teacher = is_course_teacher User.current,@homework.bid.courses.first %>

<%= notice %>

-