|
|
|
@ -1045,7 +1045,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
def end_homework
|
|
|
|
|
tip_exception("请至少选择一个分班") if params[:group_ids].blank? && @course.course_groups.size != 0
|
|
|
|
|
|
|
|
|
|
time = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
|
time = Time.now
|
|
|
|
|
|
|
|
|
|
# 已发布且未截止的作业才能立即截止
|
|
|
|
|
|
|
|
|
@ -1086,7 +1086,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
homework.end_time = time
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
homework_detail_manual.update_attributes!(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"
|
|
|
|
|