educoder/app/views/student_work/_evaluation_work.html.erb

33 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- 匿评作品列表,显示某一个作品的信息 -->
<tr id="student_work_<%= student_work.id%>">
<% if @homework.homework_type != 3 %>
<% is_my_work = student_work.user == User.current%>
<% else %>
<% pro = @homework.student_work_projects.where(:user_id => User.current.id).first %>
<% is_my_work = pro && pro.student_work_id == student_work.id%>
<% end %>
<% if is_my_work%>
<td><%= index + 1 %></td>
<td><%= student_work.user.show_real_name%></td>
<td><%= format_time student_work.updated_at %></td>
<td class="<%= score_color student_work.student_score %>">
<%= student_work.student_score.nil? ? '--' : format("%.1f",student_work.student_score)+"#{student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count}" %>
</td>
<td>
<%= link_to '查看', student_work_path(student_work), :class => 'link-color-blue' %>
</td>
<% else%>
<td><%= index + 1 %></td>
<td>匿名</td>
<td><%= format_time student_work.updated_at %></td>
<% my_score = student_work_score(student_work,User.current,3) %>
<td class="<%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%>">
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
</td>
<td>
<%= link_to @homework.homework_detail_manual.comment_status == 3 ? '评阅' : '查看', student_work_path(student_work), :class => 'link-color-blue' %>
</td>
<% end%>
</tr>