匿评任务的调整

video_log
cxt 5 years ago
parent 6ef7ff36b2
commit 91719c7f7e

@ -17,7 +17,7 @@ namespace :homework_evaluation do
homework_detail_manuals.each do |homework_detail_manual| homework_detail_manuals.each do |homework_detail_manual|
homework_common = homework_detail_manual.homework_common homework_common = homework_detail_manual.homework_common
if homework_common.anonymous_comment if homework_common.anonymous_comment
if homework_common.homework_group_settings.where("end_time is null or end_time > '#{Time.now}'").count == 0 if homework_common.homework_group_settings.where("end_time > '#{Time.now}'").count == 0
if homework_common.homework_type == "group" if homework_common.homework_type == "group"
student_works = homework_common.student_works.where("work_status != 0").group(:group_id) student_works = homework_common.student_works.where("work_status != 0").group(:group_id)
else else

Loading…
Cancel
Save