英雄榜数据显示问题
This commit is contained in:
parent
51bd745b8d
commit
bff20ee072
|
@ -865,7 +865,7 @@ module CoursesHelper
|
||||||
# 学生按作业总分排序,取前8个
|
# 学生按作业总分排序,取前8个
|
||||||
def hero_homework_score(course, score_sort_by)
|
def hero_homework_score(course, score_sort_by)
|
||||||
sql_select = "SELECT members.*,(
|
sql_select = "SELECT members.*,(
|
||||||
SELECT SUM(IF(student_works.final_score is null,null,student_works.final_score - student_works.absence_penalty - student_works.late_penalty))
|
SELECT SUM(IF(student_works.final_score is null,null,IF(student_works.final_score = 0, 0, student_works.final_score - student_works.absence_penalty - student_works.late_penalty)))
|
||||||
FROM student_works,homework_commons
|
FROM student_works,homework_commons
|
||||||
WHERE student_works.homework_common_id = homework_commons.id
|
WHERE student_works.homework_common_id = homework_commons.id
|
||||||
AND homework_commons.course_id = #{course.id}
|
AND homework_commons.course_id = #{course.id}
|
||||||
|
|
Loading…
Reference in New Issue