diff --git a/app/views/homework_attach/_comprehensive_evaluation.html.erb b/app/views/homework_attach/_comprehensive_evaluation.html.erb index 59654c52c..ac1793271 100644 --- a/app/views/homework_attach/_comprehensive_evaluation.html.erb +++ b/app/views/homework_attach/_comprehensive_evaluation.html.erb @@ -1,55 +1,31 @@ <% is_teacher = is_course_teacher User.current,homework.bid.courses.first %> -<% if comprehensive_evaluation != nil && comprehensive_evaluation.count > 0 %> -
-
- 作业综评: - <% if teaher_score != "0.00" %> - <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> - <% end %> -
-
-
<%= comprehensive_evaluation.first.notes%>
+ +
+
+ <%= l(:lable_teacher_evaluation)%>: + <% if teaher_score != "0.00" %> + <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> + <% end %> +
+
+ <%= comprehensive_evaluation.first.notes if !comprehensive_evaluation.nil? && comprehensive_evaluation.count > 0%>
- <% 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, - :comprehensive_evaluation => nil} %> -
-
- <% else %> -
-
- 作业综评: - <% if teaher_score != "0.00" %> - <%= render :partial => 'show_score', locals: {:stars => teaher_score} %> - <% end %> -
- <% if teaher_score == "0.00" %> -
老师还未进行评价!
- <% end %> -
+ <% if(teaher_score == "0.00" && !(!comprehensive_evaluation.nil? && comprehensive_evaluation.count > 0))%> + <% if is_teacher %> + <%#= render :partial => 'teacher_evaluation', + :locals => {:homework => homework, :comprehensive_evaluation => comprehensive_evaluation} %> + <% else %> +
+ <%= l(:lable_teacher_evaluation_no) %> +
+ <% end %> <% end %> -<% end %> \ No newline at end of file +
+
+ +
+ <% if is_teacher %> + <%= render :partial => 'teacher_evaluation',:locals => {:homework => homework} %> + <% end %> +
\ No newline at end of file diff --git a/app/views/homework_attach/_teacher_evaluation.html.erb b/app/views/homework_attach/_teacher_evaluation.html.erb new file mode 100644 index 000000000..485238416 --- /dev/null +++ b/app/views/homework_attach/_teacher_evaluation.html.erb @@ -0,0 +1,8 @@ +<%= render :partial => 'evaluation', :locals => {:homework => homework} %> +
+ <%= render :partial => 'evaluation_add_jour', + :locals => {:homework_attach => homework, + :sta => 0, + :is_comprehensive_evaluation => 1, + :comprehensive_evaluation => l(:label_leave_a_message)} %> +
\ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index a3ec030c4..ce0222e52 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2146,3 +2146,5 @@ zh: lable_input_class: 在此输入课时 lable_input_class_vilidate: 学时只能为整数 lable_school_list: 学校列表 + lable_teacher_evaluation_no: 老师还未进行评价 + lable_teacher_evaluation: 作业综评