dev_bj
cxt 6 years ago
parent 9bd9e16d3b
commit 34a2e2a436

@ -6602,7 +6602,7 @@ def update_shixun_work_status homework
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).to_i
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
compelete_status = 0 compelete_status = 0
@ -7254,11 +7254,9 @@ end
# 作业的分班设置时间 # 作业的分班设置时间
def homework_group_setting homework, group_id def homework_group_setting homework, group_id
setting = nil setting = homework
if homework.homework_group_settings.where(:course_group_id => group_id).first if homework.homework_group_settings.where(:course_group_id => group_id).first.present?
setting = homework.homework_group_settings.where(:course_group_id => group_id).first setting = homework.homework_group_settings.where(:course_group_id => group_id).first
else
setting = homework
end end
setting setting
end end

Loading…
Cancel
Save