学生列表得分显示
This commit is contained in:
parent
9d00979647
commit
20e07bb1ba
|
@ -42,6 +42,11 @@ module ApplicationHelper
|
||||||
number > 10000 ? (number.to_f / 1000).round.to_s + "k" : number
|
number > 10000 ? (number.to_f / 1000).round.to_s + "k" : number
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 判断某个课程是否包含仅对自己可见的作业
|
||||||
|
def course_has_score_open_common_homework course
|
||||||
|
course.homework_commons.select{|hc| hc.score_open == 0}.count > 0 ? true : false
|
||||||
|
end
|
||||||
|
|
||||||
# 隐藏项目以外的信息
|
# 隐藏项目以外的信息
|
||||||
# return: true 显示,false 不显示
|
# return: true 显示,false 不显示
|
||||||
def hidden_unproject_infos
|
def hidden_unproject_infos
|
||||||
|
|
|
@ -86,19 +86,27 @@
|
||||||
<span class="sy_class_users_st_num" title="<%= user.user_extensions.student_id %>"><%= user.user_extensions.student_id %></span>
|
<span class="sy_class_users_st_num" title="<%= user.user_extensions.student_id %>"><%= user.user_extensions.student_id %></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<% if !is_teacher && User.current.id != member.user_id && course_has_score_open_common_homework(@course) %>
|
||||||
|
<a>**</a>
|
||||||
|
<% else %>
|
||||||
<%= link_to format("%0.2f", hw_score), {
|
<%= link_to format("%0.2f", hw_score), {
|
||||||
:action => 'show_member_score',
|
:action => 'show_member_score',
|
||||||
:member_id => member.id,
|
:member_id => member.id,
|
||||||
:remote => true},
|
:remote => true},
|
||||||
:class => "" %>
|
:class => "" %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= ex_score %></td>
|
<td><%= ex_score %></td>
|
||||||
<td>
|
<td>
|
||||||
|
<% if !is_teacher && User.current.id != member.user_id && course_has_score_open_common_homework(@course) %>
|
||||||
|
<a>**</a>
|
||||||
|
<% else %>
|
||||||
<%= link_to act_score, {
|
<%= link_to act_score, {
|
||||||
:action => 'show_member_act_score',
|
:action => 'show_member_act_score',
|
||||||
:member_id => member.id,
|
:member_id => member.id,
|
||||||
:remote => true},
|
:remote => true},
|
||||||
:class => '' %>
|
:class => '' %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td class="pr">
|
<td class="pr">
|
||||||
<span class="sum_score_tip"><%= format("%0.2f", sum) %></span>
|
<span class="sum_score_tip"><%= format("%0.2f", sum) %></span>
|
||||||
|
|
Loading…
Reference in New Issue