From b2f7e4d2346c864b71003ce97ebdbd1318554843 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 29 Sep 2014 16:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=E7=94=A8=E6=88=B7=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E5=AF=B9=E4=BD=9C=E4=B8=9A=E8=BF=9B=E8=A1=8C=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1=E8=AF=84=E4=BB=B7=EF=BC=8C=E6=9C=80=E7=BB=88=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E4=BB=A5=E6=9C=80=E5=90=8E=E4=B8=80=E6=AC=A1=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E4=B8=BA=E6=9C=80=E7=BB=88=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_comprehensive_evaluation.html.erb | 32 ++++++++++++++++--- .../homework_attach/_evaluation.html.erb | 2 +- .../_evaluation_add_jour.html.erb | 10 ++++-- app/views/homework_attach/show.html.erb | 1 - 4 files changed, 36 insertions(+), 9 deletions(-) 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 %>

-