作品列表--改成**

This commit is contained in:
huang 2016-12-03 11:25:41 +08:00
parent 69ab80bf9e
commit 9b8e072753
3 changed files with 43 additions and 39 deletions

View File

@ -23,27 +23,25 @@
<div class="flex-container fl" style="width:340px;"> <div class="flex-container fl" style="width:340px;">
<div class="flex-cell student_work_<%= st.id%>"> <div class="flex-cell student_work_<%= st.id%>">
<span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>"> <span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>">
<%= !score_open || st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%> <%= st.teacher_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",st.teacher_score))%>
</span> </span>
</div> </div>
<div class="flex-cell student_work_<%= st.id%>"> <div class="flex-cell student_work_<%= st.id%>">
<span class="<%= score_color (!score_open || st.teaching_asistant_score.nil? ? nil : st.teaching_asistant_score) %>"> <span class="<%= score_color (!score_open || st.teaching_asistant_score.nil? ? nil : st.teaching_asistant_score) %>">
<%= !score_open || st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%> <%= st.teaching_asistant_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",st.teaching_asistant_score))%>
</span> </span>
</div> </div>
<% if @homework.anonymous_comment == 0 %> <% if @homework.anonymous_comment == 0 %>
<div class="flex-cell student_work_<%= st.id%>"> <div class="flex-cell student_work_<%= st.id%>">
<div class="<%= score_color (!score_open || st.student_score.nil? ? nil : st.student_score)%> student_score_info pr"> <div class="<%= score_color (!score_open || st.student_score.nil? ? nil : st.student_score)%> student_score_info pr">
<% if !score_open || st.student_score.nil? %> <% if st.student_score.nil? %>
<% pro = @homework.student_work_projects.where("user_id = #{st.user_id}").first <% pro = @homework.student_work_projects.where("user_id = #{st.user_id}").first
if pro.nil? || pro.student_work_id == "" || pro.student_work_id.nil? if pro.nil? || pro.student_work_id == "" || pro.student_work_id.nil?
work = st work = st
else else
work = StudentWork.find pro.student_work_id work = StudentWork.find pro.student_work_id
end %> end %>
<% if !score_open %> <% if @homework.homework_detail_manual.comment_status < 2 %>
<span title="">--</span>
<% elsif @homework.homework_detail_manual.comment_status < 2 %>
<span title="尚未开启匿评">未参与</span> <span title="尚未开启匿评">未参与</span>
<% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %> <% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %>
<span title="匿评期间,尚未获得他人匿评">待匿评</span> <span title="匿评期间,尚未获得他人匿评">待匿评</span>
@ -52,6 +50,9 @@
<% else %> <% else %>
<span title="匿评开启后提交的作品,不参加匿评">迟交</span> <span title="匿评开启后提交的作品,不参加匿评">迟交</span>
<% end %> <% end %>
<% else %>
<% if !score_open %>
<span title="">**</span>
<% else %> <% else %>
<%= format("%.1f", st.student_score) %> <%= format("%.1f", st.student_score) %>
<span class="linkBlue"> <span class="linkBlue">
@ -64,13 +65,14 @@
<span class="c_red">&nbsp;<%= format("%.1f", st.student_score) %>&nbsp;</span>分。 <span class="c_red">&nbsp;<%= format("%.1f", st.student_score) %>&nbsp;</span>分。
</div> </div>
<% end %> <% end %>
<% end %>
</div> </div>
</div> </div>
<% end %> <% end %>
<div class="flex-cell"> <div class="flex-cell">
<% score = st.work_score %> <% score = st.work_score %>
<div class="<%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr" style="display: inline"> <div class="<%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr" style="display: inline">
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%> <%= score.nil? ? "--" : (!score_open ? "**" || format("%.1f",score<0 ? 0 : score))%>
<% unless !score_open || score.nil?%> <% unless !score_open || score.nil?%>
<div class="score-tip none tl" style="line-height: 18px; top:-32px; right:-273px;"> <div class="score-tip none tl" style="line-height: 18px; top:-32px; right:-273px;">
<em></em> <em></em>

View File

@ -53,25 +53,23 @@
<% end %> <% end %>
</td> </td>
<td class="hworkList70 <%= score_color (!score_open || student_work.teacher_score.nil? ? nil : student_work.teacher_score)%>"> <td class="hworkList70 <%= score_color (!score_open || student_work.teacher_score.nil? ? nil : student_work.teacher_score)%>">
<%= !score_open || student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%> <%= student_work.teacher_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.teacher_score))%>
</td> </td>
<td class="hworkList70 <%= score_color (!score_open || student_work.teaching_asistant_score.nil? ? nil : student_work.teaching_asistant_score)%>"> <td class="hworkList70 <%= score_color (!score_open || student_work.teaching_asistant_score.nil? ? nil : student_work.teaching_asistant_score)%>">
<%= !score_open || student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> <%= student_work.teaching_asistant_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",student_work.teaching_asistant_score))%>
</td> </td>
<% if @homework.homework_type == 2%> <% if @homework.homework_type == 2%>
<!-- 系统评分 --> <!-- 系统评分 -->
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>"> <td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%> <%= student_work.system_score.nil? ? "--" : (!score_open ? "**" || format("%.1f",student_work.system_score))%>
</td> </td>
<% end%> <% end%>
<% if @homework.anonymous_comment == 0%> <% if @homework.anonymous_comment == 0%>
<td class="hworkList70 <%= score_color (!score_open || student_work.student_score.nil? ? nil : student_work.student_score)%> student_score_info pr"> <td class="hworkList70 <%= score_color (!score_open || student_work.student_score.nil? ? nil : student_work.student_score)%> student_score_info pr">
<% if !score_open || student_work.student_score.nil? %> <% if student_work.student_score.nil? %>
<% if !score_open %> <% if student_work.work_status != 0 %>
<span title="">--</span>
<% elsif student_work.work_status != 0 %>
<% if @homework.homework_detail_manual.comment_status < 2 %> <% if @homework.homework_detail_manual.comment_status < 2 %>
<span title="尚未开启匿评">未参与</span> <span title="尚未开启匿评">未参与</span>
<% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %> <% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %>
@ -84,6 +82,9 @@
<% else %> <% else %>
<span title="">--</span> <span title="">--</span>
<% end %> <% end %>
<% else %>
<% if !score_open %>
<span title="">**</span>
<% else %> <% else %>
<%=format("%.1f",student_work.student_score) %> <%=format("%.1f",student_work.student_score) %>
<span class="linkBlue"> <span class="linkBlue">
@ -98,6 +99,7 @@
<span class="c_red">&nbsp;<%= format("%.1f",student_work.student_score)%>&nbsp;</span>分。 <span class="c_red">&nbsp;<%= format("%.1f",student_work.student_score)%>&nbsp;</span>分。
</div> </div>
<% end %> <% end %>
<% end %>
</td> </td>
<% end %> <% end %>
<!-- 成绩 --> <!-- 成绩 -->
@ -107,7 +109,7 @@
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%> <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
<% end %> <% end %>
<td class="hworkList70 <%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr"> <td class="hworkList70 <%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr">
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%> <%= score.nil? ? "--" : (!score_open ? "**" || format("%.1f",score<0 ? 0 : score))%>
<% unless !score_open || score.nil?%> <% unless !score_open || score.nil?%>
<div class="score-tip none tl" style="line-height: 18px;"> <div class="score-tip none tl" style="line-height: 18px;">
<em></em> <em></em>

View File

@ -81,7 +81,7 @@
<% if @homework.homework_type == 2%> <% if @homework.homework_type == 2%>
<!-- 系统评分 --> <!-- 系统评分 -->
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>"> <td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%> <%= student_work.system_score.nil? ? "--" : (!score_open ? "**" : format("%.1f",student_work.system_score))%>
</td> </td>
<% end%> <% end%>