缺评列表导出问题
This commit is contained in:
parent
a90ebbef96
commit
9ee9b0277c
|
@ -278,7 +278,7 @@ class StudentWorkController < ApplicationController
|
||||||
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
|
||||||
@stundet_works = StudentWork.find_by_sql("SELECT * FROM (SELECT *,(all_count - has_count) AS absence FROM(
|
@stundet_works = StudentWork.find_by_sql("SELECT * FROM (SELECT *,(all_count - has_count) AS absence FROM(
|
||||||
SELECT * ,
|
SELECT * ,
|
||||||
(SELECT evaluation_num FROM homework_detail_manuals WHERE homework_detail_manuals.homework_common_id = #{@homework.id}) AS all_count,
|
(SELECT COUNT(*) FROM `student_works_evaluation_distributions` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS all_count,
|
||||||
(SELECT COUNT(*) FROM `student_works_scores` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS has_count
|
(SELECT COUNT(*) FROM `student_works_scores` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS has_count
|
||||||
FROM `student_works`
|
FROM `student_works`
|
||||||
WHERE homework_common_id = #{@homework.id}
|
WHERE homework_common_id = #{@homework.id}
|
||||||
|
|
Loading…
Reference in New Issue