匿评作业和非匿评作业,作品列表显示区分
This commit is contained in:
parent
5694b99bf1
commit
3906cbbf75
|
@ -0,0 +1,71 @@
|
|||
<!-- 作品列表,显示某一个作品的信息 -->
|
||||
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
||||
<li class="hwork_num">
|
||||
<span>
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</span>
|
||||
</li>
|
||||
<li class=" hwork_name ">
|
||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_tit">
|
||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||
</li>
|
||||
<li class=" hwork_time_c">
|
||||
<% 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%>
|
||||
<%= student_work.created_at.strftime("%m-%d").to_s%>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" hwork_score <%= score_color student_work.teacher_score%>">
|
||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
</li>
|
||||
<li class=" hwork_score <%= score_color student_work.teaching_asistant_score%>">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
</li>
|
||||
<li class=" hwork_code02 <%= score_color student_work.student_score%> student_score_info" >
|
||||
<%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
|
||||
<% unless student_work.student_score.nil?%>
|
||||
<span class="">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
|
||||
</span>
|
||||
<div class="info_ni">
|
||||
现共有
|
||||
<span class="c_red"> <%= student_work.student_works_scores.where(:reviewer_role => 3).count%> </span>
|
||||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
</li>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<li class=" hwork_score <%= score_color score%> student_final_scor_info">
|
||||
<%= score.nil? ? "--" : format("%.1f",score)%>
|
||||
<% unless score.nil?%>
|
||||
<% if @homework.homework_type == 1%>
|
||||
<!-- 匿评作品显示缺评扣分 -->
|
||||
<div class="info_ni">
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||
迟交扣分
|
||||
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
||||
缺评扣分
|
||||
<span class="c_red"> <%= student_work.absence_penalty%> </span>分,
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score)%> </span>分。
|
||||
</div>
|
||||
<% else%>
|
||||
<!-- 非匿评作品不显示缺评扣分 -->
|
||||
<div class="info_ni">
|
||||
作品最终评分为
|
||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||
迟交扣分
|
||||
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
||||
最终成绩为
|
||||
<span class="c_red"> <%= format("%.1f",score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
<% end%>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul><!---hwork_ul end-->
|
|
@ -87,7 +87,16 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<% @stundet_works.each do |student_work|%>
|
||||
<%= render :partial => (@is_evaluation ? 'evaluation_work' :'student_work'),:locals => {:student_work => student_work}%>
|
||||
<% if @is_evaluation%>
|
||||
<%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%>
|
||||
<% else %>
|
||||
<% if @homework.homework_type == 1%>
|
||||
<%= render :partial => "eavluation_student_work",:locals => {:student_work => student_work}%>
|
||||
<% else%>
|
||||
<%= render :partial => "student_work",:locals => {:student_work => student_work}%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
|
||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
||||
<% end%>
|
||||
|
||||
|
|
Loading…
Reference in New Issue