dev_trainings
cxt 6 years ago
parent db3422a8f1
commit b124c358c9

@ -6580,7 +6580,7 @@ def update_shixun_work_status homework
myshixuns = Myshixun.where(:shixun_id => shixun.id, :user_id => student_works.map(&:user_id)) myshixuns = Myshixun.where(:shixun_id => shixun.id, :user_id => student_works.map(&:user_id))
myshixuns.each do |myshixun| myshixuns.each do |myshixun|
work = student_works.where(:user_id => myshixun.user_id).first work = student_works.where(:user_id => myshixun.user_id).first
member = homework.course.members.find_by(:user_id => work.user_id) member = homework.course.members.find_by_user_id(work.user_id)
setting_time = homework_group_setting homework, member.try(:course_group_id) setting_time = homework_group_setting homework, member.try(:course_group_id)
games = myshixun.games.where(:challenge_id => challeng_ids) games = myshixun.games.where(:challenge_id => challeng_ids)
myshixun_endtime = games.select{|game| game.status == 2}.size == games.size ? games.map(&:end_time).max : nil myshixun_endtime = games.select{|game| game.status == 2}.size == games.size ? games.map(&:end_time).max : nil

Loading…
Cancel
Save