作业 状态文字

This commit is contained in:
lizanle 2015-07-04 09:35:04 +08:00
parent 08123c2d62
commit e85f63831c
1 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,7 @@ module ApiHelper
def homework_status_desc homework
if homework.homework_type == 1 && homework.homework_detail_manual #匿评作业
if Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
link = "<span class='fr mr10 pr_join_span ' title='作业截止日期之前不可启动匿评'>启动匿评</span>".html_safe
link = "截止日期之前不可启动匿评"
elsif homework.student_works.count >= 2 #作业份数大于2
case homework.homework_detail_manual.comment_status
when 1
@ -104,10 +104,10 @@ module ApiHelper
link = " 匿评结束"
end
else
link = "学生提交作业数大于2才可启动匿评"
link = "提交作业数大于2才可启动匿评"
end
else
link = "未开启匿评作业不可启动匿评"
link = "未开启匿评作业不可启动匿评"
end
link
end