From 97f40e4697f4291e670d0ec85c3f3ca581ca79ce Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Nov 2016 14:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_evaluation_un_group_member_work.html.erb | 16 +++++++++++++++- .../student_work/_evaluation_un_work.html.erb | 14 +++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/views/student_work/_evaluation_un_group_member_work.html.erb b/app/views/student_work/_evaluation_un_group_member_work.html.erb index 347bea20e..23bef1cb0 100644 --- a/app/views/student_work/_evaluation_un_group_member_work.html.erb +++ b/app/views/student_work/_evaluation_un_group_member_work.html.erb @@ -27,7 +27,21 @@
<% if st.student_score.nil? %> - 未参与 + <% pro = @homework.student_work_projects.where("user_id = #{st.user_id}").first + if pro.nil? || pro.student_work_id == "" || pro.student_work_id.nil? + work = st + else + work = StudentWork.find pro.student_work_id + end %> + <% if @homework.homework_detail_manual.comment_status < 2 %> + 未参与 + <% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %> + 待匿评 + <% elsif @homework.homework_detail_manual.comment_status == 3 && work.student_works_evaluation_distributions.count != 0 %> + 未评分 + <% else %> + 迟交 + <% end %> <% else %> <%= format("%.1f", st.student_score) %> <% end %> diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 9b247f3d6..42985806c 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -69,7 +69,19 @@ <% if @homework.anonymous_comment == 0%> <% if student_work.student_score.nil? %> - 未参与 + <% if student_work.work_status != 0 %> + <% if @homework.homework_detail_manual.comment_status < 2 %> + 未参与 + <% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %> + 迟交 + <% elsif @homework.homework_detail_manual.comment_status == 2 && student_work.student_works_evaluation_distributions.count != 0 %> + 待匿评 + <% elsif @homework.homework_detail_manual.comment_status == 3 && student_work.student_works_evaluation_distributions.count != 0 %> + 未评分 + <% end %> + <% else %> + -- + <% end %> <% else %> <%=format("%.1f",student_work.student_score) %> <% end %>