#1307修复作业列表真实姓名只显示名不显示姓的BUG
This commit is contained in:
parent
e112bb2803
commit
50e1f41345
|
@ -441,7 +441,7 @@ module CoursesHelper
|
|||
def homework_user_of_homework homework,is_teacher
|
||||
homework_users = ""
|
||||
homework.users.each do |user|
|
||||
homework_users = homework_users + (is_teacher ? user.realname : user.name)
|
||||
homework_users = homework_users + (is_teacher ? (user.firstname + user.lastname) : user.login)
|
||||
if user != homework.users.last
|
||||
homework_users = homework_users + "、"
|
||||
end
|
||||
|
|
|
@ -28,13 +28,15 @@
|
|||
<tr>
|
||||
<td style="vertical-align: top;width: 70px" >
|
||||
<table style="text-align: center;width: 100%;table-layout: fixed">
|
||||
<% user_name = is_teacher ? (homework.user.firstname + homework.user.lastname) : homework.user.login %>
|
||||
<tr>
|
||||
<td title="<%= homework.user.name %>"><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
||||
<td title="<%= user_name %>"><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="<%= homework.user.name %>">
|
||||
|
||||
<td title="<%= user_name %>">
|
||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><strong>
|
||||
<%= link_to (is_teacher ? homework.user.realname : homework.user ), user_path(homework.user),{:style => "color:#727272"} %>
|
||||
<%= link_to user_name, user_path(homework.user),{:style => "color:#727272"} %>
|
||||
</strong></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue