From 425a32680adbd8e7caa04804045ef0927adc8fa3 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 5 Jul 2019 15:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=B8=88=E5=88=97=E8=A1=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index d7b039e02..0679e5619 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -284,7 +284,7 @@ class CoursesController < ApplicationController @is_admin = @user_course_identity < Course::PROFESSOR - @applications= CourseMessage.unhandled_join_course_requests_by_course(@course) + @applications = @is_admin ? CourseMessage.unhandled_join_course_requests_by_course(@course) : CourseMessage.none page = params[:page] || 1 limit = params[:limit] || 20