|
|
|
@ -464,7 +464,7 @@ class SubjectsController < ApplicationController
|
|
|
|
|
elsif params[:type] == "user_info"
|
|
|
|
|
@subject.subject_user_infos
|
|
|
|
|
else
|
|
|
|
|
select_sql = "count(subject_course_records.id) total, sum(course_count) course_count, sum(student_count) student_count, " +
|
|
|
|
|
select_sql = "id, count(subject_course_records.id) total, sum(course_count) course_count, sum(student_count) student_count, " +
|
|
|
|
|
"sum(choice_shixun_num) choice_shixun_num, sum(choice_shixun_frequency) choice_shixun_frequency"
|
|
|
|
|
@total = @subject.subject_course_records.select("#{select_sql}").first
|
|
|
|
|
@subject.subject_course_records
|
|
|
|
|