修复刷新页面时只评论未评分表的作品在已评列表中

This commit is contained in:
sw 2015-04-15 10:27:17 +08:00
parent ed5911eab5
commit 7dbd20e5eb
1 changed files with 1 additions and 1 deletions

View File

@ -490,7 +490,7 @@ class BidsController < ApplicationController
(SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 1 AND stars IS NOT NULL ORDER BY updated_at DESC limit 0,1) AS t_score,
(SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id AND is_teacher_score = 0) AS s_score
FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY s_score DESC,created_at ASC) AS table1
WHERE table1.t_score IS NULL")
WHERE table1.t_score IS NULL OR table1.t_score = 0")
@not_batch_homework = true
@cur_type = 1
else