匿评状态调整

This commit is contained in:
cxt 2016-11-25 18:40:04 +08:00
parent 8a52e136cf
commit 9115020a43
5 changed files with 28 additions and 18 deletions

View File

@ -1,7 +1,7 @@
<div class="orig_user fl">
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
</div>
<div class="orig_right fl">
<div class="orig_right fl" onmouseout="$(this).children('.orig_reply').show();" onmouseover="$(this).children('.orig_reply').show();">
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
<div class="orig_content ">
@ -16,7 +16,7 @@
<%= comment.content_detail.html_safe %>
<% end %>
</div>
<div class="orig_reply mt-10">
<div class="orig_reply mt-10 none">
<div class="reply">
<span class="reply-right">
<span id="reply_praise_count_<%=comment.id %>">

View File

@ -1,7 +1,7 @@
<div class="orig_user fl">
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
</div>
<div class="orig_right fl">
<div class="orig_right fl" onmouseout="$(this).children('.orig_reply').show();" onmouseover="$(this).children('.orig_reply').show();">
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
<div class="orig_content ">
@ -16,7 +16,7 @@
<%= comment.content_detail.html_safe %>
<% end %>
</div>
<div class="orig_reply mt-10">
<div class="orig_reply mt-10 none">
<div class="reply">
<span class="reply-right">
<span id="reply_praise_count_<%=comment.id %>">

View File

@ -27,12 +27,20 @@
<div class="flex-cell student_work_<%= st.id%>">
<div class="<%= score_color st.student_score%> student_score_info pr">
<% if st.student_score.nil? %>
<% if @homework.homework_detail_manual.comment_status == 2 && st.student_works_evaluation_distributions.count != 0 %>
<span title="该作品正在匿评中">待匿评</span>
<% elsif @homework.homework_detail_manual.comment_status == 3 && st.student_works_evaluation_distributions.count != 0 %>
<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>
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
<% end %>
<% else %>
<%= format("%.1f", st.student_score) %>

View File

@ -69,12 +69,14 @@
<% if @homework.anonymous_comment == 0%>
<td class="hworkList70 <%= score_color student_work.student_score%> student_score_info pr">
<% if student_work.student_score.nil? %>
<% if @homework.homework_detail_manual.comment_status == 2 && student_work.student_works_evaluation_distributions.count != 0 %>
<span title="该作品未被匿评">待匿评</span>
<% 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 == 3 && student_work.student_works_evaluation_distributions.count != 0 %>
<span title="该作品未被匿评">缺评</span>
<span title="匿评已截止,未获得他人匿评">未评分</span>
<% else %>
<span title="该作品未被匿评">未参与</span>
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
<% end %>
<% else %>
<%=format("%.1f",student_work.student_score) %>

View File

@ -1,7 +1,7 @@
<div class="orig_user fl">
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user), :alt => "用户头像" %>
</div>
<div class="orig_right fl">
<div class="orig_right fl" onmouseout="$(this).children('.orig_reply').show();" onmouseover="$(this).children('.orig_reply').show();">
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user), :class => "content-username" %>
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
<div class="orig_content">
@ -16,7 +16,7 @@
<%= comment.content_detail.html_safe %>
<% end %>
</div>
<div class="orig_reply mt-10">
<div class="orig_reply mt-10 none">
<div class="reply">
<span class="reply-right">
<span id="reply_praise_count_<%=comment.id %>">