Merge branch 'rep_quality' into develop
This commit is contained in:
commit
8365042399
|
@ -39,23 +39,23 @@ namespace :update_homework do
|
|||
end
|
||||
end
|
||||
s_time = time
|
||||
logger.info("latest time is =========================> #{time}")
|
||||
puts "latest time is =========================> #{time}"
|
||||
if time.strftime('%Y-%m-%d %H:%M:%S') > h.updated_at.strftime('%Y-%m-%d %H:%M:%S')
|
||||
h.update_column('updated_at', s_time)
|
||||
course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", 'HomeworkCommon', h.id).first
|
||||
if course_activity && (time.strftime('%Y-%m-%d %H:%M:%S') > course_activity.updated_at.strftime('%Y-%m-%d %H:%M:%S'))
|
||||
course_activity.update_column('updated_at', s_time)
|
||||
logger.info("course_activity time is =========================> #{course_activity}")
|
||||
puts "user_activity time is =========================> #{course_activity}"
|
||||
end
|
||||
user_activity = UserActivity.where("act_type=? and act_id =?", 'HomeworkCommon', h.id).first
|
||||
if user_activity && (time.strftime('%Y-%m-%d %H:%M:%S') > user_activity.updated_at.strftime('%Y-%m-%d %H:%M:%S'))
|
||||
user_activity.update_column('updated_at', s_time)
|
||||
logger.info("user_activity time is =========================> #{user_activity}")
|
||||
puts "user_activity time is =========================> #{user_activity}"
|
||||
end
|
||||
org_activity = OrgActivity.where("org_act_type=? and org_act_id =?", 'HomeworkCommon', h.id).first
|
||||
if org_activity && (time.strftime('%Y-%m-%d %H:%M:%S') > org_activity.updated_at.strftime('%Y-%m-%d %H:%M:%S'))
|
||||
org_activity.update_column('updated_at', s_time)
|
||||
logger.info("org_activity time is =========================> #{s_time}")
|
||||
puts "org_activity time is =========================> #{org_activity}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue