匿评状态的调整
This commit is contained in:
parent
cb67e136d6
commit
97f40e4697
|
@ -27,7 +27,21 @@
|
|||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<div class="<%= score_color st.student_score%> student_score_info pr">
|
||||
<% if st.student_score.nil? %>
|
||||
<span title="该作品未被匿评">未参与</span>
|
||||
<% 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 %>
|
||||
<span title="尚未开启匿评">未参与</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %>
|
||||
<span title="匿评期间,尚未获得他人匿评">待匿评</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 3 && work.student_works_evaluation_distributions.count != 0 %>
|
||||
<span title="匿评已截止,未获得他人匿评">未评分</span>
|
||||
<% else %>
|
||||
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= format("%.1f", st.student_score) %>
|
||||
<% end %>
|
||||
|
|
|
@ -69,7 +69,19 @@
|
|||
<% if @homework.anonymous_comment == 0%>
|
||||
<td class="hworkList70 <%= score_color student_work.student_score%> student_score_info pr">
|
||||
<% if student_work.student_score.nil? %>
|
||||
<span title="该作品未被匿评">未参与</span>
|
||||
<% if student_work.work_status != 0 %>
|
||||
<% if @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<span title="尚未开启匿评">未参与</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %>
|
||||
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 2 && student_work.student_works_evaluation_distributions.count != 0 %>
|
||||
<span title="匿评期间,尚未获得他人匿评">待匿评</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 3 && student_work.student_works_evaluation_distributions.count != 0 %>
|
||||
<span title="匿评已截止,未获得他人匿评">未评分</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span title="">--</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%=format("%.1f",student_work.student_score) %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue