|
|
|
@ -37,25 +37,25 @@ module HomeworkCommonsHelper
|
|
|
|
|
when 3
|
|
|
|
|
if ho_detail_manual.evaluation_end && ho_detail_manual.evaluation_end > Time.now
|
|
|
|
|
status << "匿评中"
|
|
|
|
|
time = how_much_time(ho_detail_manual.evaluation_end)
|
|
|
|
|
time = "提交剩余时间:" + how_much_time(ho_detail_manual.evaluation_end)
|
|
|
|
|
time_status = 3
|
|
|
|
|
end
|
|
|
|
|
when 4
|
|
|
|
|
if ho_detail_manual.appeal_time && ho_detail_manual.appeal_time > Time.now
|
|
|
|
|
status << "申诉中"
|
|
|
|
|
time = how_much_time(ho_detail_manual.appeal_time)
|
|
|
|
|
time = "申诉剩余时间:" + how_much_time(ho_detail_manual.appeal_time)
|
|
|
|
|
time_status = 4
|
|
|
|
|
end
|
|
|
|
|
when 2, 5, 6
|
|
|
|
|
status << "评阅中"
|
|
|
|
|
time = course.end_date.present? ? how_much_time(course.end_date.end_of_day) : ""
|
|
|
|
|
time = "评阅剩余时间:" + course.end_date.present? ? how_much_time(course.end_date.end_of_day) : ""
|
|
|
|
|
time_status = 5
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# 如果还在补交阶段则显示补交结束时间
|
|
|
|
|
if homework_common.end_time && homework_common.end_time < Time.now && homework_common.allow_late &&
|
|
|
|
|
homework_common.late_time && homework_common.late_time > Time.now
|
|
|
|
|
time = how_much_time(homework_common.late_time)
|
|
|
|
|
time = "补交剩余时间:" + how_much_time(homework_common.late_time)
|
|
|
|
|
time_status = 2
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
@ -74,12 +74,12 @@ module HomeworkCommonsHelper
|
|
|
|
|
when 1
|
|
|
|
|
if homework_common.end_time && homework_common.end_time >= Time.now
|
|
|
|
|
status << "提交中"
|
|
|
|
|
time = how_much_time(homework_common.end_time)
|
|
|
|
|
time = "提交剩余时间:" + how_much_time(homework_common.end_time)
|
|
|
|
|
time_status = 1
|
|
|
|
|
elsif homework_common.end_time && homework_common.end_time < Time.now
|
|
|
|
|
time_status = 5
|
|
|
|
|
if homework_common.allow_late && (homework_common.late_time.nil? || homework_common.late_time >= Time.now)
|
|
|
|
|
time = how_much_time(homework_common.late_time)
|
|
|
|
|
time = "补交剩余时间:" + how_much_time(homework_common.late_time)
|
|
|
|
|
time_status = 2
|
|
|
|
|
end
|
|
|
|
|
status << "评阅中"
|
|
|
|
@ -114,11 +114,11 @@ module HomeworkCommonsHelper
|
|
|
|
|
time_status = 0
|
|
|
|
|
elsif max_end_time.present? && max_end_time > Time.now #6.14 -hs 添加present?
|
|
|
|
|
status << "提交中"
|
|
|
|
|
time = how_much_time(max_end_time)
|
|
|
|
|
time = "提交剩余时间:" + how_much_time(max_end_time)
|
|
|
|
|
time_status = 1
|
|
|
|
|
elsif 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 = "补交剩余时间:" + how_much_time(homework_common.late_time)
|
|
|
|
|
time_status = 2
|
|
|
|
|
else
|
|
|
|
|
status << "评阅中"
|
|
|
|
|