|
|
|
@ -2374,8 +2374,10 @@ module ApplicationHelper
|
|
|
|
|
link_to "作品(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue"
|
|
|
|
|
else #学生显示提交作品、修改作品等按钮
|
|
|
|
|
work = cur_user_works_for_homework homework
|
|
|
|
|
if work.nil?
|
|
|
|
|
if work.nil? && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
|
|
|
|
link_to "提交作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_blue'
|
|
|
|
|
elsif work.nil? && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d")
|
|
|
|
|
link_to "补交作品(#{homework.student_works.count})", new_student_work_path(:homework => homework.id),:class => 'c_red'
|
|
|
|
|
else
|
|
|
|
|
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 #匿评作业,且作业状态不是在开启匿评之前
|
|
|
|
|
link_to "作品匿评", student_work_index_path(:homework => homework.id), :class => 'c_blue', :title => "开启匿评后不可修改作品"
|
|
|
|
|