From 9c336a01c862bbcee99778e4013be527cc2a32f7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 2 Jun 2015 10:47:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E8=AF=84=E5=88=86=E5=AE=9A=E4=B9=89=E4=B8=BA=E6=95=99=E5=B8=88?= =?UTF-8?q?=E8=AF=84=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 9def1c630..7543bc770 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -138,7 +138,7 @@ class StudentWorkController < ApplicationController @score.user_id = User.current.id @score.student_work_id = @work.id role = User.current.members.where("course_id = ?",@course.id).first.roles.first.name - @score.reviewer_role = get_role_by_name(role) + User.current.admin? ? @score.reviewer_role = 1 : @score.reviewer_role = get_role_by_name(role) @is_new = true end