From 2f2c6c39b5bd6fedcefe6b94ebeb3e807126a535 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 30 Sep 2014 11:11:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=95=99=E5=B8=88=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E5=AD=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- app/views/courses/_member_list.html.erb | 2 +- lib/tasks/user_new_score.rake | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) 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