|
|
|
@ -976,7 +976,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
elsif homework.max_group_end_time
|
|
|
|
|
homework.end_time = homework.max_group_end_time
|
|
|
|
|
end
|
|
|
|
|
homework.homework_detail_manual.update_attribute('comment_status', 1)
|
|
|
|
|
homework.homework_detail_manual.update_attributes!(comment_status: 1)
|
|
|
|
|
|
|
|
|
|
if homework.course_acts.size == 0
|
|
|
|
|
homework.course_acts << CourseActivity.new(user_id: homework.user_id, course_id: homework.course_id)
|
|
|
|
@ -1004,7 +1004,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if homework.end_time > Time.now && homework.homework_detail_manual.try(:comment_status) > 1
|
|
|
|
|
homework.homework_detail_manual.update_attribute("comment_status", 1)
|
|
|
|
|
homework.homework_detail_manual.update_attributes!(comment_status: 1)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 补交结束时间
|
|
|
|
@ -1071,7 +1071,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
homework.end_time = homework.max_group_end_time
|
|
|
|
|
if homework.end_time > time && homework_detail_manual.try(:comment_status) > 1
|
|
|
|
|
homework_detail_manual.update_attribute("comment_status", 1)
|
|
|
|
|
homework_detail_manual.update_attributes!(comment_status: 1)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 统一设置
|
|
|
|
@ -1080,7 +1080,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
homework.end_time = time
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
homework_detail_manual.update_attribute("comment_status", 2) if homework.end_time <= time
|
|
|
|
|
homework_detail_manual.update_attributes!(comment_status: 2) if homework.end_time <= time
|
|
|
|
|
|
|
|
|
|
# 实训作业的作品需要计算是否迟交
|
|
|
|
|
if homework.homework_type == "practice"
|
|
|
|
|