修复刷新页面时只评论未评分表的作品在已评列表中
This commit is contained in:
parent
ed5911eab5
commit
7dbd20e5eb
|
@ -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 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
|
(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
|
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
|
@not_batch_homework = true
|
||||||
@cur_type = 1
|
@cur_type = 1
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue