Merge branch 'educoder' into dev_aliyun

dev_aliyun
daiao 5 years ago
commit 472033cb5d

@ -9,9 +9,9 @@ module EcMajorSchoolsHelper
subitem_ids = ec_year.ec_graduation_subitems.reorder(nil).pluck(:id)
relations = EcGraduationRequirementCalculation.joins(ec_course_support: :ec_graduation_subitem_courses).where('ec_graduation_subitem_id in (?)', subitem_ids)
relations = EcGraduationRequirementCalculation.joins(ec_course_support: :ec_graduation_subitem_courses).where('ec_graduation_subitem_courses.ec_graduation_subitem_id in (?)', subitem_ids)
reached_map = relations.where(status: true).group('ec_graduation_subitem_id').count
reached_map = relations.where(status: true).group('ec_graduation_subitem_courses.ec_graduation_subitem_id').count
reached_map.keys.size
end

Loading…
Cancel
Save