diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 9ae57db3d..e24a7386d 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -175,7 +175,7 @@ class CoursesController < ApplicationController ## 有角色参数的才是课程,没有的就是项目 @render_file = 'member_list' @teachers= searchTeacherAndAssistant(@course) - @canShowCode = isCourseTeacher(User.current.id,@course) + @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' case params[:role] when '1' @subPage_title = l :label_teacher_list diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index edd04bc97..a6ee0b9b4 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -13,7 +13,7 @@ <% end %> - <%if @canShowCode%> + <% if @canShowCode %> <%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %> <% end %>
  diff --git a/lib/tasks/user_new_score.rake b/lib/tasks/user_new_score.rake index 19f003f4d..bbcc8a310 100644 --- a/lib/tasks/user_new_score.rake +++ b/lib/tasks/user_new_score.rake @@ -3,6 +3,7 @@ task :user_new_score do puts "user_score sync." end +#速度太慢,不用 namespace :user_new_score do desc "calculating user score" task :calculating => :environment do