@ -78,7 +78,7 @@ class HomeworkCommonsController < ApplicationController
when'4'
sql_str=%Q((homework_detail_manuals.comment_status = #{order} and homework_detail_manuals.appeal_time > '#{Time.now}'))
when'5'
sql_str=%Q((homework_detail_manuals.comment_status = #{order} or (anonymous_comment = 0 and homework_commons.end_time <= '#{Time.now}')))
sql_str=%Q((homework_detail_manuals.comment_status = #{order} or (anonymous_comment = 0 and ((allow_late= 0 and homework_commons.end_time <= '#{Time.now}') or (allow_late= 1 and late_time <= '#{Time.now}')))))
answer_ids=user.grades.joins("join games on grades.container_id = games.id").where("container_type = 'Answer' and games.status=2 and games.end_time > grades.created_at").pluck(:container_id)