From a79bc50c5af40e0924a65196df9be32240fb3912 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 9 Oct 2019 17:06:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E9=99=A2=E7=BB=9F=E8=AE=A1=E7=9A=84?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/colleges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/colleges_controller.rb b/app/controllers/colleges_controller.rb index 5f1f094c..fab83063 100644 --- a/app/controllers/colleges_controller.rb +++ b/app/controllers/colleges_controller.rb @@ -128,7 +128,7 @@ class CollegesController < ApplicationController # 在线课堂 def course_statistics @courses = Course.find_by_sql("SELECT c.id, (select concat(lastname,firstname) from users u where u.id=c.tea_id) as username, - (select count(sfc.id) from students_for_courses sfc where c.id=sfc.course_id group by c.id) as student_count, + (select count(cm.id) from course_members cm where c.id=cm.course_id and cm.role=4 group by c.id) as student_count, (select count(hc.id) from homework_commons hc where c.id=hc.course_id and hc.homework_type=4 group by c.id) as hcm_count, (select count(hc.id) from homework_commons hc where c.id=hc.course_id and hc.homework_type in (1,3) group by c.id) as hcm_nonshixun_count, (select count(e.id) from exercises e where c.id=e.course_id group by c.id) as exercises_count,