教师用户查看课程学生列表时显示真实姓名
This commit is contained in:
parent
4d21b853bf
commit
ca519ce22d
|
@ -641,7 +641,7 @@ class CoursesController < ApplicationController
|
|||
def isCourseTeacher(id,course)
|
||||
result = false
|
||||
user = User.find(id)
|
||||
if user.nil? && user.allowed_to?(:as_teacher,course)#@teachers && @teachers.count != 0 && @teachers.find_by_user_id(id) != nil
|
||||
if !user.nil? && user.allowed_to?(:as_teacher,course)
|
||||
result = true
|
||||
end
|
||||
result
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
<% end %>
|
||||
<!--teacher's code disapeared moified by huang-->
|
||||
|
||||
<% unless member.user.user_extensions.identity ==0 %>
|
||||
<!-- added by bai 加学号 -->
|
||||
<%if @canShowCode%>
|
||||
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
|
||||
<% end %>
|
||||
<%if @canShowCode%>
|
||||
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
|
||||
<% end %>
|
||||
<div class ="clear avatar_name">
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue