|
|
@ -697,7 +697,7 @@ class EcCoursesController < ApplicationController
|
|
|
|
total_rate = []
|
|
|
|
total_rate = []
|
|
|
|
total_arry = EcCourseStudentScore.find_by_sql("SELECT avg(score) as averge_score, ec_target_position as position,
|
|
|
|
total_arry = EcCourseStudentScore.find_by_sql("SELECT avg(score) as averge_score, ec_target_position as position,
|
|
|
|
ect.weigths FROM ec_student_score_targets esst, ec_course_targets ect where
|
|
|
|
ect.weigths FROM ec_student_score_targets esst, ec_course_targets ect where
|
|
|
|
esst.ec_course_target_id=ect.id and ect.ec_course_id = #{course_id.id}
|
|
|
|
esst.ec_course_target_id=ect.id and ect.ec_course_id = #{course_id}
|
|
|
|
group by ec_course_target_id")
|
|
|
|
group by ec_course_target_id")
|
|
|
|
all_score = 0
|
|
|
|
all_score = 0
|
|
|
|
total_arry.try(:each) do |ta|
|
|
|
|
total_arry.try(:each) do |ta|
|
|
|
|