1.当作业未选定项目时,项目得分为灰色的N/A,选定了项目,项目得分为橘色的分数

2.当无人对作业进行互评、综评时,作业的互评、综评得分为灰色的N/A,有人进行评分则为橘色的分数
3.简化代码
GitlabVersion
sw 11 years ago
parent 7702b746c6
commit 12087f40c7

@ -97,12 +97,8 @@
</td> </td>
<td> <td>
<strong>项目得分:&nbsp; <strong>项目得分:&nbsp;
<span style="color: #EC6300;"> <span style="color: <%= homework.project.nil? ? "#727272" : "#EC6300"%>;">
<% if homework.project != nil %> <%= homework.project.nil? ? "N/A" : project_score(homework.project) %>
<%= project_score homework.project %>
<% else %>
0.00
<% end %>
</span> </span>
</strong> </strong>
</td> </td>
@ -120,14 +116,17 @@
</td> </td>
<td> <td>
<strong>互评得分:&nbsp; <strong>互评得分:&nbsp;
<span style="color: #EC6300;"><%= student_score_for_homework(homework) %></span>&nbsp;&nbsp; <% student_homework_score = student_score_for_homework(homework) %>
<span style="color:<%= student_homework_score == "0.00"? "#727272" : "#EC6300"%>;">
<% score = student_homework_score == "0.00"? "N/A" : student_homework_score %>
<%= score %>
</span>&nbsp;&nbsp;
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%> <% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
<%= link_to "学生互评>>",homework_attach_path(homework) %> <%= link_to "学生互评>>",homework_attach_path(homework) %>
<% end %> <% end %>
</strong> </strong>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: top;width: 200px;"> <td style="vertical-align: top;width: 200px;">
<% if is_evaluation || is_teacher%> <% if is_evaluation || is_teacher%>
@ -136,7 +135,11 @@
</td> </td>
<td> <td>
<strong>终评得分:&nbsp; <strong>终评得分:&nbsp;
<span style="color: #EC6300;"><%= score_for_homework homework %></span>&nbsp;&nbsp; <% totle_homework_score = score_for_homework(homework) %>
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
<%= score %>
</span>&nbsp;&nbsp;
<% if is_teacher %> <% if is_teacher %>
<%= link_to "教师评分>>",homework_attach_path(homework) %> <%= link_to "教师评分>>",homework_attach_path(homework) %>
<% end %> <% end %>

Loading…
Cancel
Save