作品在非匿评阶段的显示

This commit is contained in:
sw 2015-09-17 10:00:41 +08:00
parent 9a859d28bf
commit fa9008d396
2 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,62 @@
<!-- 匿评作品列表,显示某一个作品的信息 -->
<ul class="hworkListRow" id="student_work_<%= student_work.id%>">
<li class="hworkList380 <%= @homework.homework_type == 2 ? '' : 'width455'%>">
<ul>
<li class="hworkName mt12">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%>
</li>
<div class="cl"></div>
<li>
<ul class="mt12">
<li class="hworkDetail mr15">
姓名:<%= student_work.user.show_name%>
</li>
<li class="hworkDetail mr15">
学号:
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li>
<li class="hworkDate">
时间:
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %>
<span class="c_red">迟交</span>
<% else%>
<%= format_time student_work.created_at%>
<% end %>
</li>
</ul>
</li>
</ul>
</li>
<li class="hworkList80 <%= score_color student_work.teacher_score%>">
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
</li>
<li class="hworkList80 <%= score_color student_work.teaching_asistant_score%>">
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
</li>
<% if @homework.homework_type == 2%>
<!-- 系统评分 -->
<li class="hworkList80 c_grey">
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
</li>
<% end%>
<li class="hworkList50 <%= score_color student_work.student_score%>">
<%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
<% unless student_work.student_score.nil? || student_work.homework_common.homework_type == 2%>
<span class="linkBlue">
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
</span>
<div class="infoNi none">
现共有
<span class="c_red">&nbsp;<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>&nbsp;</span>
名学生进行了匿评,平均分为
<span class="c_red">&nbsp;<%= format("%.1f",student_work.student_score)%>&nbsp;</span>分。
</div>
<% end%>
</li>
<!-- 成绩 -->
<li class="hworkList50 c_red">90</li>
</ul>

View File

@ -29,7 +29,7 @@
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</span> </span>
<% else%> <% else%>
<span class="ml30">--</span> --
<% end%> <% end%>
</li> </li>
<li class="hworkDate"> <li class="hworkDate">