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 d98e1b6a8..4d38f60a2 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 @@ -23,27 +23,25 @@
- <%= !score_open || st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%> + <%= st.teacher_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",st.teacher_score))%>
- <%= !score_open || st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%> + <%= st.teaching_asistant_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",st.teaching_asistant_score))%>
<% if @homework.anonymous_comment == 0 %>
- <% if !score_open || st.student_score.nil? %> + <% 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 !score_open %> - -- - <% elsif @homework.homework_detail_manual.comment_status < 2 %> + end %> + <% if @homework.homework_detail_manual.comment_status < 2 %> 未参与 <% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %> 待匿评 @@ -53,16 +51,20 @@ 迟交 <% end %> <% else %> - <%= format("%.1f", st.student_score) %> - - (<%= anon_count %>) - -
- 现共有 -  <%= anon_count %>  - 名学生进行了匿评,平均分为 -  <%= format("%.1f", st.student_score) %> 分。 -
+ <% if !score_open %> + ** + <% else %> + <%= format("%.1f", st.student_score) %> + + (<%= anon_count %>) + +
+ 现共有 +  <%= anon_count %>  + 名学生进行了匿评,平均分为 +  <%= format("%.1f", st.student_score) %> 分。 +
+ <% end %> <% end %>
@@ -70,7 +72,7 @@
<% score = st.work_score %>
- <%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%> + <%= score.nil? ? "--" : (!score_open ? "**" || format("%.1f",score<0 ? 0 : score))%> <% unless !score_open || score.nil?%>
diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 304625702..7cd1632a8 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -53,25 +53,23 @@ <% end %> - <%= !score_open || student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%> + <%= student_work.teacher_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.teacher_score))%> - <%= !score_open || student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> + <%= student_work.teaching_asistant_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",student_work.teaching_asistant_score))%> <% if @homework.homework_type == 2%> - <%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%> + <%= student_work.system_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",student_work.system_score))%> <% end%> <% if @homework.anonymous_comment == 0%> - <% if !score_open || student_work.student_score.nil? %> - <% if !score_open %> - -- - <% elsif student_work.work_status != 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 %> @@ -85,18 +83,22 @@ -- <% end %> <% else %> - <%=format("%.1f",student_work.student_score) %> - - (<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>) - -
- - - 现共有 -  <%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>  - 名学生进行了匿评,平均分为 -  <%= format("%.1f",student_work.student_score)%> 分。 -
+ <% if !score_open %> + ** + <% else %> + <%=format("%.1f",student_work.student_score) %> + + (<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>) + +
+ + + 现共有 +  <%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>  + 名学生进行了匿评,平均分为 +  <%= format("%.1f",student_work.student_score)%> 分。 +
+ <% end %> <% end %> <% end %> @@ -107,7 +109,7 @@ <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%> <% end %> - <%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%> + <%= score.nil? ? "--" : (!score_open ? "**" || format("%.1f",score<0 ? 0 : score))%> <% unless !score_open || score.nil?%>
diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index 0e270af9e..43742bf8d 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -81,7 +81,7 @@ <% if @homework.homework_type == 2%> - <%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%> + <%= student_work.system_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.system_score))%> <% end%>