diff --git a/app/helpers/homework_commons_helper.rb b/app/helpers/homework_commons_helper.rb index 7327be2b6..ffc59dc94 100644 --- a/app/helpers/homework_commons_helper.rb +++ b/app/helpers/homework_commons_helper.rb @@ -28,6 +28,13 @@ module HomeworkCommonsHelper if ho_detail_manual # 作业状态大于“提交”状态时,不用考虑分班权限 if ho_detail_manual.comment_status > 1 + if homework_common.end_time && homework_common.end_time < Time.now && homework_common.allow_late && + (homework_common.late_time.nil? || homework_common.late_time > Time.now) + status << "补交中" + time = "补交剩余时间:" + how_much_time(homework_common.late_time) + time_status = 2 + end + case ho_detail_manual.comment_status when 3 if ho_detail_manual.evaluation_end && ho_detail_manual.evaluation_end > Time.now @@ -42,12 +49,7 @@ module HomeworkCommonsHelper time_status = 4 end else - if homework_common.end_time && homework_common.end_time < Time.now && homework_common.allow_late && - (homework_common.late_time.nil? || homework_common.late_time > Time.now) - status << "补交中" - time = "补交剩余时间:" + how_much_time(homework_common.late_time) - time_status = 2 - else + if status.blank? status << "已截止" time = course.end_date.present? ? ("评阅剩余时间:" + how_much_time(course.end_date.end_of_day)) : "" time_status = 5